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

Fixes #2732 - Makes the right number of needstriage requests on webcompat webpage #2737

Merged
merged 2 commits into from
Dec 17, 2018

Conversation

marimeireles
Copy link
Member

Github will fetch 30 issues by default as shown here. Adding + '?per_page=5' to the API request fixes it.

@marimeireles marimeireles requested a review from karlcow December 13, 2018 13:48
@marimeireles marimeireles changed the title Makes the right number of needstriage requests on webcompat webpage Fixes #2732 - Makes the right number of needstriage requests on webcompat webpage Dec 13, 2018
Copy link
Member

@karlcow karlcow left a 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.

untriaged.NeedsTriageCollection = Backbone.Collection.extend({
model: issues.Issue,
url: "/api/issues/category/needstriage"
});

@marimeireles @miketaylr What do you think?

@marimeireles
Copy link
Member Author

I think you're right. Makes sense.

@marimeireles
Copy link
Member Author

marimeireles commented Dec 15, 2018

When I changed the untriaged.js file it generated a new hash to make the requisition on test mode.
So I had to create a new file on tests/fixtures/api/category to send the issues when requested.

Copy link
Member

@karlcow karlcow left a 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. 🍏

@miketaylr
Copy link
Member

@marimeireles @miketaylr What do you think?

Sorry for the late response, but yes, I agree!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants