Skip to content

Show correct push instructions for a forked MR

Brett Walker requested to merge bw-push-source-branch into master

What does this MR do and why?

When a forked repository creates and pushes a branch, an MR in the upstream repository can be created. Someone who is working in the upstream repository can checkout that branch, and we show modified instructions how to do that. If a change is made, that commit needs to get pushed to the forked repository, and then it's reflected in the MR.

Currently we don't show the correct instructions for doing that push. This MR fixes that.

Reference: Push to the fork as the upstream member

Screenshots or screen recordings

Before After
Screenshot_2023-07-20_at_3.51.17_PM Screenshot_2023-07-20_at_3.49.13_PM

How to set up and validate locally

This assumes the standard GDK setup

  1. Navigate to the jashkenas/Underscore project, and fork it (assuming that you're forking as the Administrator)
  2. Navigate to the root/Underscore project, and make a change to the README.md file - easiest is to use the WebIDE. Commit the change to a new branch called forked-mr-test
  3. Make sure you create the MR, either from the WebIDE or by going to the Merge requests page, it will prompt you to create the MR
  4. There should now be a new MR in the jashkenas/Underscore project. Navigate to that project
  5. Make sure you've cloned the jashkenas/Underscore project locally.
  6. From the newly created MR, click on Code -> Check out branch. Follow these instructions, including the checkout and pushing, to make a change, commit and push it.
  7. You should see the commit pushed to the forked repository reflected in the MR in the upstream repository.

In particular note that originally the push instructions said git push origin 'forked-mr-test'. They now say git push "ssh://git@ee.gitlab.test:2222/root/Underscore.git" 'Underscore-forked-mr-test:forked-mr-test'

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Brett Walker

Merge request reports

Loading