From 1dfdc26bab39322dc6ec65b2b78636d168d2ebae Mon Sep 17 00:00:00 2001 From: beppeb Date: Tue, 26 Aug 2025 05:14:37 +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, 16 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/code-review.yml b/.gitea/workflows/code-review.yml index 310c8ed..74ceee1 100644 --- a/.gitea/workflows/code-review.yml +++ b/.gitea/workflows/code-review.yml @@ -14,23 +14,23 @@ jobs: # 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 - 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 - 评论接口可用性 + 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 }}