Refined-github: Hotkey for updating branch on a stale PR

Created on 21 Feb 2018  路  13Comments  路  Source: sindresorhus/refined-github

I'd like to use a hotkey for updating a branch that has gotten stale. Unless u is already preserved, I'd go with that one once you're in a pull request page.

enhancement under discussion

All 13 comments

馃憥 because GitHub doesn't have shortcuts for actions which would write to Git. The only write action that could be performed with a keyboard shortcut is submitting a textarea with Cmd/Ctrl+Enter.

The way updating a stale branch in GitHub works may not work well with certain workflows (it merges master instead of rebasing) and triggering it on a press of a button is quite dangerous.

I don't think we need shortcuts for something that would post to GitHub and instruct it to write to Git and change the actual tree.

Agreed, I thought it was actually referring to this staleness:

This would get fixedthough the moment Github does this by default. I find it nonetheless super convenient to have a shortcut to update the branch since often times when using the Always up to date check you run into this case.

the moment Github does this by default

That's not an excuse for adding it now. Refined GitHub adds feature that GitHub doesn't have, but that doesn't mean that they _will_ add our features. So far they literally only added 3 of our features _ever._

I know but even when pressing the button you have to manually refresh the page.

We could split this up in two features:

  • hotkey for the button itself
  • when updating a branch refresh the page automatically

Personally I'm still seeing value in a hotkey for just updating the button without refreshing the page. Let me know what you think and whether I should continue this PR then or not.

Uhm can you please take a screenshot of what button you're talking about exactly?

How do you "update branch on a stale PR"?

It's the button on the right. Note that in this PR the branch is up to date and does not need a merge from master.

screen shot 2018-03-01 at 12 56 13

I'm not sure I've ever seen that one. When does it appear exactly? Is there a repo setting that forces you to update the branch before merging?

This is the only "update" button I ever see, which appears only if there are conflicts:

resolve conflicts

Yes there's a repo setting that enforces this (Require branches to be up to date before merging).

screen shot 2018-03-01 at 13 02 57

This button would merge the default branch in the PR branch with a merge commit if there are no conflicts. I'd still be against doing a shortcut for such an operation. It's not that common, it writes to Git (even though it's not destructive).

Yeah, concern still stands

I'm using it almost every day and I find it to be 'common'.

Also what's with the hesitation about shortcuts that do some git action(s)?

Closing since we can't agree on this and I'll just leave it alive in my fork for me - personally.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yakov116 picture yakov116  路  3Comments

mareksuscak picture mareksuscak  路  3Comments

sindresorhus picture sindresorhus  路  3Comments

durka picture durka  路  3Comments

olso picture olso  路  3Comments