From bf8e2a4cea5f6eaa1cdd4a6c5ec1d995b09ee26e Mon Sep 17 00:00:00 2001 From: Nathan Rover Date: Thu, 10 Sep 2026 08:24:31 -0400 Subject: [PATCH] Remove the org Grok code review workflow The org ruleset "Require Grok code review" has been disabled since 2026-07-30, so this file only ran on this repository's own pull requests. The OpenRouter review workflow, injected org-wide by the "Require OpenRouter code review" ruleset, replaces it. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/grok-code-review.yml | 109 ------------------------- 1 file changed, 109 deletions(-) delete mode 100644 .github/workflows/grok-code-review.yml diff --git a/.github/workflows/grok-code-review.yml b/.github/workflows/grok-code-review.yml deleted file mode 100644 index 567399c..0000000 --- a/.github/workflows/grok-code-review.yml +++ /dev/null @@ -1,109 +0,0 @@ -# Organization-required Grok Build PR review. -# Enforced via org ruleset "Require Grok code review" pointing at this file. -# Auth: org-level XAI_API_KEY only (CLI env_key + https://api.x.ai/v1). -# No SuperGrok session fallback. -# -# First pass (opened, reopened, ready_for_review, workflow_dispatch): grok-4.6, -# default effort (empty input; the action adds --effort only when set), -# max_turns 50. Do not set effort low. -# Follow-up (synchronize): grok-4.6, effort low, max_turns 15. The action -# still embeds the full PR diff; lower effort + fewer turns is the control. -# -# Concurrency is split by pass type so synchronize does not cancel an in-flight -# first pass. cancel-in-progress stays on: first-pass events cancel each other, -# and synchronize follow-ups cancel each other. -name: Grok code review - -on: - pull_request: - types: [opened, synchronize, reopened, ready_for_review] - # Optional manual re-run from the Actions tab on a PR's head repo - workflow_dispatch: - inputs: - pr_number: - description: PR number to review - required: true - type: string - -permissions: - contents: read - pull-requests: write - -concurrency: - group: grok-code-review-${{ github.repository }}-${{ github.event.pull_request.number || github.event.inputs.pr_number }}-${{ (github.event_name == 'pull_request' && github.event.action == 'synchronize') && 'follow-up' || 'first-pass' }} - cancel-in-progress: true - -jobs: - review: - name: Grok Build review - if: >- - github.event_name == 'workflow_dispatch' || - (github.event_name == 'pull_request' && !github.event.pull_request.draft) - runs-on: ubuntu-latest - timeout-minutes: 30 - env: - XAI_API_KEY: ${{ secrets.XAI_API_KEY }} - GROK_MODEL: grok-4.6 - GROK_EFFORT: ${{ (github.event_name == 'pull_request' && github.event.action == 'synchronize') && 'low' || '' }} - GROK_MAX_TURNS: ${{ (github.event_name == 'pull_request' && github.event.action == 'synchronize') && '15' || '50' }} - GROK_CUSTOM_INSTRUCTIONS: ${{ (github.event_name == 'pull_request' && github.event.action == 'synchronize') && 'Review only the latest commit. Do not re-litigate already-posted findings.' || '' }} - steps: - - name: Checkout PR head - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: 0 - ref: ${{ github.event.pull_request.head.sha || github.sha }} - - - name: Require XAI_API_KEY - run: | - if [ -z "${XAI_API_KEY}" ]; then - echo "::error::XAI_API_KEY is empty. Set the org-level XAI_API_KEY secret. This workflow does not fall back to SuperGrok session auth." - exit 1 - fi - - - name: Write Grok API key config - if: ${{ env.XAI_API_KEY != '' }} - run: | - mkdir -p "$HOME/.grok" - cat > "$HOME/.grok/config.toml" <<'EOF' - [model."grok-4.6"] - model = "grok-4.6" - base_url = "https://api.x.ai/v1" - env_key = "XAI_API_KEY" - [models] - default = "grok-4.6" - EOF - - - name: Run Grok Build review - id: grok - uses: 0xr3ngar/grok-build-review-action@eded30018cdee4e83dfca14d18f292b860c30cdd # v1.0.2 - with: - # Action requires this input and writes ~/.grok/auth.json. Dummy JSON - # satisfies the composite; real auth is config.toml + XAI_API_KEY. - grok_auth_json: "{}" - github_token: ${{ github.token }} - pr_number: ${{ github.event.pull_request.number || github.event.inputs.pr_number }} - model: ${{ env.GROK_MODEL }} - effort: ${{ env.GROK_EFFORT }} - max_turns: ${{ env.GROK_MAX_TURNS }} - custom_instructions: ${{ env.GROK_CUSTOM_INSTRUCTIONS }} - roast_level: professional - fail_on: never - status_comments: "true" - - - name: Summary - if: always() - run: | - { - echo "### Grok code review" - echo "" - echo "| Field | Value |" - echo "| --- | --- |" - echo "| Model | \`${{ env.GROK_MODEL }}\` |" - echo "| Effort | \`${{ env.GROK_EFFORT }}\` |" - echo "| Max turns | \`${{ env.GROK_MAX_TURNS }}\` |" - echo "| Verdict | \`${{ steps.grok.outputs.verdict }}\` |" - echo "| Issues | \`${{ steps.grok.outputs.issue_count }}\` |" - echo "| Bugs | \`${{ steps.grok.outputs.bug_count }}\` |" - echo "| Review | ${{ steps.grok.outputs.review_url }}" - } >> "$GITHUB_STEP_SUMMARY"