From 2b1b33f6bfafc4559cfcb0d3dad86a38795b3599 Mon Sep 17 00:00:00 2001 From: Urgau Date: Wed, 9 Apr 2025 20:14:13 +0200 Subject: [PATCH] Add documentation for triagebot `[no-mentions]` handler --- src/SUMMARY.md | 1 + src/triagebot/no-mentions.md | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 src/triagebot/no-mentions.md diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 88493689..b07fa4ec 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -26,6 +26,7 @@ - [Mentions](./triagebot/mentions.md) - [Merge Conflicts](./triagebot/merge-conflicts.md) - [No Merge Policy](./triagebot/no-merge.md) + - [No Mentions](./triagebot/no-mentions.md) - [Nominate](./triagebot/nominate.md) - [Note](./triagebot/note.md) - [Notifications](./triagebot/notifications.md) diff --git a/src/triagebot/no-mentions.md b/src/triagebot/no-mentions.md new file mode 100644 index 00000000..3ded1779 --- /dev/null +++ b/src/triagebot/no-mentions.md @@ -0,0 +1,17 @@ +# No Mentions (in commits) + +GitHub permits having mentions (eg. `@user`) in commits, and while it's sometimes useful it almost always ends-up spamming the mentioned users, in particular as the commits are being rebased, cherry-picked or pushed. + +This handler tries to prevent those mentions by adding a comment warning in the PR against them. + +## Configuration + +This feature is enabled on a repository by having a `[no-mentions]` table in `triagebot.toml`: + +```toml +[no-mentions] +``` + +## Implementation + +See [`src/handlers/check_commits/no_mentions.rs`](https://github.com/rust-lang/triagebot/blob/HEAD/src/handlers/check_commits/no_mentions.rs).