Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add owner/name prefix to PR number in “Auto merge of …”/“Rollup merge of …” message #145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

steffahn
Copy link
Member

Fixes #144

Disclaimer: I have no idea how to test this code to make sure it’s working properly and doing the right thing.

@Mark-Simulacrum
Copy link
Member

It's also worth noting this may break integrations such as:

Otherwise this seems good, but I would like to see PRs landed that fix the above cases before we merge (so we don't break things).

@steffahn steffahn changed the title Add owner/name prefix to PR number in “Auto merge of …” message Add owner/name prefix to PR number in “Auto merge of …”/“Rollup merge of …” message Jun 21, 2021
@steffahn
Copy link
Member Author

I guess rollup merge commit messages are relevant, too…

@Mark-Simulacrum
Copy link
Member

Rollup merges are looked for by the clippy script I linked previously and (new) the thanks script https://github.com/rust-lang/thanks/blob/master/src/main.rs#L271

@steffahn
Copy link
Member Author

Looking at something like the incorrect backlinks appearing in rust-lang/rust#7235, the “successful merges” list is relevant, too.

@steffahn
Copy link
Member Author

Okay, wait… this is even worse. Every “auto merge” commit has the full PR message in it. Which means, if we look at any PR that fixes an issues, e.g. rust-lang/rust-clippy#7175, (which contains Fixes #6804 in the PR message), then the corresponding auto merge will create a wrong backlink when the commit is transferred to rust-lang/rust. I.e. rust-lang/rust#6804 contains a wrong backlink.

@steffahn
Copy link
Member Author

So… maybe the better approach is to somehow find-and-replace all non-prefixed issue numbers in the PR message when creating the commit message for the “auto merge” or the “rollup merge” commit. This would then also remove the problem with the successful merges list and the PR message itself could keep the unprefixed variant of the PR numbers.

So I’ll remove 0a66ef7 for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Need prefix to PR number in merge commit message, otherwise incorrect linking occurs with subtrees
2 participants