You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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):
non-Go (mostly on github.com)
Go on github.com
Go on golang.org
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.
meirf
changed the title
x/build/cmd/gopherbot: reply to unversioned urls with permalink
gopherbot: reply to unversioned urls with permalink
May 11, 2018
I think gopherbot could even just edit the links inline. I can't think of a situation where a user would want a direct link to an unversioned line link.
FiloSottile
changed the title
gopherbot: reply to unversioned urls with permalink
x/build/cmd/gopherbot: reply to unversioned urls with permalink
May 11, 2018
Oh I didn’t know the github api allowed changing someone else’s post. That’s certainly a more concise alternative, albeit bit creepy to some people. (If you’re changing my urls, what else are you changing?)
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: