question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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: <...>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
yakov116commented, Oct 31, 2022
1reaction
yakov116commented, Oct 30, 2022

Don’t understand why we cant just do on the first post and extract the issue number

	select.all('[aria-label="This pull request closes issue*"]')
Read more comments on GitHub >

github_iconTop Results From Across the Web

Close linked issues even when the PR targets a branch that is ...
Currently when linking issues to PRs to close, the linked issues only closes if the target branch for the PR is the default...
Read more >
GitHub - PR linked issue does not gets closed when non ...
When you merge a linked pull request into the default branch of a repository, its linked issue is automatically closed.
Read more >
Closing Issues via Pull Requests - The GitHub Blog
And the referenced issue will automatically be closed when the PR is merged into the default branch. You will even see the references...
Read more >
Merge request dependencies - GitLab Docs
Dependencies for merge requests you don't have access to are displayed as 1 inaccessible merge request, and can be removed the same way....
Read more >
Create a pull request to review and merge code - Azure Repos
You can create PRs from branches in the upstream repository or from ... branch you want to merge the changes into, such as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found