I would like to automate something that I currently do manually via the web UI: re-run the workflow for a given commit.
In the UI I click on the green/red checkmark behind the commit, and then the “rerun all jobs” button. But I am running into two problems when doing this with the API:
GET /repos/:owner/:repo/commits/:ref/check-runsapi returns general check-run-id’s (also for non-gha checks) but we need an GHA
run_id. There is another api to get recent GHA runs, however I can’t find a way to get the
run_idfor a given commit. Is there a way to get the GHA
run_idfrom a given commit ?
POST /repos/:owner/:repo/actions/runs/:run_id/rerunyou get a 403 permission denied error when trying to re-run a workflow that has previously succeeded? This is strange because this is now allowed in the UI (it wasn’t possible a while ago). Is it on purpose that you cannot rerun a succesful workflow?