-
Notifications
You must be signed in to change notification settings - Fork 203
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
Fixes #2732 - Makes the right number of needstriage requests on webcompat webpage #2737
Conversation
a4e1157
to
bae6c7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will work indeed, but I have the feeling that this is not the right place to do it. By modifying the enpoint response, we are limiting the generic usage of the endpoint (if we want to reuse it somewhere else). The homepage list is controlled by the script untriaged.js
, which is the one calling the API endpoint.
So probably this modification should be done here instead of the API endpoint.
webcompat.com/webcompat/static/js/lib/untriaged.js
Lines 8 to 11 in 208d66c
untriaged.NeedsTriageCollection = Backbone.Collection.extend({ | |
model: issues.Issue, | |
url: "/api/issues/category/needstriage" | |
}); |
@marimeireles @miketaylr What do you think?
I think you're right. Makes sense. |
bae6c7c
to
d26c2fd
Compare
When I changed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @marimeireles !!! Good low hanging fruit. 🍏
Sorry for the late response, but yes, I agree! |
Github will fetch 30 issues by default as shown here. Adding
+ '?per_page=5'
to the API request fixes it.