Add labels in needsdiagnosis endpoint
magsout opened this issue · comments
Message from @miketaylr
One thing
that would be very interesting is to pull out the firefox issues from
the needsdiagnosis dashboard. Maybe one line (current approach) for all
issues, and another line for only Firefox issues.
I think we can add labels like we do for needstriage endpoint on webcompat https://webcompat.com/api/issues/category/needstriage ?
How many labels?
For me, I think it would be good to know engine-gecko
vs everything else. But I can see the main browsers being listed being an interesting data point (maybe?). I just wonder about noise.
@miketaylr all? for now we just handle firefox and we will see in the future if we want to handle others browsers.
@magsout @miketaylr could you clarify a bit. currently needsdiagnosis endpoint doesn't count anything, we give a list of
timestamp
raw number of issues
at this time in the needsdiagnosis milestone.
Do you suggest we record the raw number of issues for a specific label?
I don't even know if it's possible. Let's check
- The issues endpoint doesn't provide this information even in the HTTP headers.
https://api.github.com/repos/webcompat/web-bugs/issues?milestone=3&labels=engine-gecko - The milestone endpoint doesn't have the notion of parameters for search
https://api.github.com/repos/webcompat/web-bugs/milestones/3
So basically we can't do it except if we count ourselves (go through the pagination), that requires a bit more code and failure handling.
Do you suggest we record the raw number of issues for a specific label?
Yeah, that would be ideal, if possible.
I'm trying to figure out this one.
- The repository issues events list is limited in pagination. For example, as of today, https://api.github.com/repositories/17914657/issues/events?page=1333 the oldest event is 3 months old. 2019-02-25T19:27:58Z All events prior to this are lost.
- On the other hand, the events list for all individual issues seems to be one or two pages long. Example https://api.github.com/repositories/17914657/issues/20000/events
- Webhook: There is a notion of issues events for webhook https://developer.github.com/v3/activity/events/types/#issuesevent with keywords
milestoned
anddemilestoned
. We can imagine that when the issue enter in milestone needsdiagnosis, the label forbrowser-*
orengine-gecko
have been already set. So we could have a webhook listening to these event ofcoming in needsdiagnosis
andgoing out of needsdiagnosis
, then fetch the issue description to know its labels. Not necessary very cool and relies on successful fetch at each webhook POST.
ok maybe the solution is to have a single request every x hours to https://api.github.com/search/issues?q=is:open+is:issue+milestone:needsdiagnosis+label:engine-gecko+repo:webcompat/web-bugs
This will return a paginated list of issues but also total_count
. Today 95 issues with engine-gecko
. Maybe this is the simplest. Timestamp in the DB with the count.