Skip to content

🆕 Create a branch for an issue in public beta #12290

Unanswered
dipree asked this question in Issues Feedback
🆕 Create a branch for an issue in public beta #12290
Mar 2, 2022 · 7 answers · 7 replies

In an issue, you can now create a branch for that issue and start work right away. In the sidebar of an issue, branches connected to the issue are shown in the "Development" section, which has replaced "Linked pull requests". When you create a pull request for one of these branches, it is automatically linked to the issue. You can learn more about the functionality in our documentation.

Addresses github/roadmap#218 on our public roadmap.

We can't wait for you to try it out! Let us know what you think here in Discussions.

:octocat: 🐳

Replies

7 suggested answers
·
7 replies

this is nice. but i would prefer like gitlab has it, that it creates both a branch and a PR for you. one of the things that annoys me a lot when working on github. i like to take notes about my work in the PR but on github i can't do that before i already have 1 commit on the branch, something which doesn't always happen so fast.

4 replies
@dipree

Thank you for the feedback, this is not directly related to the new functionality but I will make sure to pass it on to the right folks.

@pietrovismara

@Powersource What I do is push an empty commit on the new branch in order to be able to create the PR. Not ideal, but doable.

@robvanderleek

Not sure if I'm allowed to post this here but I guess there will always be features not covered by the platform itself; There's an App/Action called Create Issue Branch that supports automatically opening (draft) PRs.
FD: I'm the author of that app.

It would be pretty awesome if it were possible to link an existing branch from another repository within the scope of the organization.

Where I work there is a certain repository of tasks where it is not possible to link Pull Requests or Branches because the projects are done in another repository, this would be an excellent addition.

1 reply
@dipree

Thank you for bringing it up. Linking existing branches is not possible yet but your request is noted. To mitigate the problem in the meantime, you can create a branch from the repository that contains the issue and select a separate repository to create the branch in.

Just noticed that when I do create a PR from the branch, it automatically links it to the issue and marks the issue for autoclosing when the PR is merged. This is something we don't want in our org so this is a bit annoying. E.g. we already have to write "for #123" in PRs instead of "fixes #123" to avoid the autoclosing, and this adds another thing we have to dodge.

1 reply
@dipree

Again, good feedback, keep it coming. This is not directly related but I will make sure to pass it on.

Finally! That's exactly the feature I've been waiting for - thanks for adding this to GitHub.

One small issue: when the issue title contains special characters (e.g., markdown backticks), it would be amazing if branch name could sanitize those out.

Screen Shot 2022-03-02 at 10 01 32 AM

1 reply
@dipree

Thanks @nicbet, noted!

Not within the scope of this feature currently, but in the future it would be neat to see:

  • The existence of any branches associated with the issue appear in the main "Issues" page, similar to how the PR icon shows up. This would help to differentiate between active and inactive issues (similar to Azure Devops)
  • The creation of a development branch show up in the timeline of a specific issue, similar to other events (commits, comments, tags, etc.)

Great work guys

0 replies

I can't assign existing branch (new-design) to the issue: TomaszGasior/RadioLista-v3#116. It's only possible to create branches and choose PRs, no way to just select existing bare branch.

0 replies

It would be great if we can configure some sort f regex when it comes to the naming convention of the branch as well as limit or unlimit the name length of the branch

For example.

bug/issue-name/123
or to kind of generalise that
[label]/name/[ticket number]

0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment