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

Gerrit: references to GitHub PRs should be linkified for all valid GitHub repo names, even ones with a dash character #39181

Open
stamblerre opened this issue May 20, 2020 · 5 comments

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented May 20, 2020

Currently, mirrored PRs only have short references to the original PR, not actual links (for example, https://golang.org/cl/234717). This makes it difficult to navigate between the two. The golang/go#1234 links should be made clickable like links to issues.

@gopherbot gopherbot added the Builders label May 20, 2020
@gopherbot gopherbot added this to the Unreleased milestone May 20, 2020
@cagedmantis
Copy link
Contributor

@cagedmantis cagedmantis commented May 21, 2020

@dmitshur
Copy link
Member

@dmitshur dmitshur commented May 21, 2020

This already works for most repositories. For example, CL 234658 was imported from #39176, and Gerrit correctly linkifies the PR mention:

image

image

I suspect there's regexp pattern used to match these, and the pattern currently rejects repository names like "vscode-go" that contain dashes. We should update the pattern in Gerrit to match all valid GitHub repository names.

@dmitshur dmitshur changed the title x/build/cmd/gerritbot: CLs mirrored from PRs should have links back to the PR Gerrit: references to GitHub PRs should work for all valid GitHub repo names, even ones with a dash character May 21, 2020
@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented May 21, 2020

Ah, thanks you're just ahead of me. I had just noticed that issues were also not getting links, but gopherbot's cl2issues task worked fine. Where is the regex defined?

@dmitshur dmitshur changed the title Gerrit: references to GitHub PRs should work for all valid GitHub repo names, even ones with a dash character Gerrit: references to GitHub PRs should be linkified for all valid GitHub repo names, even ones with a dash character May 21, 2020
@dmitshur
Copy link
Member

@dmitshur dmitshur commented May 21, 2020

I don't know exactly without first looking more, but it should be somewhere in the repository's Gerrit configuration. E.g., see https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#commentlink.name.match.

@andybons
Copy link
Member

@andybons andybons commented May 23, 2020

It’s in an internal gerrit.config file specific to the Go host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.