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

x/build/maintner: Support additional label details #24444

Open
dmitshur opened this issue Mar 19, 2018 · 3 comments
Open

x/build/maintner: Support additional label details #24444

dmitshur opened this issue Mar 19, 2018 · 3 comments
Labels
Builders x/build issues (builders, bots, dashboards)
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Mar 19, 2018

Right now, maintner.GitHubLabel contains only the bare minimal information about labels: its id and name. Labels on GitHub have additional useful information, including:

  • color
  • description

Is it in scope of maintner.Corpus to add support for tracking that additional information?

If this is chosen to be done, it should be a tiny increase of file size and memory requirements, compared to what's needed fetching all the issues already. Labels change very little. This is assuming it is implemented efficiently, where each issue only contains the label ids, but the label details are stored in a separate map. I.e., you probably wouldn't want copies of "Used by googlebot to label PRs as having a valid CLA. The text of this label should not change." label description text to be stored alongside with each issue that has the cla: yes label applied.

I'm not yet closely familiar with how data is stored, so I don't know if the efficient implementation can be attained while modifying maintner.GitHubLabel to contain the extra fields (it'd be more friendly API if so), or if they'd have to be stored in a separate map and looked up by id by the user. But either way is okay.

(/cc @bradfitz @andybons This is maintner-related.)

@odeke-em odeke-em changed the title golang.org/x/build/maintner: Support additional label details. x/build/maintner: Support additional label details Mar 19, 2018
@gopherbot gopherbot added this to the Unreleased milestone Mar 19, 2018
@gopherbot gopherbot added the Builders x/build issues (builders, bots, dashboards) label Mar 19, 2018
@bradfitz
Copy link
Contributor

I never needed color and description is super new, but if you could use them, sure. Feel free to add.

@dmitshur
Copy link
Contributor Author

dmitshur commented Mar 19, 2018

I primarily want this to display the label colors (and maybe descriptions on hover) at goissues.org. If this is rejected, I can do it inside that particular project. But I think this would be generally useful.

It could also be used in maintserve when displaying issue labels.

If this is implemented in a way that preserves historical data and all changes to labels, this might be helpful for #24023, since it'd make it easier to track changes to label descriptions (and revert them if needed, etc.). (Edit: Now that I understand how maintner works better, I know that it'd be natural to preserve historical data. There'd be a mutation event for each time a label changes, and maintner keeps a history of all mutations.)

Some additional notes that may come in handy for implementation:


There are label events when labels are created, edited, or deleted. See https://developer.github.com/v3/activity/events/types/#labelevent (and github.LabelEvent).

To get label description information via go-github, we need google/go-github#856 to be resolved. There's already a PR that implements it and I can help make progress with getting it in.

@andybons
Copy link
Member

I think this would be useful for a bug triage dashboard I’ve been experimenting with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Builders x/build issues (builders, bots, dashboards)
Projects
None yet
Development

No branches or pull requests

4 participants