contributor-assistant / github-action

CLA Assistant GitHub Action
Apache License 2.0
281 stars 93 forks source link

Fix potential error for repos with more than 30 workflows #139

Closed darrellwarde closed 1 year ago

darrellwarde commented 1 year ago

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 commented 1 year ago

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

ibakshay commented 1 year ago

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!

ibakshay commented 1 year ago

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