更新 .gitea/workflows/code-review.yml
This commit is contained in:
@@ -8,19 +8,19 @@ jobs:
|
|||||||
review:
|
review:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.issue.pull_request && (startsWith(github.event.comment.body, 'openai') || github.event.comment.body == 'openai')
|
if: github.event.issue.pull_request && (startsWith(github.event.comment.body, 'openai') || github.event.comment.body == 'openai')
|
||||||
env:
|
# env:
|
||||||
ACTIONS_STEP_DEBUG: 'true'
|
# ACTIONS_STEP_DEBUG: 'true'
|
||||||
BASE: https://devstar.cn
|
# BASE: https://devstar.cn
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
# GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||||
|
|
||||||
steps:
|
# steps:
|
||||||
- name: Preflight - diff 接口可用性
|
# - name: Preflight - diff 接口可用性
|
||||||
run: |
|
# run: |
|
||||||
set -e
|
# set -e
|
||||||
echo "repo=${{ github.repository }}"
|
# echo "repo=${{ github.repository }}"
|
||||||
echo "issue.number=${{ github.event.issue.number }}"
|
# 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
|
# 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: |
|
||||||
@@ -43,12 +43,13 @@ jobs:
|
|||||||
# 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:
|
||||||
# 可直连则删除本行;需代理则改成你的代理地址
|
# # 可直连则删除本行;需代理则改成你的代理地址
|
||||||
OPENAI_PROXY: https://aiyjg.lol
|
# 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
|
||||||
|
OPENAI_BASE_URL: 'https://aiyjg.lol'
|
||||||
PROGRAMMING_LANGUAGE: 'JavaScript' # 避免使用 auto
|
PROGRAMMING_LANGUAGE: 'JavaScript' # 避免使用 auto
|
||||||
FULL_REVIEW_COMMENT: openai
|
FULL_REVIEW_COMMENT: openai
|
||||||
REVIEW_COMMENT_PREFIX: 'openai:'
|
REVIEW_COMMENT_PREFIX: 'openai:'
|
||||||
|
|||||||
Reference in New Issue
Block a user