From e14f968c095778c7a547c51a377300ee1e1e063f Mon Sep 17 00:00:00 2001 From: atherdon <1469198+atherdon@users.noreply.github.com> Date: Mon, 26 Oct 2026 19:47:56 +0200 Subject: [PATCH] ci: add xAI code review workflow Co-authored-by: petroved --- .github/workflows/xai-code-review.yml | 29 +++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/xai-code-review.yml diff --git a/.github/workflows/xai-code-review.yml b/.github/workflows/xai-code-review.yml new file mode 100644 index 0000000..f17e41a --- /dev/null +++ b/.github/workflows/xai-code-review.yml @@ -0,0 +1,29 @@ +name: xAI Code Review + +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +permissions: + contents: read + pull-requests: write + +concurrency: + group: xai-code-review-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + review: + name: Review + runs-on: ubuntu-latest + # Skip drafts, bot PRs (Renovate/Dependabot) and forks (secrets unavailable there) + if: >- + github.event.pull_request.draft == false && + github.event.pull_request.user.type != 'Bot' && + github.event.pull_request.head.repo.full_name == github.repository + steps: + - name: Code Review + uses: tarmojussila/xai-code-review@d86fe10ac75980e564824bbe76648b7d6e0f44c5 # v0.1.1 + with: + XAI_API_KEY: ${{ secrets.XAI_API_KEY }} + MAX_DIFF_CHARS: "100000"