mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-08-12 17:10:37 +00:00
fix: 修正workflow文件
This commit is contained in:
parent
9608da9b96
commit
a79a2d9ef6
2
.github/workflows/opencode.yml
vendored
2
.github/workflows/opencode.yml
vendored
@ -5,8 +5,6 @@ on:
|
|||||||
types: [created]
|
types: [created]
|
||||||
pull_request_review_comment:
|
pull_request_review_comment:
|
||||||
types: [created]
|
types: [created]
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened, ready_for_review]
|
|
||||||
issues:
|
issues:
|
||||||
types: [opened]
|
types: [opened]
|
||||||
|
|
||||||
|
|||||||
46
.github/workflows/pr-reviewer.yml
vendored
Normal file
46
.github/workflows/pr-reviewer.yml
vendored
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
name: opencode-review
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened, ready_for_review]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
review:
|
||||||
|
# 跳过 fork 来的 PR:GitHub 不会把 secrets 传给 fork PR 触发的工作流,
|
||||||
|
# 跑了也必然失败,所以直接跳过避免噪音(平台限制,非配置问题)。
|
||||||
|
if: github.event.pull_request.head.repo.fork == false
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Generate bot token
|
||||||
|
id: token
|
||||||
|
uses: actions/create-github-app-token@v1
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.APP_ID }}
|
||||||
|
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||||
|
owner: ${{ github.repository_owner }}
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
token: ${{ steps.token.outputs.token }}
|
||||||
|
|
||||||
|
- name: Configure git identity
|
||||||
|
run: |
|
||||||
|
git config --global user.name "takanashi-hoshino-agent[bot]"
|
||||||
|
git config --global user.email "takanashi-hoshino-agent[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
|
- name: Run opencode review
|
||||||
|
uses: anomalyco/opencode/github@latest
|
||||||
|
env:
|
||||||
|
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
|
||||||
|
# 用自定义 GitHub App 生成的 bot token,跟原 opencode.yml 一致,
|
||||||
|
# 评论 PR / 提交都走 takanashi-hoshino-agent[bot] 的身份。
|
||||||
|
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
|
||||||
|
with:
|
||||||
|
model: opencode/deepseek-v4-flash-free
|
||||||
|
use_github_token: true
|
||||||
|
prompt: ${{ secrets.OPENCODE_PROMPT }}
|
||||||
Loading…
x
Reference in New Issue
Block a user