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

CI request: forbid @mentions in commit messages/descriptions #137990

Open
orlp opened this issue Mar 4, 2025 · 5 comments
Open

CI request: forbid @mentions in commit messages/descriptions #137990

orlp opened this issue Mar 4, 2025 · 5 comments
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@orlp
Copy link
Contributor

orlp commented Mar 4, 2025

I would much appreciate it if a CI step was added that checks for and forbids @mentions being included in commit messages/descriptions.

If such a commit is merged into the Rust repository, then you will receive an additional notification every single time this commit gets merged/replayed into any fork. It is incredibly frustrating, and can't be protected against (to my knowledge) by unfollowing the issue/PR as each merge consists of a completely new mention as far as Github is concerned, possibly from many different repositories. It is, essentially, an unintended spam amplification attack.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Mar 4, 2025
@Zalathar

This comment was marked as resolved.

@bjorn3
Copy link
Member

bjorn3 commented Mar 4, 2025

Bors already escapes @mentions in the PR description: rust-lang/homu#100

@bjorn3
Copy link
Member

bjorn3 commented Mar 4, 2025

I think this should not be a CI step, rather something rustbot posts. Doing it as CI step would break things if an @mention accidentally ends up in another repo that is included as subtree due to said repo not having this CI step and then a subtree sync is attempted.

@jieyouxu jieyouxu added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. C-feature-request Category: A feature request, i.e: not implemented / a PR. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Mar 4, 2025
@thaliaarchi
Copy link
Contributor

thaliaarchi commented Mar 6, 2025

Incidentally, I happen to be working on improving homu's escaping, because it overapproximates what GitHub considers a username. For example, punctuation handling is bad: @username, is escaped as `@username,`, instead of `@username`,. Also, they shouldn't be escaped when already within backticks. This doesn't improve the issue raised here, but the logic could probably be reused.

Edit: I've submitted that here:

@Urgau
Copy link
Member

Urgau commented Mar 7, 2025

I have taken the liberty to implemented such warning in triagebot (aka rustbot) in rust-lang/triagebot#1917.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature-request Category: A feature request, i.e: not implemented / a PR. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

7 participants