GitHub Actions Integration
Add Peqy to your repository with a simple GitHub Action.
Setup
Step 1: Add API Key Secret
- Go to your repository's Settings
- Navigate to Secrets and variables → Actions
- Click New repository secret
- Name:
PEQY_API_KEY - Value: Your API key from the Peqy dashboard
Step 2: Create Workflow
Create .github/workflows/peqy-review.yml in your repository:
name: Peqy Code Review
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
peqy-review:
name: Run Peqy Review
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Trigger Peqy Review
uses: peqy/action@main
with:
api-key: ${{ secrets.PEQY_API_KEY }}Step 3: Disable Auto-Run (Recommended)
If you're using the GitHub Action, disable webhook-triggered analysis to avoid duplicate reviews.
Create .peqy/config.yml in your repository:
version: "1.0"
auto_run: falseThis ensures Peqy only runs when triggered by the GitHub Action, not on every PR event.
Step 4: Commit and Push
Commit the workflow file and push to your repository:
git add .github/workflows/peqy-review.yml
git commit -m "Add Peqy code review workflow"
git pushWhat Happens Next
When you open or update a pull request:
- GitHub Actions triggers the workflow
- The Peqy action sends your PR URL to the Peqy API
- Peqy analyzes your code changes
- Results appear as a GitHub Check Run on your PR
Troubleshooting
API Key Not Working
- Ensure the secret is named exactly
PEQY_API_KEY - Verify your API key is valid in the Peqy dashboard
- Check that the repository has access to the secret
Workflow Not Triggering
- Ensure the workflow file is in
.github/workflows/ - Check that the file has the correct YAML syntax
- Verify the workflow is enabled in your repository's Actions tab