From 69888dd7b8d33f46bafba68fd2a43006826bf28a Mon Sep 17 00:00:00 2001 From: Suheb <39208279+saubyk@users.noreply.github.com> Date: Fri, 1 May 2026 20:10:35 -0700 Subject: [PATCH] Create rtlreviewbot.yml Added the Yaml file for the code review bot --- .github/workflows/rtlreviewbot.yml | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/rtlreviewbot.yml diff --git a/.github/workflows/rtlreviewbot.yml b/.github/workflows/rtlreviewbot.yml new file mode 100644 index 00000000..a32d0bf1 --- /dev/null +++ b/.github/workflows/rtlreviewbot.yml @@ -0,0 +1,54 @@ +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] + +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: REPLACE_WITH_INSTALLATION_ID + # 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 }}