Dev/pr automation 6 (#1575)

* user should be allowed to manually remove detector label

* automation script fix
This commit is contained in:
maliakal_d authored and GitHub committed 2026-09-23 11:47:16 +02:00
1 parent 7a2ff7715f
commit 32437267ef
1 file changed
+33 -5
+33 -5
View File
@@ -23,6 +23,7 @@ jobs:
outputs:
require_validation: ${{ steps.check.outputs.require_validation }}
file_label_change: ${{ steps.check.outputs.file_label_change }}
detector_label_change: ${{ steps.check.outputs.detector_label_change }}
pr_edited: ${{ steps.check.outputs.pr_edited }}
steps:
@@ -33,6 +34,7 @@ jobs:
script: |
let requireValidation = true;
let fileLabelChange = false;
let detectorLabelChange = false;
/*
* If triggered by label change, ignore unrelated labels.
@@ -65,8 +67,22 @@ jobs:
];
if (fileLabels.includes(changedLabel)) {
fileLabelChange = true;
}
}
}
const detectorLabels = [
'Ctb',
'Eiger',
'Moench',
'Mythen3',
'Jungfrau',
'Gotthard2',
'Matterhorn',
'Xilinx_ctb'
];
if (detectorLabels.includes(changedLabel)) {
detectorLabelChange = true;
}
}
core.setOutput(
'require_validation',
@@ -76,6 +92,10 @@ jobs:
'file_label_change',
fileLabelChange.toString()
);
core.setOutput(
'detector_label_change',
detectorLabelChange.toString()
);
core.setOutput(
'pr_edited',
prEdited.toString()
@@ -90,7 +110,12 @@ jobs:
core.info('File label or Breaking API: Changed.');
} else {
core.info('File label or Breaking API: No Change.');
}
}
if (detectorLabelChange) {
core.info('Detector label: Changed.');
} else {
core.info('Detector label: No Change.');
}
validate-pr-type:
needs: check-pr-trigger
@@ -129,8 +154,11 @@ jobs:
${{
always() &&
(
needs.check-pr-trigger.outputs.require_validation == 'false' ||
needs.validate-pr-type.result == 'success'
needs.check-pr-trigger.outputs.detector_label_change == 'false' &&
(
needs.check-pr-trigger.outputs.require_validation == 'false' ||
needs.validate-pr-type.result == 'success'
)
)
}}
uses: ./.github/workflows/pr_detector_labels.yaml