Skip to content

Triggering pr-review in ollama-pr-review with v1.0 tag - #5

Merged
sungeunbae merged 1 commit into
mainfrom
ollama-pr-review
Jun 30, 2026
Merged

Triggering pr-review in ollama-pr-review with v1.0 tag#5
sungeunbae merged 1 commit into
mainfrom
ollama-pr-review

Conversation

@sungeunbae

Copy link
Copy Markdown
Member

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:

  • Added a new workflow file .github/workflows/pr-review.yml that triggers on pull request events (opened, synchronize, reopened) and calls the ucgmsim/ollama_pr_review workflow for AI-driven code review.
  • Configured the workflow to use the OLLAMA_API_KEY secret for authentication with the external review service.

Copilot AI review requested due to automatic review settings June 30, 2026 03:37
@gemini-code-assist

Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🤖 AI Code Review (deepseek-v4-flash:cloud)

types: [opened, synchronize, reopened]

jobs:
call-review:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📍 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 }}

⚠️ Problem: Using an external reusable workflow from an untrusted source. If the external repository is compromised, it could execute arbitrary code in the context of this repository, potentially exfiltrating secrets or modifying the codebase.

✅ 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📍 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 }}

⚠️ Problem: Passing a secret to an external reusable workflow exposes the secret to that workflow. If the external workflow is malicious or has a vulnerability, the secret could be leaked or misused.

✅ 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:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📍 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

⚠️ Problem: For pull requests from forks, GitHub does not pass secrets to workflows triggered by 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.

@github-actions

Copy link
Copy Markdown

🤖 AI Code Review (deepseek-v4-flash:cloud)

Found 3 issues.

Diff size: 447 bytes
Truncated: false

See inline comments for details.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_review and forwards OLLAMA_API_KEY.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +3 to +6
on:
pull_request:
types: [opened, synchronize, reopened]


jobs:
call-review:
uses: ucgmsim/ollama_pr_review/.github/workflows/pr-review.yml@v1.0
@sungeunbae
sungeunbae merged commit 8007d28 into main Jun 30, 2026
5 checks passed
@sungeunbae
sungeunbae deleted the ollama-pr-review branch June 30, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants