mirror of
https://github.com/esphome/esphome.git
synced 2025-10-28 05:33:53 +00:00
[CI] Add auto label for chained PRs (#11457)
This commit is contained in:
7
.github/workflows/auto-label-pr.yml
vendored
7
.github/workflows/auto-label-pr.yml
vendored
@@ -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);
|
||||||
|
|
||||||
|
|||||||
1
.github/workflows/status-check-labels.yml
vendored
1
.github/workflows/status-check-labels.yml
vendored
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user