Semantic PR Action uses Google's Gemini AI to automatically review your Pull Request code changes and ensure your PR titles and descriptions are highly accurate and formatted correctly.
Tired of PRs named "fixed stuff" with an empty description? This action reads the actual git diff and acts as an automated, intelligent PR architect.
- If a contributor already wrote a perfect, Semantic PR title (e.g.,
feat(api): add login endpoint), the AI recognizes it and leaves it alone. - Generates a concise "What and Why" summary of the code changes directly in the PR body.
- Enforces the Conventional Commits specification for titles (feat, fix, chore, docs, etc.).
- Powered by Google's
gemini-3-flash-previewmodel for high-speed, cost-effective analysis.
Create a new file in your repository at .github/workflows/semantic-pr.yml and add the following configuration:
name: Semantic PR
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
optimize-pr:
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
steps:
- name: Checkout Code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Run Semantic PR Action
uses: brokeyourbike/semantic-pr-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
gemini-api-key: ${{ secrets.GEMINI_API_KEY }}| Input | Required | Description |
|---|---|---|
github-token |
Yes | The standard GitHub token used to fetch the PR diff and apply updates. Use ${{ secrets.GITHUB_TOKEN }}. |
gemini-api-key |
Yes | Your Google Gemini API Key. Store this in your repository's Secrets. |
model-name |
No | The specific Gemini model to use. Defaults to gemini-3-flash-preview. |
- Ivan Stasiuk | Twitter | LinkedIn | stasi.uk