Files
2026-07-13 13:09:14 +08:00

49 lines
1.4 KiB
YAML

name: Project Triage
on:
issues:
types: [opened, reopened, labeled, unlabeled, assigned, unassigned]
workflow_dispatch:
inputs:
backfill:
description: Sync all open issues into DBX Issue Triage
required: false
default: "false"
permissions:
contents: read
issues: read
jobs:
sync-project-triage:
runs-on: ubuntu-latest
env:
PROJECT_TOKEN: ${{ secrets.PROJECT_AUTOMATION_TOKEN }}
PROJECT_OWNER: t8y2
PROJECT_NUMBER: "1"
steps:
- uses: actions/checkout@v5
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 22.13.0
- name: Validate project token
run: |
if [ -z "$PROJECT_TOKEN" ]; then
echo "Missing PROJECT_AUTOMATION_TOKEN secret"
exit 1
fi
- name: Sync current issue
if: ${{ github.event_name == 'issues' }}
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_EVENT_ACTION: ${{ github.event.action }}
run: node .github/scripts/sync-project-triage.mjs --issue-number "$ISSUE_NUMBER" --event-action "$ISSUE_EVENT_ACTION"
- name: Backfill open issues
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.backfill == 'true' }}
run: node .github/scripts/sync-project-triage.mjs --backfill true