I spend my day doing this:
To remove the 4th step, how can I close the issue automatically when committing?
To link a commit to a GitHub Issue, put the issue number with the # character in the Comment text box. For example, #111. To close a GitHub issue, put a keyword and put the issue number with the # character in the Comment text box. For example, Close #111.
Commit and push using this syntax:
git commit -m "Sort more efficiently" -m "Closes #843"
git push
This will commit and close the issue.
Note that unlike Github a single -m
will not work.
The following will appear on the issue page:
References:
According to this link from gitlab, you will be able to do that with a variety of words such as "fixes" or "closes". It does not need to be in a seperate line.
So you could have the following message:
Fixes #20. I had to replace "foo" with "bar".
And that will close issue #20.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With