Triggering pr-review in ollama-pr-review with v1.0 tag - #5
Conversation
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
| types: [opened, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| call-review: |
There was a problem hiding this comment.
📍 Line 8
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
👉 call-review:
uses: ucgmsim/ollama_pr_review/.github/workflows/pr-review.yml@v1.0
secrets:
OLLAMA_API_KEY: ${{ secrets.OLLAMA_API_KEY }}
✅ Fix: Pin the workflow to a specific commit hash instead of a version tag for immutability, and thoroughly audit the external workflow's code. Alternatively, self-host the workflow to maintain control.
|
|
||
| jobs: | ||
| call-review: | ||
| uses: ucgmsim/ollama_pr_review/.github/workflows/pr-review.yml@v1.0 |
There was a problem hiding this comment.
📍 Line 9
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
call-review:
👉 uses: ucgmsim/ollama_pr_review/.github/workflows/pr-review.yml@v1.0
secrets:
OLLAMA_API_KEY: ${{ secrets.OLLAMA_API_KEY }}
✅ Fix: Avoid passing secrets to external workflows. If necessary, ensure the external workflow is fully trusted and consider using environment variables with restricted scope.
| @@ -0,0 +1,11 @@ | |||
| name: AI Code Review | |||
|
|
|||
| on: | |||
There was a problem hiding this comment.
📍 Line 3
name: AI Code Review
👉 on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
call-review:
uses: ucgmsim/ollama_pr_review/.github/workflows/pr-review.yml@v1.0
pull_request. This workflow uses a secret, so it will fail or behave unexpectedly for fork PRs, leading to inconsistent CI results.
✅ Fix: Use pull_request_target event (with caution) to allow secret access, or conditionally skip the job for fork PRs. Alternatively, handle the missing secret gracefully in the workflow.
🤖 AI Code Review (deepseek-v4-flash:cloud)Found 3 issues. Diff size: 447 bytes See inline comments for details. |
There was a problem hiding this comment.
Pull request overview
This PR adds a GitHub Actions workflow that runs on pull request events and delegates automated AI-driven review to a reusable workflow hosted in ucgmsim/ollama_pr_review, passing an OLLAMA_API_KEY secret for authentication.
Changes:
- Added a new
pull_request-triggered workflow (opened,synchronize,reopened). - Configured a reusable-workflow job that calls
ucgmsim/ollama_pr_reviewand forwardsOLLAMA_API_KEY.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
|
|
||
| jobs: | ||
| call-review: | ||
| uses: ucgmsim/ollama_pr_review/.github/workflows/pr-review.yml@v1.0 |
This pull request introduces a new GitHub Actions workflow for automated AI code review. The workflow is triggered on pull request events and delegates the review process to an external workflow, using a secret API key for authentication.
Workflow automation:
.github/workflows/pr-review.ymlthat triggers on pull request events (opened,synchronize,reopened) and calls theucgmsim/ollama_pr_reviewworkflow for AI-driven code review.OLLAMA_API_KEYsecret for authentication with the external review service.