mirror of
https://github.com/Heretek-AI/awesome-opencode.git
synced 2026-11-09 17:14:47 -10:00
- Escape backslashes as well as pipes in markdown table cells - Decide gist/discussion/npm-page links by parsed hostname instead of substring or unanchored regex checks (README, site) - Encode every '/' in scoped npm names; validate npm names before calling the registry - The REST helper only calls https://api.github.com and rejects dot segments - npm ci --ignore-scripts in every workflow (no dependency needs install scripts) - Move write permissions to job level in issues.yml and site.yml Co-Authored-By: Claude Opus 5.5 <[email protected]>
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
# Labels PRs (needs-v2 / needs-metadata / needs-human / ready, plus category) and keeps one comment
|
|
# with the check results up to date.
|
|
#
|
|
# Security: pull_request_target runs with a write token, so this workflow checks out the BASE branch
|
|
# only. PR files are fetched through the API and parsed as data; PR code is never executed here.
|
|
name: Triage PR
|
|
|
|
on:
|
|
pull_request_target:
|
|
types: [opened, synchronize, reopened, ready_for_review]
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: write
|
|
issues: write
|
|
|
|
concurrency:
|
|
group: triage-${{ github.event.pull_request.number }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
triage:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout base branch
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '24'
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: Label and comment
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
run: node scripts/triage.js --pr "$PR_NUMBER"
|