summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2026-06-04 15:18:40 +0700
committerGitHub <[email protected]>2026-06-04 15:18:40 +0700
commitac32feafeb2fb0f6cc5c3010d32db319ff15ca64 (patch)
tree6e354166b49c6197be7a8117f2f815d169e762f3 /.github/workflows
parent3d0516f439cbe2c8d69a9d8dd62f7effa935d0b2 (diff)
ci(labeler): auto-apply Port labels from changed driver files (#3673)
* ci(labeler): auto-apply Port labels from changed driver files Add path-based labeling so a PR touching a dcd/hcd driver under src/portable/ gets the matching "Port <ip>" label automatically.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/labeler.yml22
1 files changed, 21 insertions, 1 deletions
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 87d416f58..fe09413f1 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -4,12 +4,14 @@ on:
issues:
types: [opened]
pull_request_target:
- types: [opened]
+ types: [opened, synchronize, reopened]
discussion:
types: [created]
jobs:
label-priority:
+ # Author-based priority labels: only on issue/PR/discussion creation, not on PR updates.
+ if: github.event_name != 'pull_request_target' || github.event.action == 'opened'
runs-on: ubuntu-latest
permissions:
issues: write
@@ -160,3 +162,21 @@ jobs:
});
}
}
+
+ # Path-based Port labels: attach "Port <ip>" when a PR touches the matching
+ # dcd/hcd driver under src/portable/. Mapping lives in .github/labeler.yml.
+ label-port:
+ if: github.event_name == 'pull_request_target'
+ runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ pull-requests: write
+ issues: write # allow auto-creating a Port label that doesn't exist yet
+ steps:
+ - uses: actions/labeler@v5
+ with:
+ configuration-path: .github/labeler.yml
+ # sync-labels so a Port label is removed once a PR no longer touches
+ # that driver (job reruns on synchronize). Only labels listed in
+ # labeler.yml are managed, so author-based Prio/Sponsor labels are untouched.
+ sync-labels: true