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

Make sure to fetch all the labels from Github #122

Merged
merged 1 commit into from Nov 13, 2020

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Nov 13, 2020

Wohoo. I found a bug.

When we asked Github for all the labels on symfony/symfony, we just got the 20 first ones. This PR will fix that.

@@ -75,6 +75,8 @@ services:

Github\Api\Issue\Labels:
factory: ['@Github\Api\Issue', labels]
calls:
- ['setPerPage', [100]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're telling the Labels API to return 100 results but we're also using ResultPager to fetch all the results? That seems potentially redundant - are we doing it just to be safe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We currently have 87 labels. If we add 14 more this will be a silent error. So yes, the ResultPager is not really needed at the moment.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, The ResultPager is just making extra requests for us.

If we left this as (default) 20, the Result pager would make 5 request.

@weaverryan weaverryan merged commit c9b68e4 into symfony-tools:master Nov 13, 2020
@Nyholm Nyholm deleted the fetch-all-labels branch November 13, 2020 18:30
@Nyholm
Copy link
Member Author

Nyholm commented Nov 13, 2020

Thank you for merging

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

Successfully merging this pull request may close these issues.

None yet

2 participants