|
| 1 | +name: CodeBoarding review |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: [opened, reopened, ready_for_review, closed, synchronize] |
| 6 | + issue_comment: |
| 7 | + types: [created] |
| 8 | + |
| 9 | +# No workflow-level permissions: each job requests only what it needs (least |
| 10 | +# privilege), so the default token starts with none. |
| 11 | +permissions: {} |
| 12 | + |
| 13 | +concurrency: |
| 14 | + group: codeboarding-${{ github.event.pull_request.number || github.event.issue.number }} |
| 15 | + cancel-in-progress: ${{ github.event_name == 'pull_request' && github.event.action == 'closed' }} |
| 16 | + |
| 17 | +jobs: |
| 18 | + review: |
| 19 | + runs-on: ubuntu-latest |
| 20 | + timeout-minutes: 60 |
| 21 | + permissions: |
| 22 | + contents: read # check out the repo + read the committed baseline (no writes in review mode) |
| 23 | + pull-requests: write # post the architecture-diff PR comment |
| 24 | + issues: write # the /codeboarding issue_comment trigger + comment API |
| 25 | + id-token: write # mint a GitHub OIDC token for the free hosted tier (write is the only level for id-token) |
| 26 | + if: > |
| 27 | + (github.event_name == 'pull_request' && github.event.action != 'closed' && |
| 28 | + github.event.pull_request.draft == false && |
| 29 | + github.event.pull_request.head.repo.full_name == github.repository) || |
| 30 | + (github.event_name == 'issue_comment' && github.event.issue.pull_request != null && |
| 31 | + startsWith(github.event.comment.body, '/codeboarding') && |
| 32 | + contains(fromJSON('["OWNER","MEMBER","COLLABORATOR"]'), github.event.comment.author_association)) |
| 33 | + steps: |
| 34 | + - uses: CodeBoarding/CodeBoarding-action@v1 |
| 35 | + with: |
| 36 | + # Free tier needs no secret; these fall through to the hosted OIDC tier when |
| 37 | + # unset. Add either repo secret (Settings → Secrets and variables → Actions) |
| 38 | + # for more/unmetered usage; no YAML edit required. |
| 39 | + llm_api_key: ${{ secrets.OPENROUTER_API_KEY }} # BYO LLM provider key (OpenRouter) |
| 40 | + license_key: ${{ secrets.CODEBOARDING_LICENSE }} # CodeBoarding paid plan |
0 commit comments