sindresorhus/refined-github

Add an option to rename branch for "Propose changes" field #4285

Andre601 posted onGitHub

<!-- 1. Make sure your requested feature makes sense for Refined GitHub: https://github.com/sindresorhus/refined-github/issues/2960 2. Include a REAL URL where the feature should appear. e.g. Do you want a feature to appear on the main page of a repo? Paste a link to a repo -->

Feature

When you want to make quick changes to a Repository without having push rights does GitHub offer to "Propose changes" which results in a fork being created and the commit being made to that fork.

However, there is no way for you to define your own branch name when proposing changes and the branch name is always set to a specific pattern.

My feature request is to make Refined GitHub add the radio buttons you usually have for when committing changes to a Repo you have push rights on (The one where you can choose to either commit to the current branch or create a new one from it).

Reason

The fact that the branch names are always in the form of :username-patch-:number is kind of frustrating. While it can be a quick and dirty way to propose changes for minor typos, corrections or similar is it still sad that there is no option to actually name your own branch, which often is a crucial part of making pull requests as the branch can give a quick info about what it is. Or perhaps the repository follows a strict naming pattern for branches and deny any patch branch in the process.

Example

Here is a before and after example of how the "Propose changes" field may look like when committing changes for a Repo you don't have push rights for.

Before: image

After: image


If this is possible, it definitely makes sense and is probably easy. If the API they use accepts a branch parameter we only need to add a single field

posted by fregante almost 4 years ago

I checked and:

  • There's no existing hidden field for the branch name
  • Copying the branch name field from another page doesn't seem to work from a simple try

Maybe the form needs to be customized further to allow this. Further exploration needed. PR welcome if you'd like to try.

šŸ¤·ā€ā™‚ļø

posted by fregante almost 4 years ago

No big deal, just let it be patch-1 or just use Codespaces. We can't add all the features šŸ˜…

posted by fregante over 3 years ago

No big deal, just let it be patch-1 or just use Codespaces. We can't add all the features šŸ˜…

Or - and that is the option I now chose - make a GitHub feedback: https://github.com/github/feedback/discussions/5696

posted by Andre601 over 3 years ago

Fund this Issue

$0.00
Funded

Pull requests