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: comment on bad subrepo issue references #50458

Open
prattmic opened this issue Jan 5, 2022 · 6 comments
Open

x/build/cmd/gopherbot: comment on bad subrepo issue references #50458

prattmic opened this issue Jan 5, 2022 · 6 comments
Labels
Builders x/build issues (builders, bots, dashboards) FeatureRequest NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@prattmic
Copy link
Member

prattmic commented Jan 5, 2022

Most subrepos track issues on golang/go, and thus require issue references in commit messages in the form golang/go#nnn, otherwise the reference will not work properly.

Gopherbot could detect raw #nnn issue references on subrepos and leave a comment suggesting changing them.

e.g., on https://golang.org/cl/375754, I put the wrong issue reference and didn't notice until after I submitted the CL.

@prattmic prattmic added the Builders x/build issues (builders, bots, dashboards) label Jan 5, 2022
@prattmic prattmic added this to the Backlog milestone Jan 5, 2022
@cherrymui
Copy link
Member

If you use the git-codereview tool, it automatically rewrites #nnn references on subrepos to golang/go#nnn.

@bcmills
Copy link
Contributor

bcmills commented Jan 6, 2022

That's true, but it is surprisingly easy to forget to install the git-codereview commit hooks when cloning the subrepos.

@prattmic
Copy link
Member Author

prattmic commented Jan 6, 2022

I'll put forth the (potentially controversial) opinion that any git-codereview hook fix/error should have a corresponding presubmit check on Gerrit.

There is no guarantee that everyone will use git-codereview, so enforcement on Gerrit is more consistent. Using git-codereview will then simply mean that these issues will be caught earlier, or fixed automatically for you.

@cherrymui
Copy link
Member

(I'm not saying we should not add the check, but just mentioning a "workaround" (otherwise I'd never remember to add "golang/go"))

forget to install the git-codereview commit hooks when cloning the subrepos.

Without the hooks it doesn't add the Change-ID. That's how I remembered to install the hooks.

@cagedmantis cagedmantis added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Jan 7, 2022
@cagedmantis
Copy link
Contributor

/cc @golang/release

@dmitshur
Copy link
Contributor

dmitshur commented Mar 9, 2022

forth the (potentially controversial) opinion that any git-codereview hook fix/error should have a corresponding presubmit check on Gerrit.

First bullet point of issue #18548 is related. (It also serves to show this isn't a controversial opinion—having such a check at the server level would be very nice, it just hasn't been implemented yet.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards) FeatureRequest 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

5 participants