From 4fe3e3439d8df4ae8a0766290e0310b2012769cb Mon Sep 17 00:00:00 2001 From: Indent-Bot Date: Fri, 18 Jul 2025 16:06:18 -0400 Subject: [PATCH] Add indent_pr_review.yaml --- .github/workflows/indent_pr_review.yaml | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/indent_pr_review.yaml diff --git a/.github/workflows/indent_pr_review.yaml b/.github/workflows/indent_pr_review.yaml new file mode 100644 index 0000000..65aa5c6 --- /dev/null +++ b/.github/workflows/indent_pr_review.yaml @@ -0,0 +1,42 @@ + +name: Indent PR Review + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + indent: + #### (Optional) Uncomment the `if` condition below to only run the workflow if the PR is labeled with 'indent'. + #### It's recommended to also add 'labeled' to the `pull_request: types:` list above. + # + # if: contains(github.event.pull_request.labels.*.name, 'indent') + runs-on: ubuntu-latest + timeout-minutes: 30 + 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 uv + uses: astral-sh/setup-uv@v5 + with: + enable-cache: true + cache-dependency-glob: | + **/uv.lock + **/pyproject.toml + + - name: Login to Indent + run: uvx indent-ai login --key ${{ secrets.PR_REVIEW_INDENT_API_KEY }} + + - name: Generate dynamic prompt and run Indent + env: + EXPONENT_API_KEY: ${{ secrets.PR_REVIEW_INDENT_API_KEY }} + PR_NUMBER: ${{ github.event.number }} + run: | + uvx indent-ai run --workflow-id indent_pr_review +