Better Pull Request UX?

I was trying to teach a new user how to edit on github directly as they are not just editing docs and are not a software dev. It starts great

  1. Find file in original repo and click edit
  2. edit, type description, click “propose changes”
  3. click “create pull request”

The problem is at step 3. Let’s say the user wants to edit the proposed changes. It’s not remotely clear from that page how they do it.

Of course I think I know how to do it but it’s very convoluted AFAICT. From the page there are no links to the patch/branch. Ideally there would be an edit icon/button for each file. There’s “view file” hiding in the drop down menu but it doesn’t lead to the correct place to edit the pull request branch.

Here are the steps as far as I can tell

  1. Navigate to your own repo.This is annoying because the pull request page is on the upstream repo so there is no link or anything to get to your own repo from that page.

    At best you manually type a URL assuming you even know what that URL is or you go to your home page and find the repo.

  2. Find the patch.

    This is also annoying. When there’s one patch it will be easy but if the patch is “patch-37” how is the user supposed to remember that? After they navigated from the pull request page they probably already forgot. There may also be 10s or 100s of branches from the upstream repo

  3. Navigate back to the file that was in the pull request you wanted to edit

    If the file is deeply nested this is tedious and annoying.

  4. Edit the file and add to the branch

  5. Navigate back to the top of your repo (the main page for your repo) so that you get the pull request prompt again

Steps 1, 2, 3, and 4 could easily be made 1 step by adding links from the pull request UI. For each file a “edit this file” link or pencil icon etc… Step 5 should result from the commit (as in the pull request option should appear automatically, you shouldn’t have to manually navigate to see it).

Is there a better easier set of steps or is it really that atrocious? :joy:

Hi greggman! :wave:

When you open the drop down to see the “View file” option, just underneath it there’s an “Edit file” option, and that opens up the edit screen on the appropriate branch, and a commit made there will be included in the pull request! :wink:

There’s no need to make a new pull request if the previous one is still open — i.e. further commits to the PR branch will become automatically part of the original PR. In other words, you’re not creating a pull request for a specific commit but for the whole branch.

So, as @yamiacat indicated, you only need to edit the files in the PR branch, using GH’s WebUi, and you’ll be committing after each editing session.

1 Like