2021-05-25 00:11:37 +03:00
|
|
|
name: "Pull Request Labeler"
|
|
|
|
on:
|
2021-06-12 01:58:05 +03:00
|
|
|
pull_request_target:
|
2024-01-04 18:15:01 +03:00
|
|
|
types: [opened, synchronize, reopened, labeled, unlabeled]
|
2024-07-02 21:55:12 +03:00
|
|
|
branches: [main, next, release/**/*]
|
2021-05-25 00:11:37 +03:00
|
|
|
|
2024-01-27 01:10:16 +03:00
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
|
|
|
|
2021-05-25 00:11:37 +03:00
|
|
|
jobs:
|
2024-01-04 18:15:01 +03:00
|
|
|
areas_label:
|
2021-05-25 00:11:37 +03:00
|
|
|
runs-on: ubuntu-latest
|
2024-01-04 18:15:01 +03:00
|
|
|
name: Label areas
|
2023-07-20 18:47:32 +03:00
|
|
|
# Skip labeling main-next merge PRs. The area labels are noisy and distracting for main-next PRs because they can
|
|
|
|
# contain many commits, and thus touch nearly the whole repo in a single commit. Skipping these labels makes it
|
|
|
|
# easier to focus on the more relevant main-next labels.
|
2023-07-24 19:47:34 +03:00
|
|
|
#
|
|
|
|
# This is implemented by comparing the PR title because at creation time, the PR has no labels (and the GItHub API
|
|
|
|
# does not have a way to set labels at creation either), so skipping based on labels does not work.
|
2021-05-25 00:11:37 +03:00
|
|
|
steps:
|
2023-01-25 03:10:14 +03:00
|
|
|
- uses: actions/labeler@5c7539237e04b714afd8ad9b4aed733815b9fab4 # ratchet:actions/labeler@v4.0.2
|
2023-07-25 00:26:02 +03:00
|
|
|
if: "github.event.pull_request.title != 'Automation: main-next integrate'"
|
2022-05-23 22:07:00 +03:00
|
|
|
with:
|
2024-01-04 18:15:01 +03:00
|
|
|
configuration-path: ".github/labeler-areas.yml"
|
2023-04-12 20:56:03 +03:00
|
|
|
repo-token: "${{ github.token }}"
|
2022-05-23 22:07:00 +03:00
|
|
|
sync-labels: true # add/remove labels as modified paths in the PR change
|
2024-01-04 18:15:01 +03:00
|
|
|
# Changes to some paths should automatically add the changeset-required label. This label is often added manually, so
|
|
|
|
# this CI job calls the labeler action wuth sync-labels=false, so the label won't be removed automatically.
|
|
|
|
changesets_label:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Label changeset-required
|
|
|
|
steps:
|
|
|
|
- uses: actions/labeler@5c7539237e04b714afd8ad9b4aed733815b9fab4 # ratchet:actions/labeler@v4.0.2
|
|
|
|
with:
|
|
|
|
configuration-path: ".github/labeler-changesets.yml"
|
|
|
|
repo-token: "${{ github.token }}"
|
|
|
|
sync-labels: false # The changeset-required label is often added manually, so don't remove it.
|
2022-03-25 03:08:37 +03:00
|
|
|
branches_label:
|
|
|
|
runs-on: ubuntu-latest
|
2023-02-23 01:30:33 +03:00
|
|
|
name: Label base branches and external contributors
|
2022-03-25 03:08:37 +03:00
|
|
|
steps:
|
2024-06-06 00:42:12 +03:00
|
|
|
- uses: srvaroa/labeler@9c29ad1ef33d169f9ef33c52722faf47a566bcf3 # ratchet:srvaroa/labeler@v1
|
2022-05-23 22:07:00 +03:00
|
|
|
env:
|
2023-04-12 20:56:03 +03:00
|
|
|
GITHUB_TOKEN: "${{ github.token }}"
|