Issue
In the latest_artifacts.sh, the script tries to fetch all workflows from the given repository to extract the workflow ID of the dismiss stale approvals workflow.
If the given repository has more than 30 workflows (default page size), and the target workflow happens to be on one of the next pages, the script will fail and will always dismiss approvals, even if the code has not changed.
Solution
- Add a pagination loop to continue looking for the desired workflow, as long as there are more pages.
- Increase the page size to reduce the number of requests (optional)