diff --git a/.github/workflows/rtlreviewbot.yml b/.github/workflows/rtlreviewbot.yml index d0e505af..c0a45932 100644 --- a/.github/workflows/rtlreviewbot.yml +++ b/.github/workflows/rtlreviewbot.yml @@ -1,54 +1,31 @@ -name: rtlreviewbot + name: rtlreviewbot -# Canonical consumer workflow shim for rtlreviewbot. -# -# Drop this file at `.github/workflows/rtlreviewbot.yml` in your repo. -# Then customize three values: -# 1. The `@` on the `uses:` line (pin to a release tag — see -# https://github.com/Ride-The-Lightning/rtlreviewbot/releases). -# 2. `installation_id` (the numeric App installation id for *this* repo -# — see docs/consumer-setup.md Part 2 Step 1). -# 3. The Anthropic / Claude auth secret(s) you have available (one of -# ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN must be set; both -# are accepted with API tried first and OAuth as fallback). -# -# rtlreviewbot fires on: -# - issue_comment.created — a /rtl comment on a PR -# - pull_request.review_requested — GitHub Re-request review button -# - pull_request.closed — cleanup on close/merge -on: - issue_comment: - types: [created] - pull_request: - types: [review_requested, closed] + on: + issue_comment: + types: [created] + pull_request: + types: [review_requested, closed] -permissions: - # The composite action mints an App installation token internally; the - # GITHUB_TOKEN handed to this shim is unused, so we minimise it. - contents: read - -jobs: - review: - # issue_comment fires for any issue. Filter to PR comments only. - if: ${{ github.event_name != 'issue_comment' || github.event.issue.pull_request != null }} - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: Ride-The-Lightning/rtlreviewbot/.github/actions/review@main - with: - event_name: ${{ github.event_name }} - event_action: ${{ github.event.action }} - repo: ${{ github.repository }} - pr_number: ${{ github.event.issue.number || github.event.pull_request.number }} - actor: ${{ github.event.sender.login }} - comment_body: ${{ github.event.comment.body }} - comment_id: ${{ github.event.comment.id }} - installation_id: 127679607 - # Credentials — passed as `with:` inputs (composite actions - # cannot declare a `secrets:` block). At least one of - # anthropic_api_key or claude_code_oauth_token must be set; - # both is fine — API is tried first, OAuth is fallback. - app_id: ${{ secrets.GATEWAY_APP_ID }} - private_key: ${{ secrets.GATEWAY_PRIVATE_KEY }} - anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} - claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} + permissions: + contents: read + + jobs: + review: + if: ${{ github.event_name != 'issue_comment' || github.event.issue.pull_request != null }} + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - uses: Ride-The-Lightning/rtlreviewbot-action@main + with: + event_name: ${{ github.event_name }} + event_action: ${{ github.event.action }} + repo: ${{ github.repository }} + pr_number: ${{ github.event.issue.number || github.event.pull_request.number }} + actor: ${{ github.event.sender.login }} + comment_body: ${{ github.event.comment.body }} + comment_id: ${{ github.event.comment.id }} + installation_id: 127679607 + app_id: ${{ secrets.GATEWAY_APP_ID }} + private_key: ${{ secrets.GATEWAY_PRIVATE_KEY }} + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}