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

fix: look beyond first page of repo workflows #199

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

pmrotule
Copy link
Contributor

@pmrotule pmrotule commented Nov 3, 2023

Closes #198

I hope you'll like my solution! I tested it already and it fixed the issue in our case where the workflow was found in the second page of results.

@Codex-
Copy link
Owner

Codex- commented Nov 21, 2023

Thanks for submitting this PR!

Octokit actually provides a way to iterate over pages, we should probably adopt that method, an example is here:
https://github.com/Codex-/knip-reporter/blob/main/src/api.ts#L51

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (78fb303) 99.24% compared to head (c7b1887) 99.31%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #199      +/-   ##
==========================================
+ Coverage   99.24%   99.31%   +0.06%     
==========================================
  Files           3        3              
  Lines         399      435      +36     
  Branches       50       53       +3     
==========================================
+ Hits          396      432      +36     
  Misses          3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pmrotule
Copy link
Contributor Author

Thanks for submitting this PR!

Octokit actually provides a way to iterate over pages, we should probably adopt that method, an example is here: https://github.com/Codex-/knip-reporter/blob/main/src/api.ts#L51

Great stuff! I wasn't aware of it. I'll quickly make the change.

@pmrotule pmrotule force-pushed the fix/repo-workflows-pagination branch 2 times, most recently from 2c13b69 to b3c4c42 Compare November 21, 2023 18:42
@Codex-
Copy link
Owner

Codex- commented Nov 22, 2023

Tests failing, the tests can be tricky, if you're happy to wait I can try address them on Friday or you can see how I handled testing against this in the knip-reporter repository and update the tests

@pmrotule pmrotule force-pushed the fix/repo-workflows-pagination branch from b3c4c42 to 9bf5558 Compare November 22, 2023 14:59
@pmrotule
Copy link
Contributor Author

Tests failing, the tests can be tricky, if you're happy to wait I can try address them on Friday or you can see how I handled testing against this in the knip-reporter repository and update the tests

Should be good now. There was also an issue with the token so I assumed it's because I'm the one who pushed the commit and I don't have the right access. I didn't push the update on the bundle this time. Feel free to take it from there.

Copy link
Owner

@Codex- Codex- 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 so much for your work on this, hugely appreciated

@Codex- Codex- merged commit 0f1ab23 into Codex-:main Nov 23, 2023
6 of 7 checks passed
@pmrotule pmrotule deleted the fix/repo-workflows-pagination branch November 24, 2023 13:18
@pmrotule
Copy link
Contributor Author

@Codex- Just so you know, it seems like the v1 tag was not yet updated to the latest version 1.12.0.

@Codex-
Copy link
Owner

Codex- commented Nov 29, 2023

Ah I see, it rejected when I did it originally, fixed now! Thanks for pointing that out @pmrotule

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.

Only looks at the first 30 workflows found in the repository
3 participants