Skip to content

feat: add support for processing instructions #125

feat: add support for processing instructions

feat: add support for processing instructions #125

Workflow file for this run

name: Semver Check

Check warning on line 1 in .github/workflows/semver-check.yml

View workflow run for this annotation

GitHub Actions / Semver Check

Workflow execution policy warning (evaluate mode)

On November 2, 2026, GitHub will restrict `pull_request_target` on public repositories by default. To continue allowing the event trigger, configure an Actions policy. Learn more: https://gh.io/securely-using-pull_request_target#default-policy-for-pull_request_target
on:
pull_request_target:
# Remove all default permissions first
permissions: {}
jobs:
semver_check:
name: SemVer compatibility check
uses: ./.github/workflows/semver-check-helper.yml
with:
pull_request_number: ${{ github.event.pull_request.number }}
# Read content permission is required to checkout the PR
permissions:
contents: read
assign_labels:
name: Assign SemVer label
needs: semver_check
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
# We can't trust the output of the semver_check job, so we need
# to first validate that the labels are the expected labels.
- name: Validate label
run: |
case "$LABEL" in
V-breaking|V-non-breaking) ;;
*) echo "FATAL: Unexpected label: $LABEL"; exit 1 ;;
esac
env:
LABEL: ${{ needs.semver_check.outputs.label }}
- name: Assign labels
run: |
gh pr edit "$NUMBER" --remove-label V-breaking --remove-label V-non-breaking
gh pr edit "$NUMBER" --add-label "${LABEL}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
LABEL: ${{ needs.semver_check.outputs.label }}