From 556243b19f8bf8ae4f26ef627290e6ff0de2aaf9 Mon Sep 17 00:00:00 2001 From: Zoe <13400804+zoe-icu@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:30:04 +0800 Subject: [PATCH 1/2] ci(py-test): add pull_request_target to allow fork PRs to access secrets Co-Authored-By: Claude Opus 4.6 --- .github/workflows/py-test.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/py-test.yml b/.github/workflows/py-test.yml index 17ff91a..65fd354 100644 --- a/.github/workflows/py-test.yml +++ b/.github/workflows/py-test.yml @@ -9,6 +9,10 @@ on: paths: - "apitable.py/**" - ".github/workflows/py-test.yml" + pull_request_target: + paths: + - "apitable.py/**" + - ".github/workflows/py-test.yml" jobs: unit_test: @@ -16,6 +20,8 @@ jobs: environment: api steps: - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} - uses: actions/setup-python@v4 with: python-version: 3.10.12 From 0a873c5f7f9124ffc6ce69e52a973868ca69783f Mon Sep 17 00:00:00 2001 From: Zoe <13400804+zoe-icu@users.noreply.github.com> Date: Wed, 8 Jul 2026 17:34:12 +0800 Subject: [PATCH 2/2] ci(py-test): skip integration test step when secrets are unavailable Co-Authored-By: Claude Opus 4.6 --- .github/workflows/py-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/py-test.yml b/.github/workflows/py-test.yml index 65fd354..915671e 100644 --- a/.github/workflows/py-test.yml +++ b/.github/workflows/py-test.yml @@ -35,6 +35,7 @@ jobs: make install make setup - name: test + if: ${{ secrets.TOKEN != '' }} env: DOMAIN: ${{secrets.DOMAIN}} TOKEN: ${{secrets.TOKEN}}