From 2c7f28d15f4574e02245ed4ac65ca7cebcc6cead Mon Sep 17 00:00:00 2001 From: Maciej Witowski Date: Tue, 1 Sep 2026 11:14:41 +0200 Subject: [PATCH] ci: remove the Codex review workflow Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Lq4e74miLyjH8aAmt2pH3w --- .github/workflows/codex-review.yml | 110 ----------------------------- 1 file changed, 110 deletions(-) delete mode 100644 .github/workflows/codex-review.yml diff --git a/.github/workflows/codex-review.yml b/.github/workflows/codex-review.yml deleted file mode 100644 index 2391057..0000000 --- a/.github/workflows/codex-review.yml +++ /dev/null @@ -1,110 +0,0 @@ -name: Codex Review - -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - -concurrency: - group: codex-review-${{ github.event.pull_request.number || github.run_id }} - cancel-in-progress: true - -jobs: - codex: - name: Generate Review - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }} - runs-on: ubuntu-latest - permissions: - contents: read - env: - OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - outputs: - final_message: ${{ steps.run_codex.outputs.final-message }} - steps: - - uses: actions/checkout@v6 - with: - # Explicitly check out the PR's merge commit. - ref: refs/pull/${{ github.event.pull_request.number }}/merge - fetch-depth: 0 - - - name: Pre-fetch base and head refs for the PR - run: | - git fetch --no-tags origin \ - ${{ github.event.pull_request.base.ref }} \ - +refs/pull/${{ github.event.pull_request.number }}/head - - - name: Run Codex - if: ${{ env.OPENAI_API_KEY != '' }} - uses: openai/codex-action@v1 - id: run_codex - with: - openai-api-key: ${{ env.OPENAI_API_KEY }} - prompt: | - This is PR #${{ github.event.pull_request.number }} for ${{ github.repository }}. - - Review ONLY the changes introduced by the PR, and consider: - git log --oneline ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} - git diff --stat ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} - git diff ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} - - Focus on: - - correctness issues or regressions - - security concerns - - missing tests around changed behavior - - maintainability issues likely to cause future bugs - - Keep feedback concise and actionable. If there are no findings, say so explicitly. - - Pull request title and body: - ---- - ${{ github.event.pull_request.title }} - ${{ github.event.pull_request.body }} - - post_feedback: - name: Post Review Comment - needs: codex - runs-on: ubuntu-latest - if: ${{ needs.codex.result == 'success' && needs.codex.outputs.final_message != '' }} - permissions: - issues: write - pull-requests: write - steps: - - uses: actions/github-script@v8 - env: - CODEX_FINAL_MESSAGE: ${{ needs.codex.outputs.final_message }} - with: - github-token: ${{ github.token }} - script: | - const marker = ""; - const body = `${marker}\n## Codex Review\n\n${process.env.CODEX_FINAL_MESSAGE}`; - - const { owner, repo } = context.repo; - const issue_number = context.payload.pull_request.number; - - const { data: comments } = await github.rest.issues.listComments({ - owner, - repo, - issue_number, - per_page: 100, - }); - - const existing = comments.find( - (comment) => - comment.user?.type === "Bot" && - comment.body?.includes(marker), - ); - - if (existing) { - await github.rest.issues.updateComment({ - owner, - repo, - comment_id: existing.id, - body, - }); - } else { - await github.rest.issues.createComment({ - owner, - repo, - issue_number, - body, - }); - }