Cannot re-run a successful workflow run using the REST API

Hi!

I’ve recently came across what I believe is a limitation of the REST API for managing workflow runs (https://docs.github.com/en/rest/reference/actions#re-run-a-workflow).

I’ve tried re-running a successful workflow run using this endpoint, but I get this message

{
    "message": "This workflow run cannot be rerun",   
    "documentation_url": "https://developer.github.com/v3/actions/workflow_runs/#re-run-a-workflow"
}

I know it’s possible to re-run a workflow run directly from the GitHub UI, but it would be very nice if we could re-run workflows runs from the REST API too. Are there plans to remove this limitation?

2 Likes

Hi @tiagobento
We can re-run a workflow run directly from the GitHub UI, this is a new feature introduced on May 26, 2020. Currently the REST API does not support re-run a successful workflow, so i recommend that you could submit a feedback here. Thanks

If the reason is that I cannot rerun a successful one, then at least the message should state that, instead of just saying “cannot”.

1 Like