Open garyd203 opened 1 year ago
We also see this in our setup. Here we retroactively label the pull request if necessary, in turn triggering the action.
pull_request:
branches:
- dev
- prod
types:
# Default options
- opened
- reopened
- synchronize
# Allows using a label to have the check pass on breaking changes
- labeled
- unlabeled
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Describe the bug
We've integrated the Inspector action into our GitHub pull request workflow (it's been working well - thank you đ ). However, if multiple GitHub Action runs reference the same git commit [*], then the Inspector action for subsequent runs will incorrectly use the first run. This affects looking up the
approve-label
on the PR, and posting the check to the PR.[*] We use the git-flow workflow, so we will push a first PR (with a GitHub Actions run) to our development branch (with a second GitHub Actions run after merge), and then from time to time create a PR (with a third GitHub Actions run) merging the development branch into the deployment branch (with yet another GitHub Actions run). Because the 3rd run is on a PR that uses the same commit as the 2nd run, then breaking changes get blocked by the Inspector action, even if we set the
approved-breaking-change
label on the PRTo Reproduce
if: github.base_ref != ''
on the step)branch1
, wait for the GitHub Actions run to finishbranch1
tobranch2
.Expected behavior
The Inspector action should look up the run based on the GitHub Actions run ID, not based on the git commit.
Environment:
@graphql-inspector/...
: N/Agraphql
: N/AAdditional context