homu
homu copied to clipboard
Need prefix to PR number in merge commit message, otherwise incorrect linking occurs with subtrees
Looking at clippy commits in the rust repo, e.g. in PR rust-lang/rust#84980, you’ll see commit messages from @bors merge commits, e.g.
https://github.com/rust-lang/rust/pull/84980/commits/ce37099bd3cc05568c09fa7c1f06c80efd64c905
containing PR numbers from rust-lang/rust-clippy. But it’s just the number in a commit message, so github inserts a link to the same number in rust-lang/rust! So it links to the issue https://github.com/rust-lang/rust/issues/7140 instead of the PR rust-lang/rust-clippy#7140. Look at that issue, github even inserted a back-link to the entirely unrelated bors commit.
I suggest changing the message of such a commit from
Auto merge of #7140
to
Auto merge of rust-lang/rust-clippy#7140
This way, linking works correctly. And it still doesn’t need a full URL. I double-checked that the linking works correctly here: https://github.com/steffahn/rust/commit/b41e6a2131a7feb0b0334b13cd66cdf93608d58e.
I’m not sure how homu works, if this is something that needs to be changed here or just some configuration.
Also note that this is only strictly necessary for subtrees such as clippy or rustfmt, but I guess it wouldn’t hurt either if the prefixes were added in all repositories.
This would need to be added to this codebase, and I'm personally ok with that :)
There’s another issue with issues mentioned in PR descriptions. These get turned into commit messages for the auto-merge / rollup-merge commits. See https://github.com/rust-lang/homu/pull/145#issuecomment-865031079.