mirror of
https://github.com/Heretek-AI/awesome-opencode.git
synced 2026-11-07 10:45:57 -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]>
79 lines
2.1 KiB
YAML
79 lines
2.1 KiB
YAML
# Issue automation:
|
|
# - "Add an entry" form submissions (label: submission) become PRs on submission/<issue>.
|
|
# - Ticked candidates in Scout issues (label: scout) become PRs on scout/<name>.
|
|
#
|
|
# Security: issue text is untrusted. It is only read by the Node scripts as data (via the API);
|
|
# nothing from the issue is interpolated into shell commands.
|
|
name: Issue automation
|
|
|
|
on:
|
|
issues:
|
|
types: [opened, edited, reopened, labeled]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: issue-${{ github.event.issue.number }}
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
submission:
|
|
if: contains(github.event.issue.labels.*.name, 'submission') && github.event.issue.state == 'open'
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
issues: write
|
|
actions: write
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '24'
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: Build entry and open PR
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
run: node scripts/submit-entry.js --issue "$ISSUE_NUMBER"
|
|
|
|
scout-accept:
|
|
if: github.event.action == 'edited' && contains(github.event.issue.labels.*.name, 'scout')
|
|
permissions:
|
|
contents: write
|
|
pull-requests: write
|
|
issues: write
|
|
actions: write
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '24'
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci --ignore-scripts
|
|
|
|
- name: Open PRs for ticked candidates
|
|
env:
|
|
GITHUB_TOKEN: ${{ github.token }}
|
|
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
|
SENDER: ${{ github.event.sender.login }}
|
|
run: node scripts/scout.js accept --issue "$ISSUE_NUMBER" --sender "$SENDER"
|