sindresorhus/refined-github

Do you want to work on this issue?

You can request for a bounty in order to promote it!

`clear-pr-merge-commit-message` should preserve which issues a PR closes when it is not merged into the default branch #4531

AlCalzone posted onGitHub

I'm looking for a good way to keep a linear commit history, and work on new release branches while being able to preserve GitHub's auto-close feature for issues when a PR gets merged into master. My plan is to merge PRs (I'm squash-merging) into a develop branch and when I deem it to be ready, locally rebase it on top of master, then fast-forward master. Unfortunately the rebase step (or if I were to squash-merge the branch), GitHub forgets which issues should be closed.

If the commit bodies would contain the information of which issues get closed, for example

fixes: #1234
fixes: #4567
...

the commits would still cause Github to close the referenced issues, no matter how the commits finally end up in master.

To summarize, I'm asking for a way to automatically put the linked issues of a PR in the final commit message when the PR is not merged into the default branch. Currently, clear-pr-merge-commit-message clears everything but Co-authored-by: <...>


Fund this Issue

$0.00
Funded
Only logged in users can fund an issue

Pull requests