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

in activity feed, combine repo path and issue/change prefix into full import path #26

Closed
dmitshur opened this issue Jul 1, 2019 · 1 comment

Comments

1 participant
@dmitshur
Copy link
Member

commented Jul 1, 2019

The activity feed on the index page of dmitri.shuralyov.com shows events, such as:

image

Right now, the following 2 pieces of information are displayed separately:

  1. the repository it happened in ("github.com/golang/go" in the screenshot above)
  2. the title of the issue or change ("x/build/cmd/coordinator: fails ..." in the screenshot above)

I'm working primarily with Go, and the Go project has a well established convention for including the package as a prefix before the title, e.g., "net/http: add StatusTooEarly (425)". (It makes sites like goissues.org possible.) Additionally, many Go packages have vanity import paths that differ from the repository path that they're contained in, which we can find out relatively easily from go.mod files (see commit shurcooL/events@5bd98dd).

It's possible to use that information to compute the full import path of the affected Go package. Displaying that will be more readable and streamlined.

Screenshots

Example 1

For example, instead of seeing the repo and prefix on separate lines:

image

We can combine them and show:

image

Example 2

Instead of having to read "proxy:" before seeing that it's the x/net subrepo:

image

We can combine into a more readable "x/net/proxy" import path:

image

Example 3

Instead of:

image

We can also include a snippet from the issue description body:

image

Example 4

This applies to third-party Go packages too. Instead of:

image

We can show the correct vanity import path of that project:

image

@dmitshur dmitshur added the enhancement label Jul 1, 2019

@dmitshur dmitshur self-assigned this Jul 1, 2019

@dmitshur dmitshur changed the title when showing events, combine repo path and issue/change prefix into import path in activity feed, combine repo path and issue/change prefix into full import path Jul 1, 2019

@dmitshur

This comment has been minimized.

Copy link
Member Author

commented Jul 1, 2019

This change is implemented and live on dmitri.shuralyov.com now! 🚀

I'm going to take some time before merging the code to master, to make sure everything looks good in production, decide where to place a new package, review and clean it up some more, and then push.

dmitshur added a commit to shurcooL/events that referenced this issue Jul 5, 2019

event, githubapi: set Event.Container to full import path
Parse the prefixed issue/change title to compute the full import path
of the affected package, and use that as the Event.Container value for
issue, change, and commit comment events.

For other event types, Event.Container continues to be the module path
corresponding to the repository root.

Documentat that the Create.Description field is optional.

Updates shurcooL/home#26.

dmitshur added a commit to shurcooL/events that referenced this issue Jul 5, 2019

event, fs, githubapi: add body for issue/change open events
For these event types, having just the title is insufficient
for getting a good idea of what the new issue/change is about.
Start tracking the description body as well.

Updates shurcooL/home#26.

dmitshur added a commit to shurcooL/issues that referenced this issue Jul 5, 2019

@dmitshur dmitshur closed this in 1718d87 Jul 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.