Skip to content

Implement better pagination for our GitHub Actions #3662

Description

@roryabraham

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Context

Our GitHub Actions interact with the GitHub API but lack pagination.

Action Performed:

There's not super clear reproduction steps here, but when generating the QA/deploy checklist (always labeled StagingDeployCash), we need to cross-check the list of PRs and make sure we don't include PRs created by our CI/CD bot user, OSBotify. We do that here.

However, we only fetch the latest 100 PRs, while there may be more than 100 PRs merged between deploy cycles (especially including all the automated bot ones). As a result, we include some automated PRs in the deploy checklist, which we do not want to do.

Expected Result:

We need to fetch all PRs between the oldest merged PR from the list passed in here and the newest PR. We can do that by fetching 100 PRs from the API at a time, until the oldest PR we have from the API is older than the oldest PR we were passed in.

Actual Result:

We don't fetch more than 100 results.

Workaround:

Ignore or manually delete automated PRs from the deploy checklist.

Platform:

Where is this issue occurring?

GitHub only.

view the job on upwork here.

View all open jobs on Upwork

Activity

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

Metadata

Metadata

Labels

ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions