Exclude non-moderated issues from the lists by default
Maybe we should exclude non-moderated issues by default from lists, and maybe add new filter ? just to avoid lot of noises?
- homepage: https://webcompat.com/
- list: https://webcompat.com/issues?page=1&per_page=50&state=open&stage=all&sort=created&direction=desc
See #3145 - we'll keep unmoderated issues in needstriage, but there will be a label we can exclude them with.
@magsout in #3145 I added the keyword action-needsmoderation
@magsout in #3145 I added the keyword
action-needsmoderation
This is landed in master now.
@miketaylr o cool, thanks. I'll take a look.
https://webcompat.com/issues we need to filter these out.
@karlcow what's the best case:
- added a select?
- excluded by default without no element?
exclude by default. It's useless for the people who checks the website. Later on we could open an issue on how many bugs are in the moderation queue, if we feel so.
@karlcow how does it work. How i can use the keywords action-needsmoderation in the request to avoid issues in moderation? I have to use the param q ?
@karlcow how does it work. How i can use the keywords
action-needsmoderationin the request to avoid issues in moderation? I have to use the paramq?
Looking at the code, it's slightly confusing: https://github.com/webcompat/webcompat.com/blob/ed96b3d8169babd0d1260a638283b7f4bbee3bb8/webcompat/static/js/lib/models/issue.js#L153
So that's saying the URL is constructed here:
https://github.com/webcompat/webcompat.com/blob/ed96b3d8169babd0d1260a638283b7f4bbee3bb8/webcompat/static/js/lib/issue-list.js#L347-L351
It's maybe enough to add a q param there with something like "-label:action-needsmoderation"?
But I think we also need to check we're not overwriting the q param used during search in https://github.com/webcompat/webcompat.com/blob/ed96b3d8169babd0d1260a638283b7f4bbee3bb8/webcompat/static/js/lib/issue-list.js#L342
https://github.com/webcompat/webcompat.com/blob/ed96b3d8169babd0d1260a638283b7f4bbee3bb8/webcompat/static/js/lib/models/issue.js#L281
(this code is such a mess at this point 😓)
@miketaylr -label:action-needsmoderation it is what i'm looking for. thanks.
Im' a bit confused about the code (because of me, not the code), but if I understand. Right now, there are conditions:
this first condition https://github.com/webcompat/webcompat.com/blob/6e220dd777539877ecb10a8715b77445a112d445/webcompat/static/js/lib/issue-list.js#L311
So, I writed something like that in doGitHubSearch():
params.q = params.q
? `${params.q} -label:action-needsmoderation`
: "-label:action-needsmoderation";
It's working only when the user added query param. But it's a good start (I guess?).
So after that I thought it was better to remove the queryMatch in the test if (!this._isLoggedIn && queryMatch) { because of the condition in the endpoint https://github.com/webcompat/webcompat.com/blob/6e220dd777539877ecb10a8715b77445a112d445/webcompat/api/endpoints.py#L84 But I don't know if it's a good thing using the API of github every times a user is not logged, maybe there is a limite rate?
It seems there is a bug, because sometimes the local api is fetch http://127.0.0.1:5000/api/issues?page=1&per_page=50&state=open&stage=all&sort=created&direction=desc I need to figure out why.
Second case, if the user is logged, I can't test right now, I get again an error when I tried to log in.
Or we could modify this
https://github.com/webcompat/webcompat.com/blob/745537d9d62acd2939eaeeb0fbee2d3cedbf9289/webcompat/api/endpoints.py#L120-L135
so that we only return the results for a modified needstriage list (without the action moderation) when we are requesting /issues/category/needstriage.
Note that this is the list we want to address:
https://github.com/webcompat/web-bugs/issues?q=is%3Aopen+is%3Aissue+milestone%3Aneedstriage+-label%3Aaction-needsmoderation+
not the stage=all but only the milestone%3Aneedstriage
So I tried to test the API with
https://api.github.com/repos/webcompat/webcompat-tests/issues?milestone=1&-labels=action-needsmoderation
and the API doesn't understand the -.
One way to pull this out would be to create a new milestone for moderation.
We can't also say everything but webcompat-bot…
and I also tried with GraphQL without success too. Because GraphQL has similar limitations.
(on the other hand GraphQL would be super practical to get only what we want when we have a positive query).
I didn't try the search API yet. And we could try where we do the filtering ourselves. All the issues we receive we remove the ones with the label action-needsmoderation.
I didn't try the search API yet.
I think it's only possible via the Search API.