Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.