From c0dcd18b96ad8a2cd163803e58f5b995495db550 Mon Sep 17 00:00:00 2001 From: Nancy Huang <205217630+naanci@users.noreply.github.com> Date: Tue, 3 Mar 2026 23:56:53 -0500 Subject: [PATCH 1/3] 801: ai fix --- .github/workflows/ai-review.yml | 41 ++++++++++++++++++++++++--------- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ai-review.yml b/.github/workflows/ai-review.yml index 935595f24..fd45b0d24 100644 --- a/.github/workflows/ai-review.yml +++ b/.github/workflows/ai-review.yml @@ -3,35 +3,33 @@ run-name: Running AI code review on ${{ github.actor }}'s branch on: pull_request: - types: [opened, reopened, ready_for_review, synchronize] - issue_comment: - types: [created] + types: [reopened, ready_for_review, synchronize] permissions: - contents: write - issues: write + contents: read pull-requests: write concurrency: - group: pr-ai-${{ github.event.number || github.event.issue.number }}-${{ github.event.comment.body || 'pr' }} + group: pr-ai-${{ github.event.number }} cancel-in-progress: true jobs: getPRHead: name: Get PR head SHA runs-on: ubuntu-latest - if: github.event_name == 'pull_request' || (github.event_name == 'issue_comment' && (github.event.comment.body == '/review' || github.event.comment.body == '/describe' || github.event.comment.body == '/improve')) outputs: sha: ${{ steps.pr-head.outputs.result }} - prId: ${{ github.event.number || github.event.issue.number }} + prId: ${{ github.event.number }} steps: - name: Get PR head SHA id: pr-head - uses: actions/github-script@v7 + uses: actions/github-script@v7` + env: + PR_ID: ${{ github.event.number }} with: result-encoding: string script: | - const prId = ${{ github.event.number || github.event.issue.number }}; + const prId = process.env.PR_ID; const { data: pr } = await github.rest.pulls.get({ owner: context.repo.owner, repo: context.repo.repo, @@ -48,7 +46,7 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - ref: ${{ needs.getPRHead.outputs.sha }} + ref: ${{ github.event.pull_request.base.sha }} - name: Setup CI uses: ./.github/composite/setup-ci @@ -63,6 +61,27 @@ jobs: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} UNLOAD_ENVIRONMENTS: ci + - 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: Run composite workflow uses: ./.github/composite/notion-checks id: notion_check From 08002e281d90911892729af2c4b3f46641b1da74 Mon Sep 17 00:00:00 2001 From: Nancy Huang <205217630+naanci@users.noreply.github.com> Date: Wed, 4 Mar 2026 00:21:22 -0500 Subject: [PATCH 2/3] 801: blablabla --- .github/workflows/ai-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ai-review.yml b/.github/workflows/ai-review.yml index fd45b0d24..7da1a7afa 100644 --- a/.github/workflows/ai-review.yml +++ b/.github/workflows/ai-review.yml @@ -3,7 +3,7 @@ run-name: Running AI code review on ${{ github.actor }}'s branch on: pull_request: - types: [reopened, ready_for_review, synchronize] + types: [open, reopened, ready_for_review, synchronize] permissions: contents: read From 42b67324565a8becc2dc3e5e430f26760a800694 Mon Sep 17 00:00:00 2001 From: Nancy Huang <205217630+naanci@users.noreply.github.com> Date: Wed, 4 Mar 2026 00:22:12 -0500 Subject: [PATCH 3/3] 801: fhaksdja --- .github/workflows/ai-review.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ai-review.yml b/.github/workflows/ai-review.yml index 7da1a7afa..18a323b94 100644 --- a/.github/workflows/ai-review.yml +++ b/.github/workflows/ai-review.yml @@ -3,7 +3,7 @@ run-name: Running AI code review on ${{ github.actor }}'s branch on: pull_request: - types: [open, reopened, ready_for_review, synchronize] + types: [opened, reopened, ready_for_review, synchronize] permissions: contents: read