diff --git a/README.md b/README.md index 4972078..03321c7 100644 --- a/README.md +++ b/README.md @@ -24,34 +24,37 @@ reusable workflow forwards from its `mode` input. ### Calling the reusable workflow -Default per-PR review: +Default per-PR setup, the multi-agent team review plus the PR description. +The `permissions` block is required: a reusable workflow cannot escalate +beyond the ceiling set by its caller. ```yaml +on: + pull_request: + types: [opened, synchronize] + branches: [main] + +permissions: + contents: read + pull-requests: write + jobs: - review: + team: uses: nubster-opensources/.github/.github/workflows/ai-review.yml@main with: pr-number: ${{ github.event.pull_request.number }} - mode: review + mode: team secrets: mistral-api-key: ${{ secrets.MISTRAL_API_KEY }} -``` - -Team mode is heavier, so trigger it on demand by adding the `ai:team` label to a -pull request: -```yaml -on: - pull_request: - types: [opened, synchronize, reopened, labeled] - -jobs: - team: - if: contains(github.event.pull_request.labels.*.name, 'ai:team') + describe: uses: nubster-opensources/.github/.github/workflows/ai-review.yml@main with: pr-number: ${{ github.event.pull_request.number }} - mode: team + mode: describe secrets: mistral-api-key: ${{ secrets.MISTRAL_API_KEY }} ``` + +Any other mode (`review`, `security`, `architecture`, `performance`, +`product`) can be invoked the same way by passing it as the `mode` input.