diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2023-01-04 07:30:12 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-04 07:30:12 -0500 |
commit | 7793b9c3bfe75b3649518ec78954a80b3e33bd38 (patch) | |
tree | a1261bbc0325351c83bfc453a98fed25bf6160d3 | |
parent | 7ef8695b3a78d04cef6d3d3457e7586b71c232da (diff) |
Switch to actions/labeler@v4 for labeling PRs. (#14203)
This has a number of advantages:
- It allows us to make PR labeling event-driven instead of polling.
This, in turn, means that it only runs when a PR is modified, and only
evaluates that specific PR, which results in spending far less time
running PR labeler jobs.
- This is the ‘official’ way to handle PR labels automatically as code,
and thus Ilya will no longer need to maintain a custom labeling action
for this purpose.
- The matching syntax supported by this action is more expressive than
what is supported by our existing infrastructure, allowing for things
sucha s requring all of a group of files to be modified in a PR for it
to have a specific label applied. We have no need right now for this,
but it is useful to have it available long-term.
- Because the labeling is PR-triggered, it shows up in the PR checks, so
we can more easily see if auto-labeling has run for a given PR or not.
-rw-r--r-- | .github/workflows/labeler.yml | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 0854080a70..2b8b41fcb0 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -2,17 +2,20 @@ # Handles labelling of PR's. name: Pull Request Labeler on: - schedule: - - cron: '*/10 * * * *' -env: - DISABLE_TELEMETRY: 1 + pull_request_target: null +concurrency: + group: pr-label-${{ github.ref }} + cancel-in-progress: true jobs: labeler: + name: Apply PR Labels runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - - uses: docker://docker.io/ilyam8/periodic-pr-labeler:v0.1.0 + - uses: actions/labeler@v4 if: github.repository == 'netdata/netdata' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - GITHUB_REPOSITORY: ${{ github.repository }} - LABEL_MAPPINGS_FILE: .github/labeler.yml + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true |