diff --git a/.github/workflows/gito-code-review.yml b/.github/workflows/gito-code-review.yml new file mode 100644 index 0000000..42fd5bd --- /dev/null +++ b/.github/workflows/gito-code-review.yml @@ -0,0 +1,38 @@ +name: "Gito: AI Code Review" +on: + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: + inputs: + pr_number: + description: "Pull Request number" + required: true +jobs: + review: + runs-on: ubuntu-latest + permissions: { contents: read, pull-requests: write } # required to post review comments + steps: + - uses: actions/checkout@v6 + with: { fetch-depth: 0 } + - name: Set up Python + uses: actions/setup-python@v6 + with: { python-version: "3.13" } + - name: Install AI Code Review tool + run: pip install gito.bot~=4.0 + - name: Run AI code review + env: + LLM_API_KEY: ${{ secrets.PPQ }} + LLM_API_TYPE: 'openai' + LLM_API_BASE: 'https://api.ppq.ai' + MODEL: 'moonshotai/kimi-k2.5' + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_NUMBER_FROM_WORKFLOW_DISPATCH: ${{ github.event.inputs.pr_number }} + run: | + gito --verbose review + gito github-comment + - uses: actions/upload-artifact@v6 + with: + name: gito-code-review-results + path: | + code-review-report.md + code-review-report.json