Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to associate github issues with a branch?

Tags:

github

Nearly every issue I file on gh refers to code on a particular branch. Does github have any mechanism to link an issue to the branch?

I need to filter issues by branch, so I am not distracted by issues in other feature branches.

Is there a way to do this? I know milestones can be (ab)used to reach a similar effect, but things get really confusing when the branch becomes a pull request and it shows up as another issue.

like image 956
Eric Vicenti Avatar asked Mar 14 '14 19:03

Eric Vicenti


2 Answers

References Often times issues are dependent on other issues, or at least relate to them and you’d like to connect the two. You can reference issues by typing in a hashtag plus the issue number.

Hey @kneath, I think the problem started in #42

Issue in another repository? Just include the repository before the name like kneath/example-project#42.

One of the more interesting ways to use GitHub Issues is to reference issues directly from commits. Include the issue number inside of the commit message.

By prefacing your commits with “Fixes”, “Fixed”, “Fix”, “Closes”, “Closed”, or “Close” when the commit is merged into master, it will also automatically close the issue.

References make it possible to deeply connect the work being done with the bug being tracked, and are a great way to add visibility into the history of your project.

like image 66
Data Travel Avatar answered Sep 20 '22 01:09

Data Travel


Use labels to organize issues. They aren't inherently branch-specific, but you could make a tag for each branch if that is how you want them organized.

When you have admin access to the repository, there should be a button called 'manage labels' on the issue page. That will let you add, modify, or delete labels. You can apply labels to issues a few different ways. One way is to open the issue and click the labels button just to the right of the main body of text for the issue. Once you have created a label, it will appear on the left just above the manage labels button. You can click on each label to view all the issues that have been marked with that label.

like image 21
IanH Avatar answered Sep 18 '22 01:09

IanH