Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/augment-review-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pull Request Review

on:
pull_request:
types: [opened, ready_for_review]

permissions:
contents: read
pull-requests: write

jobs:
review-pr:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a timeout to prevent the job from running indefinitely:

Suggested change
review-pr:
review-pr:
name: Pull Request Review
timeout-minutes: 10

This helps prevent resource waste if the action encounters issues and provides a clear failure point.

name: Pull Request Review
runs-on:
- ubuntu-latest

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using the string format for runs-on to match the pattern used in other workflows in this repository:

Suggested change
- ubuntu-latest
runs-on: ubuntu-latest

This is more consistent with the format used in pre-commit.yml and is the more common convention.

if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && github.event.pull_request.draft == false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider breaking down this complex conditional for better readability:

Suggested change
if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name && github.event.pull_request.draft == false
if: |
github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name &&
github.event.pull_request.draft == false

This multi-line format makes the conditions easier to read and understand.

steps:
- name: Generate PR Review
uses: augmentcode/review-pr@v0

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider pinning to a specific version or commit SHA instead of using @v0 for better security and reproducibility:

Suggested change
uses: augmentcode/review-pr@v0
uses: augmentcode/review-pr@v0.1.0

Mutable tags like @v0 can change unexpectedly and pose security risks. Using a specific version or commit SHA ensures consistent behavior.

with:
augment_session_auth: ${{ secrets.AUGMENT_SESSION_AUTH }}
github_token: ${{ secrets.GITHUB_TOKEN }}
pull_number: ${{ github.event.pull_request.number }}
repo_name: ${{ github.repository }}