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

Allow up to 100 CI checks for CI status command #2704

Merged
merged 1 commit into from
Apr 4, 2022

Conversation

rjmunro
Copy link
Contributor

@rjmunro rjmunro commented Feb 1, 2021

I'm working on a project that has a complex CI setup, and uses more than 30 CI jobs. Sometimes hub ci-status would report success when it was still pending, which was very annoying, because it was only checking the first 30.

per_page=100 is used in many other queries, and is the maximum that is allowed without paging.

@rjmunro
Copy link
Contributor Author

rjmunro commented Feb 2, 2021

CI seems to be failing to on the hub fork command, possibly because the repo it is trying to fork has changed. It doesn't seem to be related to my change at all.

I'm working on a project that has a complex CI setup, and reaches more
than 30. Sometimes `hub ci-status` would report success when it was
still pending, which was very annoying.

per_page=100 is used in many other queries, and is the maximum that is
allowed without paging.
@rjmunro rjmunro force-pushed the increase-max-ci-statuses branch from f106450 to 63bdaa5 Compare March 28, 2022 15:54
@rjmunro
Copy link
Contributor Author

rjmunro commented Mar 28, 2022

I've rebased and force pushed now that CI is working again.

Copy link
Owner

@mislav mislav left a comment

Choose a reason for hiding this comment

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

Thank you! <3

@mislav mislav merged commit 363513a into mislav:master Apr 4, 2022
@rjmunro rjmunro deleted the increase-max-ci-statuses branch April 4, 2022 16:52
Copy link

@av1934413 av1934413 left a comment

Choose a reason for hiding this comment

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


Copy link

@av1934413 av1934413 left a comment

Choose a reason for hiding this comment

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

😀

@@ -565,7 +565,7 @@ func (client *Client) FetchCIStatus(project *Project, sha string) (status *CISta
}
sortStatuses()

res, err = api.GetFile(fmt.Sprintf("repos/%s/%s/commits/%s/check-runs", project.Owner, project.Name, sha), checksType)
res, err = api.GetFile(fmt.Sprintf("repos/%s/%s/commits/%s/check-runs?per_page=100", project.Owner, project.Name, sha), checksType)
if err == nil && (res.StatusCode == 403 || res.StatusCode == 404 || res.StatusCode == 422) {
return

Choose a reason for hiding this comment

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

  • [ ]

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