Skip to content

Commit 11ea9ab

Browse files
committed
chore(ci): reject uncanonicalized issue link in commits
This is needed if we want to turn cargo submodule into a subtree in the rust-lang/rust repository (#15882), because commits messages will be copied over as-is, and the magic keyword like `fixes #99999` may unintentionally close issues in rust-lang/rust while it was intended only for rust-lang/cargo issues. Unlike `check-commits = false`, instead of rejecting any issue links in commit messages, the `"uncanonicalized"` option still allows issues in a canonicalized form, such as * `https://github.com/rust-lang/cargo/issues/15882` * `#15882` but the bare issue number like `#15882` will be warned by triagebot in a PR comment. ### Drawbacks It is bad because contributors will be forced to write commit messages in a specific style. Worse if we decide not to be a subtree and then this change puts unnecessary works on contributors. ### Is it the last step towards #15882? Personally I consider not. Because merge commit still contains the PR number in the uncanonicalized form, as we use GitHub merge queue and it hasn't yet support [merge commit template][1]. However, this change on its own makes issue link more obvious and less ambiguous, especially when reading from outside GitHub web UI. It also stops us from adding more uncanonicalized issue links in the future, which we already have too many in the past commits [2] For discussions, see * https://forge.rust-lang.org/triagebot/issue-links.html * https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Turning.20cargo.20into.20a.20subtree/near/537951273 * #15882 [1]: https://github.com/orgs/community/discussions/5955 [2]: https://rust-lang.zulipchat.com/#narrow/channel/246057-t-cargo/topic/Turning.20cargo.20into.20a.20subtree/near/537560661
1 parent 3b379fc commit 11ea9ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

triagebot.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ review_labels = ["S-waiting-on-review"]
6161
remove_labels = ["S-waiting-on-author"]
6262
add_labels = ["S-waiting-on-review"]
6363

64+
[issue-links]
65+
check-commits = "uncanonicalized"
66+
6467
[autolabel."A-build-execution"]
6568
trigger_files = [
6669
"src/cargo/core/compiler/compilation.rs",

0 commit comments

Comments
 (0)