Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Close issue on GitHub pull request to non master branch

Tags:

git

github

I am aware of how to close an issue using a pull request message. But that only happens if the destination branch is master.

What if i want to close an issue while merging to a non master branch?

Is it even possible?

like image 707
Alfie Avatar asked May 21 '26 16:05

Alfie


1 Answers

Technically, it isn't important whether you push to master or some other branch. What matters is that you push to the default branch, which defaults to master but can be changed if you have repository admin rights.

Pushing to non-default branches does not close issues:

If the commit is in a non-default branch, the issue will remain open and the issue will be referenced with a tooltip.

It should be possible to build something to automatically close issues based on commits to multiple branches using the GitHub API, but out of the box you're out of luck.

like image 92
Chris Avatar answered May 24 '26 17:05

Chris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!