79da1bfde3
Make the reusable workflow's input defaults BE the standard Gadfly swarm so a consumer subscribes by just calling it (no `with:` block) and inherits: - models: 3 strong cloud (minimax-m3, glm-5.2, deepseek-v4-pro) + Claude Code (sonnet, opus, opus:max) - specialists: the 5-lens default suite (security, correctness, maintainability, performance, error-handling) - provider_concurrency: ollama-cloud=3,claude-code=3 (all three claudes at once) - timeout_minutes default 45 -> 90 (5 lenses x 2 passes over a slow lane) The default is opinionated (needs OLLAMA_CLOUD_API_KEY + CLAUDE_CODE_OAUTH_TOKEN); consumers override `models:` for cloud-only / other providers. gadfly's own caller is slimmed to inherit (only allowed_users remains). examples/reusable.yml keeps a cloud-only `models:` override so a public copy works with just the Ollama key. README/CLAUDE.md updated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
70 lines
3.2 KiB
YAML
70 lines
3.2 KiB
YAML
# Gadfly — SLIM consumer stub via the reusable workflow.
|
|
# Copy to .gitea/workflows/adversarial-review.yml in your repo.
|
|
#
|
|
# This is the shortest way to subscribe: it calls Gadfly's centralized reusable
|
|
# workflow, which holds the image pin + all the env plumbing. You only declare
|
|
# the triggers, the comment-trigger actor gate, and any overrides you want.
|
|
#
|
|
# The reusable ships a DEFAULT swarm: 3 cloud models + the Claude Code engine
|
|
# (sonnet/opus/opus:max), 5-lens suite. That default needs BOTH
|
|
# OLLAMA_CLOUD_API_KEY and CLAUDE_CODE_OAUTH_TOKEN. This example overrides
|
|
# `models:` to a cloud-only set so it works with just OLLAMA_CLOUD_API_KEY —
|
|
# delete that override (and forward the Claude token) to inherit the full default.
|
|
#
|
|
# Forward ONLY the secrets the reviewer uses (least privilege) — see the
|
|
# `secrets:` block below. GITEA_TOKEN is automatic. `secrets: inherit` also works
|
|
# but hands the reusable EVERY secret in your repo (registry/deploy/db creds the
|
|
# review never touches), so prefer the explicit form. Pin @<sha> to an immutable
|
|
# Gadfly commit (not @main) so a push there can't change what runs with your
|
|
# secrets.
|
|
#
|
|
# For custom named endpoints (GADFLY_ENDPOINT_<NAME>) or a provider the reusable
|
|
# doesn't map, use the full stub in adversarial-review.yml instead.
|
|
|
|
name: Adversarial Review (Gadfly)
|
|
|
|
on:
|
|
pull_request:
|
|
types: [opened, reopened, ready_for_review]
|
|
issue_comment:
|
|
types: [created]
|
|
workflow_dispatch:
|
|
inputs:
|
|
pr_number: { description: "PR number to review", required: true }
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
pull-requests: write
|
|
|
|
concurrency:
|
|
group: gadfly-${{ github.event.issue.number || github.event.pull_request.number || github.event.inputs.pr_number }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
review:
|
|
# Only let your maintainers re-trigger via a PR comment (keep in sync with
|
|
# the allowed_users override below).
|
|
if: >-
|
|
github.event_name != 'issue_comment'
|
|
|| (github.event.issue.pull_request && github.actor == 'your-username')
|
|
# Pin @<sha> to an immutable Gadfly commit (replace @main below) so a push to
|
|
# gadfly can't silently change the code that runs with your forwarded secrets.
|
|
uses: steve/gadfly/.gitea/workflows/review-reusable.yml@main
|
|
# Forward ONLY what the reviewer needs. Add provider keys you use
|
|
# (ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_API_KEY, GADFLY_API_KEY) and/or
|
|
# GADFLY_ENDPOINT_M1/M5; drop the findings ones if you don't run telemetry.
|
|
secrets:
|
|
OLLAMA_CLOUD_API_KEY: ${{ secrets.OLLAMA_CLOUD_API_KEY }}
|
|
# CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
|
# GADFLY_FINDINGS_URL: ${{ secrets.GADFLY_FINDINGS_URL }}
|
|
# GADFLY_FINDINGS_TOKEN: ${{ secrets.GADFLY_FINDINGS_TOKEN }}
|
|
with:
|
|
# Cloud-only override so this works with just OLLAMA_CLOUD_API_KEY. Delete
|
|
# this line (and forward CLAUDE_CODE_OAUTH_TOKEN above) to inherit the full
|
|
# default swarm (3 cloud + Claude Code sonnet/opus/opus:max, 5 lenses).
|
|
models: "minimax-m3:cloud,glm-5.2:cloud,deepseek-v4-pro:cloud"
|
|
# Other inputs inherit the default (5-lens suite, concurrency, 90-min cap);
|
|
# override any of them here (specialists, provider, base_url, timeout_secs…).
|
|
allowed_users: "your-username"
|