From 33b0426313c2e1376e6ebdce1b681d1f1b49a931 Mon Sep 17 00:00:00 2001 From: beppeb Date: Tue, 26 Aug 2025 05:21:24 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitea/workflows/code-revi?= =?UTF-8?q?ew.yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/code-review.yml | 32 +------------------------------- 1 file changed, 1 insertion(+), 31 deletions(-) diff --git a/.gitea/workflows/code-review.yml b/.gitea/workflows/code-review.yml index 18768e5..e37be13 100644 --- a/.gitea/workflows/code-review.yml +++ b/.gitea/workflows/code-review.yml @@ -8,39 +8,9 @@ jobs: code-review: runs-on: ubuntu-latest if: github.event.issue.pull_request && (startsWith(github.event.comment.body, 'openai') || github.event.comment.body == 'openai') - env: - ACTIONS_STEP_DEBUG: 'true' - BASE: https://devstar.cn - GH_TOKEN: ${{ secrets.GH_TOKEN }} steps: - - name: Preflight - diff 接口可用性 - run: | - set -e - echo "repo=${{ github.repository }}" - echo "issue.number=${{ github.event.issue.number }}" - curl -sSf -H "Authorization: token $GH_TOKEN" -H "Accept: application/vnd.github.diff" "$BASE/api/v1/repos/${{ github.repository }}/pulls/${{ github.event.issue.number }}.diff" >/dev/null - echo "diff endpoint OK" - - - name: Preflight - 评论接口可用性 - run: | - set -e - curl -sSf -X POST \ - -H "Authorization: token $GH_TOKEN" \ - -H "Content-Type: application/json" \ - -d '{"body":"healthcheck from workflow"}' \ - "$BASE/api/v1/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments" >/dev/null - echo "comment endpoint OK" - # - name: Preflight - OpenAI 连接 - # env: - # OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }} - # # 可直连 OpenAI 则删除本行;需代理则改成你的代理地址,如 http://127.0.0.1:7890 - # OPENAI_PROXY: https://aiyjg.lol - # run: | - # set -e - # curl -sS -i ${OPENAI_PROXY:+--proxy $OPENAI_PROXY} \ - # -H "Authorization: Bearer $OPENAI_TOKEN" \ - # https://api.openai.com/v1/models | head -n 1 + - name: OpenAI Code Review uses: sgxya/gitea-code-review-action@main # env: