Skip to content

docs(integrations): Add integration templates page with Claude routine template #1299

docs(integrations): Add integration templates page with Claude routine template

docs(integrations): Add integration templates page with Claude routine template #1299

name: PR priority metadata

Check warning on line 1 in .github/workflows/pr-priority-metadata.yml

View workflow run for this annotation

GitHub Actions / PR priority metadata

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:
types: [opened, edited, reopened, ready_for_review, converted_to_draft]
workflow_dispatch:
inputs:
pr_number:
description: Pull request number to evaluate
required: true
type: number
dry_run:
description: Log metadata decisions without changing the pull request
required: true
default: true
type: boolean
permissions:
contents: read
issues: write
pull-requests: write
jobs:
priority_metadata:
name: Priority metadata
if: >-
github.event_name == 'workflow_dispatch' ||
github.event.action != 'edited' ||
github.event.changes.body != null
concurrency:
group: >-
priority-metadata-${{ github.event.pull_request.number || inputs.pr_number }}-${{
github.event_name == 'workflow_dispatch' && inputs.dry_run && github.run_id || 'event' }}
cancel-in-progress: true
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Resolve trusted base commit
id: base
env:
EVENT_BASE_SHA: ${{ github.event.pull_request.base.sha }}
PR_NUMBER: ${{ github.event.pull_request.number || inputs.pr_number }}
REPOSITORY: ${{ github.repository }}
GH_TOKEN: ${{ github.token }}
run: |
base_sha="$EVENT_BASE_SHA"
if [[ -z "$base_sha" ]]; then
base_sha=$(gh api "repos/$REPOSITORY/pulls/$PR_NUMBER" --jq '.base.sha')
fi
if [[ ! "$base_sha" =~ ^[0-9a-f]{40}$ ]]; then
echo "Invalid base commit SHA" >&2
exit 1
fi
echo "sha=$base_sha" >> "$GITHUB_OUTPUT"
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ steps.base.outputs.sha }}
persist-credentials: false
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v4
with:
node-version-file: package.json
- name: Synchronize priority metadata
env:
PR_NUMBER: ${{ github.event.pull_request.number || inputs.pr_number }}
REPOSITORY: ${{ github.repository }}
DRY_RUN: ${{ github.event_name == 'workflow_dispatch' && inputs.dry_run || false }}
GH_TOKEN: ${{ github.token }}
run: |
args=()
if [[ "$DRY_RUN" == "true" ]]; then
args+=(--dry-run)
fi
node scripts/sync-pr-priority-metadata.mjs "${args[@]}"