mirror of
https://github.com/NationalSecurityAgency/datawave.git
synced 2026-11-12 07:41:29 -10:00
## Summary - `actions/github-script@v7` and `actions/cache@v4` both still target the deprecated Node.js 20 runtime, which GitHub now force-runs on Node 24 and flags with a warning annotation on every workflow run (seen recently on PR #3683's checks). - Bump both to their minimum Node 24-native releases: `actions/github-script@v8` and `actions/cache@v5`. Neither introduces breaking changes relevant to our usage (v8/v5 changelogs are Node runtime bumps only; v9 of github-script would add breaking API changes we don't need). ## Test plan - [x] Confirm the `require-labels.yml` and `compose-tests.yml` workflows run green on this PR - [x] Confirm the Node.js 20 deprecation warning annotation no longer appears on the check runs Co-authored-by: Claude Sonnet 5 <[email protected]>
27 lines
830 B
YAML
27 lines
830 B
YAML
name: Require PR Labels
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, labeled, unlabeled, synchronize, reopened]
|
|
|
|
jobs:
|
|
require-label:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check required labels
|
|
uses: actions/github-script@v8
|
|
with:
|
|
script: |
|
|
const requiredLabels = ["Integration Tested", "no-downstream-effects", "cherry-pick"];
|
|
const labels = context.payload.pull_request.labels.map(label => label.name);
|
|
|
|
const hasRequired = requiredLabels.some(l => labels.includes(l));
|
|
|
|
if (!hasRequired) {
|
|
core.setFailed(
|
|
`This PR must have at least one of the required labels: ${requiredLabels.join(", ")}`
|
|
);
|
|
} else {
|
|
core.info("PR has at least one required label ✅");
|
|
}
|