webcompat / webcompat-metrics-server

Server in charge of delivering different data to the webcompat-metrics-client
Mozilla Public License 2.0
6 stars 5 forks source link

Add labels in needsdiagnosis endpoint #102

Open magsout opened 5 years ago

magsout commented 5 years ago

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 ?

miketaylr commented 5 years ago

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.

magsout commented 5 years ago

@miketaylr all? for now we just handle firefox and we will see in the future if we want to handle others browsers.

Capture d’écran 2019-05-06 à 17 15 41

karlcow commented 5 years ago

@magsout @miketaylr could you clarify a bit. currently needsdiagnosis endpoint doesn't count anything, we give a list of

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

  1. 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
  2. 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.

miketaylr commented 5 years ago

Do you suggest we record the raw number of issues for a specific label?

Yeah, that would be ideal, if possible.

karlcow commented 5 years ago

I'm trying to figure out this one.

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.