Fix potential error for repos with more than 30 workflows#139
Merged
ibakshay merged 1 commit intocontributor-assistant:masterfrom Sep 17, 2023
Merged
Conversation
Contributor
Author
|
Hey @ibakshay, any chance of getting eyes on this? Thanks! |
Member
I will do the review today. Thanks a lot for your contribution 🎉. I appreciate it very much! |
Member
|
@darrellwarde, I did a new release that has your changes 🎯 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I raised #135 a long time ago, but went down completely the wrong path when trying to diagnose the issue.
It turns out the issue is in
octokit.actions.listRepoWorkflows, backed by the list repository workflows API call. Upon reading this documentation, you see that the defaultper_pagevalue is 30.So, for repos with more than 30 workflows, there is a chance that the call would not return the desired workflow, and the error
Unable to locate this workflow's ID in this repository, can't trigger job..would occur.This PR uses the
total_countvalue to see if a subsequent call needs to be made, and will do this until all pages are exhausted. This has been tested in https://github.com/neo4j/graphql and the error no longer occurs.Additionally, the project was not building due to
Error: error:0308010C:digital envelope routines::unsupported. This is due to a deprecated version ofncc. This has been removed and replaced with@vercel/nccso that the project can build once again.I think this project has great promise, I hope we can get this fix merged and a new version released!