fgrosse / go-coverage-report

A CLI tool and GitHub Action to post Go code coverage reports as comment to your pull requests.
BSD 3-Clause "New" or "Revised" License
59 stars 11 forks source link

Use github.workflow_ref to fix issues when workflow files are renamed #41

Closed fgrosse closed 2 months ago

fgrosse commented 2 months ago

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.