x/build/cmd/gopherbot: reply to unversioned urls with permalink #25345
Labels
Builders
x/build issues (builders, bots, dashboards)
FeatureRequest
Issues asking for a new feature that does not need a proposal.
Milestone
It seems to be a frequent occurrence that non-versioned github urls with line numbers are included in issues. These links make investigations more time consuming when code inevitably changes.
The problematic pattern is:
https://github.com/<repo>/blob/master.+#L\d+
Example: https://github.com/golang/go/blob/master/src/mime/multipart/formdata.go#L78
I would guess that a quarter of these match that pattern.
Let's say there are 3 primary categories of non-versioned code urls with line number(s):
3 is very much in our control and is discussed in #14062.
1 and 2 are harder to control. A solution could be gopherbot replying to new issues that match the pattern with a permalink that included the latest commit when the issue was created. (Another solution is to have the new issue template suggest a versioned url for any non-playground code.)
To avoid spam, maybe this would only respond to the body of a new issue - not any comments.
The message could be something like:
@andybons @bradfitz
The text was updated successfully, but these errors were encountered: