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

Github sometimes closes issues that have been re-opened #130817

Open
RalfJung opened this issue Sep 25, 2024 · 4 comments
Open

Github sometimes closes issues that have been re-opened #130817

RalfJung opened this issue Sep 25, 2024 · 4 comments
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Comments

@RalfJung
Copy link
Member

RalfJung commented Sep 25, 2024

When a commit contains the magic words Fixes #xxx, if that commit gets pushed to a repo by someone with permissions to close rust-lang issues, the issue will be closed. (I don't know the exact requirements, but it's something like this.) When a PR has these magic words in the PR description, that gets added to the merge commit message, and causes the same issue. This can lead to accidental issue closure when such a commit gets merged into our repo, then the issue gets reopened, and then the commit gets pushed somewhere.

I've seen this a few times over the last years. The most recent one is #102048.

@rust-lang/infra is there anything we can do here? Like disable the "auto close based on commit message" feature (but keep it for PR descriptions!)? If not, maybe this could be added to the wishlist for the next meeting you have with Github people.

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Sep 25, 2024
@y21
Copy link
Member

y21 commented Sep 25, 2024

This has also happened a few times during a clippy subtree update which has commits that reference issues in the clippy repo but happen to have the same issue number as open issues here. #12695 is one such case

@jdno
Copy link
Member

jdno commented Sep 25, 2024

I've raised this via GitHub's support (thus not our call with them) a while back and they were aware of the issue. But there isn't a way to prevent this (afaik) and GitHub didn't seem confident that it would be fixed anytime soon. But we can flag this in our calls again...

@marcoieni
Copy link
Member

marcoieni commented Sep 25, 2024

One thing we could do is having a github actions/app that analyzes the commit messages of a PR and prevents patterns like fixes #\d . There are other patterns like "close", "closes", "fix", etc.

People would need to force push to change the commit message.

@saethlin saethlin added T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Sep 25, 2024
@nikic
Copy link
Contributor

nikic commented Sep 25, 2024

I think this can even happen when the commit is in a private repo, in which case the GitHub UI has no indication that the issue was actually closed due to a commit reference.

@jieyouxu jieyouxu added the A-meta Area: Issues & PRs about the rust-lang/rust repository itself label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-meta Area: Issues & PRs about the rust-lang/rust repository itself 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

8 participants