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 potential error for repos with more than 30 workflows #139

Conversation

darrellwarde
Copy link
Contributor

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 default per_page value 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_count value 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 of ncc. This has been removed and replaced with @vercel/ncc so 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!

@darrellwarde
Copy link
Contributor Author

Hey @ibakshay, any chance of getting eyes on this? Thanks!

@ibakshay
Copy link
Member

Hey @ibakshay, any chance of getting eyes on this? Thanks!

I will do the review today. Thanks a lot for your contribution 🎉. I appreciate it very much!

Copy link
Member

@ibakshay ibakshay left a comment

Choose a reason for hiding this comment

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

💯

@ibakshay ibakshay merged commit 6b3a4e0 into contributor-assistant:master Sep 17, 2023
4 checks passed
@ibakshay
Copy link
Member

@darrellwarde, I did a new release that has your changes 🎯

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.

2 participants