Queries using versions now use a serialization that requires 4.1 #227
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request Labels | |
on: | |
pull_request: | |
# Run whenever the labels change or the PR HEAD changes. In theory, the latter is a bit redundant, | |
# but it's necessary to make sure that the check is applied to the final commit for a PR | |
types: [opened, reopened, labeled, unlabeled, synchronize] | |
jobs: | |
labels: | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
contents: read | |
pull-requests: read | |
steps: | |
- name: Checkout sources | |
uses: actions/[email protected] | |
with: | |
sparse-checkout: build/release-notes-config.json | |
- name: Check Labels | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
// Gather required labels from release notes configuration | |
const releaseNotesConfig = require('./build/release-notes-config.json'); | |
var requiredLabels = new Set(); | |
releaseNotesConfig.categories | |
.flatMap(category => category.labels) | |
.forEach(label => requiredLabels.add(label)); | |
// Check if the current PR has a label in the required set | |
const pr_labels = context.payload.pull_request.labels.map(l => l.name); | |
if (!pr_labels.some(l => requiredLabels.has(l))) { | |
core.setFailed("PR is not labeled with any of the required labels: " + JSON.stringify(Array.from(requiredLabels))); | |
} |