Automated code reviews with Exponent
exponent-run-bot
PR_REVIEW_EXPONENT_API_KEY
EXPONENT_BOT_GH_PAT
.github/workflows
name: PR Review on: pull_request: types: [opened, synchronize, reopened] jobs: pr-review: runs-on: ubuntu-latest timeout-minutes: 15 steps: - name: Checkout code uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.12.2" - name: Install gh CLI run: | sudo apt-get update sudo apt-get install gh - name: Authenticate gh CLI run: | echo "${{ secrets.EXPONENT_BOT_GH_PAT }}" | gh auth login --with-token - name: Install exponent-run run: pipx install exponent-run - name: Login to Exponent run: exponent login --key ${{ secrets.PR_REVIEW_EXPONENT_API_KEY }} - name: Run Exponent env: EXPONENT_API_KEY: ${{ secrets.PR_REVIEW_EXPONENT_API_KEY }} INPUT_JSON: ${{ toJSON(github.event) }} run: | printf '%s\n' "$INPUT_JSON" > workflow_input.json exponent run --workflow-id exponent_pr_review