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

x/build/cmd/gopherbot: don't mark issues as fixed if the “fix” verb is part of a larger sentence #46081

Closed
bcmills opened this issue May 10, 2021 · 2 comments
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented May 10, 2021

Gopherbot attempted to close #45999 in response to CL 317300, for which the commit message included this fragment:

If we fix #45999, we will be able to make these error checks more
precise.

No human fluent in English would construe that sentence as intending to “fix #45999”, so Gopherbot shouldn't parse it that way either. One simple heuristic might be to ignore the word “fix” if it is not the first word on the line (or perhaps the first word in its sentence.)

CC @golang/release

@bcmills bcmills added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label May 10, 2021
@bcmills bcmills added this to the Unreleased milestone May 10, 2021
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label May 10, 2021
@dmitshur
Copy link
Contributor

dmitshur commented May 10, 2021

This behavior is implemented by GitHub and not GopherBot per se. See https://docs.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword and https://github.blog/2013-01-22-closing-issues-via-commit-messages/. (The reason it looks like GopherBot did it in the UI is because its GitHub account is used during mirroring of commits from go.googlesource.com/go to github.com/golang/go, but the issue closing behavior is implemented on GitHub's backend.)

This GitHub behavior has been this way for years, and I've observed some intentional edge case uses of it (such as writing "likely fixes #nnn" with the intention of the issue still getting closed, and later reopened if turns out more is needed). To avoid an issue being closed, the exact phrase needs to be avoided.

I don't think it's feasible for us to fix.

@dmitshur
Copy link
Contributor

dmitshur commented May 10, 2021

Closing but let me know if I missed something or if this needs more discussion.

@golang golang locked and limited conversation to collaborators May 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

3 participants