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/gerritbot: gerritChangeRE doesn't match Gerrit repository names with dashes #37725

Closed
dmitshur opened this issue Mar 7, 2020 · 1 comment
Labels
Builders x/build issues (builders, bots, dashboards) FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Mar 7, 2020

The regexp currently uses \w+ to match a Gerrit repository name. That expands to:

\w+ matches any word character (equal to [a-zA-Z0-9_])

Dashes aren't a part of \w, so a Gerrit repository with a dash won't get recognized, and gerritbot won't be able to post comments when importing PRs from it.

This is affecting the new vscode-go repository, but also some existing ones (sublime-config, grpc-review, etc.).

The fix is trivial, just update the regexp to also accept a dash character. I'll also add a test that any future repository names are matched too.

/cc @cagedmantis @toothrot @hyangah @stamblerre

@dmitshur dmitshur added the NeedsFix The path to resolution is known, but the work has not been done. label Mar 7, 2020
@dmitshur dmitshur added this to the Unreleased milestone Mar 7, 2020
@dmitshur dmitshur self-assigned this Mar 7, 2020
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Mar 7, 2020
@gopherbot
Copy link

Change https://golang.org/cl/222437 mentions this issue: cmd/gerritbot: allow dash in gerritChangeRE

@golang golang locked and limited conversation to collaborators Mar 9, 2021
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 NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

2 participants