Skip to content
Open
Changes from 4 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/pull-reviews.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Video Review
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Workflow name appears incorrect.

The name "Video Review" seems inconsistent with the PR's purpose of enabling automated pull request reviews. Consider renaming to something like "Pull Review" or "PR Review".

-name: Video Review
+name: Pull Review
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
name: Video Review
name: Pull Review
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pull-reviews.yml at line 1, Rename the GitHub Actions
workflow's name field to reflect its purpose: replace the current "Video Review"
value in the workflow's top-level name: entry with a clearer label such as "Pull
Review" or "PR Review" so the workflow name matches the automated pull request
review task.


on:
pull_request:
types: [opened, synchronize]
Comment on lines +3 to +5
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Potential duplicate review workflows.

This workflow triggers on the same events (opened, synchronize) as the existing amber-auto-review.yml workflow, which also performs automatic code review. Running both simultaneously may result in duplicate or conflicting review comments on PRs.

Consider whether both workflows are needed, or if they should be consolidated or conditionally triggered.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pull-reviews.yml around lines 3 - 5, The pull request
workflow in pull-reviews.yml currently triggers on pull_request types [opened,
synchronize] which duplicates the events used by amber-auto-review.yml; decide
whether to consolidate or avoid duplicate runs by either removing or changing
the trigger in pull-reviews.yml (or vice versa), adding a conditional check
(e.g., using if: github.workflow != 'amber-auto-review' or adding paths/branches
filters) or merging the two workflow jobs into a single workflow; update the on:
pull_request block in pull-reviews.yml (or adjust amber-auto-review.yml)
accordingly so only one workflow runs for the same PR events.


permissions:
contents: read
pull-requests: write
id-token: write

jobs:
preel:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Job name appears to be a typo.

The job name preel seems unintentional. Consider using a more descriptive name like pr-review or pull-review.

-  preel:
+  pr-review:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
preel:
pr-review:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pull-reviews.yml at line 8, The workflow job name `preel`
is a typo; rename the job key to a clear, descriptive identifier such as
`pr-review` or `pull-review` (replace the `preel:` job key with `pr-review:`),
and update any references to that job elsewhere in the workflow (e.g., in
`needs:` or `if:` conditions) to match the new name to avoid broken
dependencies.

uses: ambient-code/pull-reviews/.github/workflows/review.yml@main
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion | 🟠 Major

Pin external workflow to a specific commit SHA.

Referencing the external workflow with @main poses a supply chain risk—the workflow could change unexpectedly or maliciously. Pin to a specific commit SHA for security and reproducibility.

-    uses: ambient-code/pull-reviews/.github/workflows/review.yml@main
+    uses: ambient-code/pull-reviews/.github/workflows/review.yml@<commit-sha>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pull-reviews.yml at line 9, The external workflow
reference currently uses a floating ref
"ambient-code/pull-reviews/.github/workflows/review.yml@main"; replace the `@main`
ref with a specific commit SHA for the external repo so the workflow is pinned
and reproducible — update the line containing the uses declaration (the string
"ambient-code/pull-reviews/.github/workflows/review.yml@main") to use the chosen
commit SHA (e.g. "...review.yml@<COMMIT_SHA>") and commit that change.

with:
s3_bucket: pull-reviews
gcp_project_id: ambient-code-platform
gcp_region: us-east5
gcp_workload_identity_provider: projects/888214980327/locations/global/workloadIdentityPools/github/providers/ambient-code-github-actions
Comment on lines +17 to +19
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

Avoid hardcoded GCP environment identifiers in workflow inputs.

Lines 17–19 hardcode project/region/provider values. This reduces portability across environments and exposes infra identifiers in repo config. Prefer ${{ secrets.* }} or ${{ vars.* }} consistent with .github/workflows/model-discovery.yml (Lines 30–34, 36–43).

Suggested refactor
-      gcp_project_id: ambient-code-platform
-      gcp_region: us-east5
-      gcp_workload_identity_provider: projects/888214980327/locations/global/workloadIdentityPools/github/providers/ambient-code-github-actions
+      gcp_project_id: ${{ secrets.GCP_PROJECT }}
+      gcp_region: ${{ secrets.GCP_REGION }}
+      gcp_workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
gcp_project_id: ambient-code-platform
gcp_region: us-east5
gcp_workload_identity_provider: projects/888214980327/locations/global/workloadIdentityPools/github/providers/ambient-code-github-actions
gcp_project_id: ${{ secrets.GCP_PROJECT }}
gcp_region: ${{ secrets.GCP_REGION }}
gcp_workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/pull-reviews.yml around lines 17 - 19, Replace the
hardcoded GCP identifiers in the workflow inputs (gcp_project_id, gcp_region,
gcp_workload_identity_provider) with repository secrets or workflow variables
(e.g. use ${{ secrets.GCP_PROJECT_ID }} / ${{ vars.GCP_REGION }} / ${{
secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }} or similar) so the workflow matches
the pattern used in model-discovery.yml; update the input keys where
gcp_project_id, gcp_region and gcp_workload_identity_provider are defined to
read from those secrets/vars and document required secret/var names in the repo
settings.

secrets:
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
S3_ACCESS_KEY_ID: ${{ secrets.S3_ACCESS_KEY_ID }}
S3_SECRET_ACCESS_KEY: ${{ secrets.S3_SECRET_ACCESS_KEY }}
CDN_BASE_URL: ${{ secrets.CDN_BASE_URL }}
Loading