Skip to content

x/build/cmd/gopherbot: reply to unversioned urls with permalink #25345

Description

@meirf

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):

  1. non-Go (mostly on github.com)
  2. Go on github.com
  3. 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.

The message could be something like:

@andybons @bradfitz

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Buildersx/build issues (builders, bots, dashboards)FeatureRequestIssues asking for a new feature that does not need a proposal.

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions