AI Code Review in GitHub Actions
LearnCodeGuide reviews every pull request automatically. Add a workflow file and an API key secret once, and from then on each PR gets bug, security, and quality findings posted inline — no copy-pasting, no manual runs. Every account gets 5 free PR reviews to start; after that, the GitHub Actions plan ($12/month) gives you 30 reviews per month.
Copy your API key
Your API key authenticates the action with your LearnCodeGuide account. Every account has one — find it on your dashboard under GitHub Actions setup. Keep it secret — treat it like a password.
Add the repository secret
In your repository, go to Settings → Secrets and variables → Actions, click New repository secret, name it LCG_API_KEY, and paste your key as the value. Storing it as a secret keeps it encrypted and out of your code.
Add the workflow file
Create .github/workflows/learncodeguide.yml in your repository and paste this — it uses our official GitHub Marketplace action:
name: LearnCodeGuide Review
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
pull-requests: write
jobs:
review:
runs-on: ubuntu-latest
steps:
- uses: LearnCodeGuide/pr-review-action@v1
with:
api-key: ${{ secrets.LCG_API_KEY }}Commit the file. On the next pull request, the action reads your changed files, sends them for analysis, and posts findings and suggested fixes directly on the PR. You can also find the full setup, your API key, and the free-review counter on your GitHub Actions setup page.
Automate your PR reviews
Start with 5 free PR reviews — no card required. Then $12/month for 30 reviews per month.
Get started →Related Guides
Published by LearnCodeGuide Team · Last reviewed: June 2026