1- # ai-review
1+ # github-workflows
22
3- Shared GitHub Actions workflow for AI-powered code review across jitsucom repos.
4- Uses [ OpenAI Codex] ( https://openai.com/codex ) to review pull requests and commits
5- for bugs, security issues, and correctness problems.
3+ Shared GitHub Actions reusable workflows for jitsucom repos.
64
7- ## What it does
5+ ## Workflows
6+
7+ ### ` ai-review.yml ` — AI Code Review
8+
9+ Reviews pull requests and commits for bugs, security issues, and correctness problems
10+ using [ OpenAI Codex] ( https://openai.com/codex ) .
811
912- On ** pull requests** : posts a native PR review with inline comments via a GitHub App
1013- On ** push to main** (commits not part of any PR): posts a review as a commit comment
1114- Skips commits that already belong to an open PR (reviewed there instead)
1215- Reports token usage and estimated cost in the workflow summary
1316
14- ## Secrets required
17+ #### Secrets required
1518
1619All three secrets must be available to the workflow — either as org secrets or repo secrets.
1720
@@ -21,7 +24,7 @@ All three secrets must be available to the workflow — either as org secrets or
2124| ` AI_CODE_REVIEW_APP_ID ` | PR mode | GitHub App ID for posting PR reviews |
2225| ` AI_CODE_REVIEW_PRIVATE_KEY ` | PR mode | Private key (.pem) for the GitHub App |
2326
24- ### GitHub App setup
27+ #### GitHub App setup
2528
2629The GitHub App needs ** Pull requests: Read & write** on the target repo.
2730
@@ -36,7 +39,7 @@ gh secret set AI_CODE_REVIEW_PRIVATE_KEY --org jitsucom --repos my-repo < app-pr
3639gh secret set OPENAI_API_KEY --org jitsucom --repos my-repo --body " <key>"
3740```
3841
39- ## Usage
42+ #### Usage
4043
4144Add a thin wrapper workflow to your repo:
4245
6063
6164jobs :
6265 ai-review :
63- uses : jitsucom/ai-review /.github/workflows/ai-review.yml@main
66+ uses : jitsucom/github-workflows /.github/workflows/ai-review.yml@main
6467 secrets : inherit
68+ with :
69+ pr_number : ${{ inputs.pr_number }}
70+ commit_sha : ${{ inputs.commit_sha }}
6571` ` `
6672
67- ### Custom review instructions
68-
6973Use the ` review_instructions` input to focus the review on what matters for your repo:
7074
7175` ` ` yaml
72- jobs:
73- ai-review:
74- uses: jitsucom/ai-review/.github/workflows/ai-review.yml@main
75- secrets: inherit
7676 with:
77+ pr_number: ${{ inputs.pr_number }}
78+ commit_sha: ${{ inputs.commit_sha }}
7779 review_instructions: >-
7880 Focus on infrastructure safety, Terraform drift, and secret leaks.
7981 Skip style nitpicks.
8082` ` `
8183
82- # # Updating
84+ # ### Updating
8385
84- The reusable workflow lives in this repo. All consuming repos pick up changes on the next
85- run — no changes needed in each repo.
86+ All consuming repos pick up changes automatically on the next run — no changes needed per repo.
0 commit comments