Skip to content

Commit

Permalink
chore: fix pr labeler workflow does not trigger auto-approval (#4167)
Browse files Browse the repository at this point in the history
The pr labeler workflow must run as the automation user and not the github-actions bot in order to trigger other workflows. This is an intentional limitation by GitHub.

---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
  • Loading branch information
mrgrain committed Jul 3, 2023
1 parent 28b192a commit 6c4309e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,7 @@ jobs:
steps:
- run: gh pr edit ${{ github.event.pull_request.number }} --add-label "auto-approve" -R ${{ github.repository }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# This workflow is intended to trigger the `auto-approve` workflow by adding a label to the PR
# In order for this to happen, it must run as the automation user and not the github-actions bot
# It is an intentional limitation by GitHub that the github-actions bot (identified by using `secrets.GITHUB_TOKEN`) cannot trigger other workflows
GITHUB_TOKEN: ${{ secrets.PROJEN_GITHUB_TOKEN }}

0 comments on commit 6c4309e

Please sign in to comment.