更新 .gitea/workflows/code-review.yml
This commit is contained in:
@@ -22,30 +22,30 @@ jobs:
|
|||||||
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
|
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"
|
echo "diff endpoint OK"
|
||||||
|
|
||||||
- name: Preflight - 评论接口可用性
|
# - name: Preflight - 评论接口可用性
|
||||||
run: |
|
# run: |
|
||||||
set -e
|
# set -e
|
||||||
curl -sSf -X POST \
|
# curl -sSf -X POST \
|
||||||
-H "Authorization: token $GH_TOKEN" \
|
# -H "Authorization: token $GH_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
# -H "Content-Type: application/json" \
|
||||||
-d '{"body":"healthcheck from workflow"}' \
|
# -d '{"body":"healthcheck from workflow"}' \
|
||||||
"$BASE/api/v1/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments" >/dev/null
|
# "$BASE/api/v1/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments" >/dev/null
|
||||||
echo "comment endpoint OK"
|
# echo "comment endpoint OK"
|
||||||
- name: Preflight - OpenAI 连接
|
# - name: Preflight - OpenAI 连接
|
||||||
env:
|
# env:
|
||||||
OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
|
# OPENAI_TOKEN: ${{ secrets.OPENAI_TOKEN }}
|
||||||
# 可直连 OpenAI 则删除本行;需代理则改成你的代理地址,如 http://127.0.0.1:7890
|
# # 可直连 OpenAI 则删除本行;需代理则改成你的代理地址,如 http://127.0.0.1:7890
|
||||||
# OPENAI_PROXY: http://your-proxy:port
|
# OPENAI_PROXY: https://aiyjg.lol
|
||||||
run: |
|
# run: |
|
||||||
set -e
|
# set -e
|
||||||
curl -sS -i ${OPENAI_PROXY:+--proxy $OPENAI_PROXY} \
|
# curl -sS -i ${OPENAI_PROXY:+--proxy $OPENAI_PROXY} \
|
||||||
-H "Authorization: Bearer $OPENAI_TOKEN" \
|
# -H "Authorization: Bearer $OPENAI_TOKEN" \
|
||||||
https://api.openai.com/v1/models | head -n 1
|
# https://api.openai.com/v1/models | head -n 1
|
||||||
- name: OpenAI Code Review
|
- name: OpenAI Code Review
|
||||||
uses: ingress-it-solutions/gitea-code-review-action@v0.1
|
uses: ingress-it-solutions/gitea-code-review-action@v0.1
|
||||||
env:
|
env:
|
||||||
# 可直连则删除本行;需代理则改成你的代理地址
|
# 可直连则删除本行;需代理则改成你的代理地址
|
||||||
https://api.zhizengzeng.com/v1/chat/completions
|
OPENAI_PROXY: https://aiyjg.lol
|
||||||
with:
|
with:
|
||||||
SOURCE_AT: gitea
|
SOURCE_AT: gitea
|
||||||
GITHUB_BASE_URL: https://devstar.cn
|
GITHUB_BASE_URL: https://devstar.cn
|
||||||
|
|||||||
Reference in New Issue
Block a user