1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-28 13:43:54 +00:00

[CI] Add auto label for chained PRs (#11457)

This commit is contained in:
Jesse Hills
2025-10-22 10:22:56 +13:00
committed by GitHub
parent 548913b471
commit 742eca92d8
2 changed files with 6 additions and 2 deletions

View File

@@ -53,6 +53,7 @@ jobs:
'new-target-platform', 'new-target-platform',
'merging-to-release', 'merging-to-release',
'merging-to-beta', 'merging-to-beta',
'chained-pr',
'core', 'core',
'small-pr', 'small-pr',
'dashboard', 'dashboard',
@@ -140,6 +141,8 @@ jobs:
labels.add('merging-to-release'); labels.add('merging-to-release');
} else if (baseRef === 'beta') { } else if (baseRef === 'beta') {
labels.add('merging-to-beta'); labels.add('merging-to-beta');
} else if (baseRef !== 'dev') {
labels.add('chained-pr');
} }
return labels; return labels;
@@ -528,8 +531,8 @@ jobs:
const apiData = await fetchApiData(); const apiData = await fetchApiData();
const baseRef = context.payload.pull_request.base.ref; const baseRef = context.payload.pull_request.base.ref;
// Early exit for non-dev branches // Early exit for release and beta branches only
if (baseRef !== 'dev') { if (baseRef === 'release' || baseRef === 'beta') {
const branchLabels = await detectMergeBranch(); const branchLabels = await detectMergeBranch();
const finalLabels = Array.from(branchLabels); const finalLabels = Array.from(branchLabels);

View File

@@ -14,6 +14,7 @@ jobs:
label: label:
- needs-docs - needs-docs
- merge-after-release - merge-after-release
- chained-pr
steps: steps:
- name: Check for ${{ matrix.label }} label - name: Check for ${{ matrix.label }} label
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0