mirror of
https://github.com/esphome/esphome.git
synced 2025-07-29 14:46:40 +00:00
[CI] Keep original labels when PR has too many lines (#9745)
This commit is contained in:
parent
bb9011d65d
commit
06bd1472de
7
.github/workflows/auto-label-pr.yml
vendored
7
.github/workflows/auto-label-pr.yml
vendored
@ -414,7 +414,14 @@ jobs:
|
|||||||
if ((tooManyLabels || tooManyChanges) && !allowedTooBig) {
|
if ((tooManyLabels || tooManyChanges) && !allowedTooBig) {
|
||||||
const originalLength = finalLabels.length;
|
const originalLength = finalLabels.length;
|
||||||
console.log(`PR is too big - Labels: ${originalLength}, Changes: ${totalChanges}`);
|
console.log(`PR is too big - Labels: ${originalLength}, Changes: ${totalChanges}`);
|
||||||
|
|
||||||
|
// If too big due to line changes only, keep original labels and add too-big
|
||||||
|
// If too big due to too many labels, replace with just too-big
|
||||||
|
if (tooManyChanges && !tooManyLabels) {
|
||||||
|
finalLabels.push('too-big');
|
||||||
|
} else {
|
||||||
finalLabels = ['too-big'];
|
finalLabels = ['too-big'];
|
||||||
|
}
|
||||||
|
|
||||||
// Create appropriate review message
|
// Create appropriate review message
|
||||||
let reviewBody;
|
let reviewBody;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user