I'm attempting to create a workflow that runs once in each of these cases:
- opening a PR containing a label
- adding a label to an existing PR
- pushing to a PR that contains a label
In many cases, when opening a PR containing the label in question, the action created from the pull_request.labeled
event in the workflow runs but does not show its status in the mergeability details view that lists all checks.
Here are a few examples:
Workflow: https://github.com/urcomputeringpal/actions-bug-repros/blob/main/.github/workflows/pr-labels.yml
To accomplish the required concurrency limiting and not run the action twice when opening a PR that contains the appropriate label at creation time, I'm using the following workflow concurrency settings:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
Affected PR: #2
In the above PR, you can see that a comment was made but no Action status is present in the mergeability detail view. Please note that this PR was run before the README.md conflicts existed.
To rule out any impact of the concurrency
key on this behavior, I duplicated the workflow without the concurrency limiting settings:
Affected PR: #2
In the above PR, you can see that two comments were made but only one Actions status is present in the mergeability detail view below. Why are the checks created by the pull_request.labeled
events not being associated with the PR? Please note that this PR was run before the README.md conflicts existed.
The following PR demonstrates that I can't reproduce this behavior at any time other than when adding the label
before creation of the PR: