# The Copilot Triage job, called by each repository's own workflow: # # jobs: # triage: # uses: crmne/copilot-triage/.github/workflows/assess.yml@v0 # secrets: inherit # # Permissions, concurrency, inputs, and secrets live here, so they update # with the v0 tag instead of in every repository. The caller keeps only the # events that start it, because GitHub reads those from the caller. name: Assess on: workflow_call: inputs: kind: type: string default: '' number: type: string default: '' dry_run: type: boolean default: false permissions: contents: read issues: write discussions: write pull-requests: write jobs: assess: # Bots never start triage, except for events that only move cards or that # the sweep sends: an issue or pull request closing, a bot review, and the # sweep's own dispatches. if: >- github.event.sender.type != 'Bot' || github.event_name == 'issues' || github.event_name == 'pull_request_review' || github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request_target' && github.event.action == 'closed') # On the job, so a bot comment's skipped run never replaces a queued one. concurrency: group: >- assessment-${{ github.event.discussion && 'discussion' || inputs.kind || 'issue' }}-${{ github.event.issue.number || github.event.discussion.number || github.event.pull_request.number || inputs.number }}-${{ github.event.discussion && (github.event.comment.parent_id || github.event.comment.id) || 'report' }} cancel-in-progress: false runs-on: ubuntu-latest timeout-minutes: 5 steps: - uses: crmne/copilot-triage@v0 with: copilot-token: ${{ secrets.COPILOT_GITHUB_TOKEN }} fallback-api-key: ${{ secrets.OPENROUTER_API_KEY }} project-token: ${{ secrets.TRIAGE_PROJECT_TOKEN }} kind: ${{ inputs.kind || (github.event.discussion && 'discussion' || (github.event.pull_request || github.event.issue.pull_request) && 'pull_request' || 'issue') }} number: ${{ inputs.number || github.event.issue.number || github.event.discussion.number || github.event.pull_request.number }} dry-run: ${{ inputs.dry_run }}