mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 23:14:37 +00:00
fix(rabbit): handle CR action acks + edited rate-limit comments; schedule via GH Action (#1425)
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
---
|
||||
name: CodeRabbit Retrigger
|
||||
# Periodically scans open PRs and posts `@coderabbitai review` on any whose
|
||||
# rate-limit window has elapsed. Uses the same GitHub App credentials as
|
||||
# release-production.yml so the comments are authored by the bot account.
|
||||
on:
|
||||
schedule:
|
||||
# Every 20 minutes. CodeRabbit Pro reviews 5 PRs/hr, so this gives
|
||||
# ~3 ticks per hour — enough to catch elapsed windows without thrashing.
|
||||
- cron: "*/20 * * * *"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
max:
|
||||
description: "Max retriggers this run (CR Pro = 5/hr)"
|
||||
required: false
|
||||
default: "5"
|
||||
dry_run:
|
||||
description: "Print what would be done; post nothing"
|
||||
type: boolean
|
||||
required: false
|
||||
default: false
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
issues: write
|
||||
concurrency:
|
||||
group: rabbit-retrigger
|
||||
cancel-in-progress: false
|
||||
jobs:
|
||||
retrigger:
|
||||
name: Retrigger CodeRabbit
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Generate GitHub App token
|
||||
id: app-token
|
||||
uses: tibdex/github-app-token@v1
|
||||
with:
|
||||
app_id: ${{ secrets.XGITHUB_APP_ID }}
|
||||
private_key: ${{ secrets.XGITHUB_APP_PRIVATE_KEY }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24.x
|
||||
- name: Run rabbit
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
RABBIT_REPO: ${{ github.repository }}
|
||||
run: |
|
||||
set -e
|
||||
ARGS=(run --max "${{ inputs.max || '5' }}")
|
||||
if [ "${{ inputs.dry_run }}" = "true" ]; then
|
||||
ARGS+=(--dry-run)
|
||||
fi
|
||||
node scripts/rabbit/cli.mjs "${ARGS[@]}"
|
||||
Reference in New Issue
Block a user