Skip to content

801: run /ai after first pr push#828

Closed
naanci wants to merge 2 commits intomainfrom
801.02
Closed

801: run /ai after first pr push#828
naanci wants to merge 2 commits intomainfrom
801.02

Conversation

@naanci
Copy link
Collaborator

@naanci naanci commented Mar 4, 2026

801

Description of changes

Checklist before review

  • I have done a thorough self-review of the PR
  • Copilot has reviewed my latest changes, and all comments have been fixed and/or closed.
  • If I have made database changes, I have made sure I followed all the db repo rules listed in the wiki here. (check if no db changes)
  • All tests have passed
  • I have successfully deployed this PR to staging
  • I have done manual QA in both dev (and staging if possible) and attached screenshots below.

Screenshots

Dev

Staging

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Available PR Commands

  • /ai - Triggers all AI review commands at once
  • /review - AI review of the PR changes
  • /describe - AI-powered description of the PR
  • /improve - AI-powered suggestions
  • /deploy - Deploy to staging

See: https://github.com/tahminator/codebloom/wiki/CI-Commands

Comment on lines +82 to +89
- name: Post /review command
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/review"
token: ${{ env.GH_PAT }}

- name: Post /describe command

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical

Potential execution of untrusted code on a privileged workflow (
issue_comment
)
Comment on lines +89 to +96
- name: Post /describe command
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/describe"
token: ${{ env.GH_PAT }}

- name: Post /improve command

Check failure

Code scanning / CodeQL

Checkout of untrusted code in a privileged context Critical

Potential execution of untrusted code on a privileged workflow (
issue_comment
)
@tahminator
Copy link
Owner

/review

@tahminator
Copy link
Owner

/describe

@tahminator
Copy link
Owner

/improve

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

Preparing PR description...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Trigger Logic

The pull_request trigger no longer includes opened. This means the AI review workflow will not run when a PR is initially created, only when it's reopened, ready_for_review, or synchronize. This might deviate from the Notion task's implied "run /ai after first pr push" if that means on initial PR creation. Please confirm if this is the intended behavior.

types: [reopened, ready_for_review, synchronize]
Redundant Commands

The workflow now automatically posts /review, /describe, and /improve commands. Since the workflow can also be triggered by issue_comment for these same commands, there's a potential for duplicate AI comments if both a push and a manual command occur. Consider if this redundancy is acceptable or if a mechanism to prevent duplicate comments is needed.

- name: Post /review command
  uses: ./.github/composite/send-message
  with:
    prId: ${{ needs.getPRHead.outputs.prId }}
    message: "/review"
    token: ${{ env.GH_PAT }}

- name: Post /describe command
  uses: ./.github/composite/send-message
  with:
    prId: ${{ needs.getPRHead.outputs.prId }}
    message: "/describe"
    token: ${{ env.GH_PAT }}

- name: Post /improve command
  uses: ./.github/composite/send-message
  with:
    prId: ${{ needs.getPRHead.outputs.prId }}
    message: "/improve"
    token: ${{ env.GH_PAT }}
Unused Inputs

The workflow_dispatch inputs repository, comment-id, and author are defined but do not appear to be utilized in the provided diff. If these inputs are not used, they should be removed for clarity, or their intended use should be implemented.

  required: false
repository:
  description: "The repository from which the slash command was dispatched"
  required: false
comment-id:
  description: "The comment-id of the slash command"
  required: false
author:
  description: "The author that triggered this actions"
  required: false

@angelayu0530 angelayu0530 deleted the 801.02 branch March 4, 2026 04:14
Comment on lines +82 to +101
- name: Post /review command
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/review"
token: ${{ env.GH_PAT }}

- name: Post /describe command
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/describe"
token: ${{ env.GH_PAT }}

- name: Post /improve command
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/improve"
token: ${{ env.GH_PAT }}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: The new steps for posting AI commands can lead to an infinite recursive loop. When these commands are posted as comments, they will re-trigger the same workflow via the issue_comment event. Add an if condition to these steps to ensure they only run when the workflow is triggered by a pull_request event. [possible issue, importance: 9]

Suggested change
- name: Post /review command
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/review"
token: ${{ env.GH_PAT }}
- name: Post /describe command
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/describe"
token: ${{ env.GH_PAT }}
- name: Post /improve command
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/improve"
token: ${{ env.GH_PAT }}
- name: Post /review command
if: github.event_name == 'pull_request'
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/review"
token: ${{ env.GH_PAT }}
- name: Post /describe command
if: github.event_name == 'pull_request'
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/describe"
token: ${{ env.GH_PAT }}
- name: Post /improve command
if: github.event_name == 'pull_request'
uses: ./.github/composite/send-message
with:
prId: ${{ needs.getPRHead.outputs.prId }}
message: "/improve"
token: ${{ env.GH_PAT }}

Comment on lines 4 to +6
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
types: [reopened, ready_for_review, synchronize]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggestion: The pull_request trigger no longer includes the opened type, meaning the AI review will not run when a PR is initially created. To align with the PR title "run /ai after first pr push" and ensure immediate review upon PR creation, re-add the opened type to the trigger. [general, importance: 8]

Suggested change
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
types: [reopened, ready_for_review, synchronize]
on:
pull_request:
types: [opened, reopened, ready_for_review, synchronize]

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.

3 participants