Skip to content

801: /ai review on every commit#834

Closed
naanci wants to merge 4 commits intomainfrom
801-/ai
Closed

801: /ai review on every commit#834
naanci wants to merge 4 commits intomainfrom
801-/ai

Conversation

@naanci
Copy link
Collaborator

@naanci naanci commented Mar 5, 2026

801

Description of changes

  • posts /improve, /describe, and /review on every commit pushed

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

this conversation thread shows /describe, /improve, /review after every commit i pushed

Staging

n/a - ci/cd

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 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

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

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

Workflow Logic

The getPRHead job's if condition now explicitly excludes synchronize events. The new triggerAIOnSync job is responsible for posting /review, /describe, and /improve commands on synchronize events. This implies that the actual AI review jobs are triggered by these comments, not directly by the synchronize event itself. Verify that this indirect triggering mechanism works as expected and doesn't introduce any race conditions or unexpected delays in the AI review process.

if: (github.event_name == 'pull_request' && github.event.action != 'synchronize') || (github.event_name == 'issue_comment' && (github.event.comment.body == '/review' || github.event.comment.body == '/describe' || github.event.comment.body == '/improve'))
Token Permissions

The GH_PAT token used by the send-message composite action needs appropriate permissions to post comments on pull requests. Ensure that the GH_PAT has the minimum necessary scope to prevent over-privileged access, aligning with the principle of least privilege.

token: ${{ env.GH_PAT }}

@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 5, 2026

Preparing PR description...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 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

GH_PAT Permissions

Verify that the GH_PAT token used by the send-message composite action has the necessary permissions to post comments on pull requests. This is crucial for the workflow to function as intended.

    token: ${{ env.GH_PAT }}

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

- name: Post /improve command
  uses: ./.github/composite/send-message
  with:
    prId: ${{ github.event.number }}
    message: "/improve"
    token: ${{ env.GH_PAT }}

@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 5, 2026

Preparing PR description...

@github-actions
Copy link
Contributor

github-actions bot commented Mar 5, 2026

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 Security concerns

Sensitive information exposure:
The GH_PAT used to post comments should have its permissions carefully scoped. If this token has overly broad permissions, it could pose a security risk if compromised. Additionally, ensure that GPG_PRIVATE_KEY and GPG_PASSPHRASE are not inadvertently exposed or used in contexts where they are not strictly required, even though they are loaded as secrets.

⚡ Recommended focus areas for review

GH_PAT Permissions

The GitHub Personal Access Token (GH_PAT) used by the send-message composite action needs to have appropriate permissions to post comments on pull requests. Verify that the token's scope is limited to only the necessary permissions (e.g., pull_requests:write) to minimize potential security risks.

token: ${{ env.GH_PAT }}
Secret Usage

The triggerAIOnSync job loads GPG_PRIVATE_KEY and GPG_PASSPHRASE via setup-ci and load-secrets. Confirm if these GPG secrets are strictly necessary for a job whose primary function is to post comments. If not, consider removing these steps to reduce the job's attack surface and execution time.

    GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
    GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

- name: Load secrets
  uses: ./.github/composite/load-secrets
  with:
    GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
    GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}

@naanci
Copy link
Collaborator Author

naanci commented Mar 5, 2026

/deploy

@naanci naanci changed the title 801: /ai review 801: /ai review on every commit Mar 5, 2026
@naanci naanci closed this Mar 5, 2026
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