When the workflow file in a repository is renamed, the GitHub CLI will choke on listing workflow runs:
++ gh run list --status=success --branch=main --workflow=CI --event=push --json=databaseId --limit=1 -q '.[] | .databaseId'
could not resolve to a unique workflow; found: ci.yaml pr-ci.yaml
This PR changes the logic to determine the --workflow argument. Instead of using the human readable workflow name, we can use the filename of the workflow to make gh happy.
When the workflow file in a repository is renamed, the GitHub CLI will choke on listing workflow runs:
This PR changes the logic to determine the
--workflow
argument. Instead of using the human readable workflow name, we can use the filename of the workflow to makegh
happy.