mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-13 12:33:07 +02:00
Create rtlreviewbot.yml
Added the Yaml file for the code review bot
This commit is contained in:
parent
d8e6bb1b68
commit
69888dd7b8
1 changed files with 54 additions and 0 deletions
54
.github/workflows/rtlreviewbot.yml
vendored
Normal file
54
.github/workflows/rtlreviewbot.yml
vendored
Normal file
|
|
@ -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 `@<TAG>` 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 <command> 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 }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue