mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 14:41:23 +08:00
ci: test ci with workflow file
This commit is contained in:
@@ -28,29 +28,60 @@ jobs:
|
||||
- 💬 加入[QQ交流群](https://qm.qq.com/q/TpeP9Uv2yk)
|
||||
- 🔍 搜索[现有issues](https://github.com/neteasecloudmusicapienhanced/api-enhanced/issues) 看是否有类似问题
|
||||
|
||||
handle-help-wanted:
|
||||
if: contains(github.event.issue.labels.*.name, 'question')
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: write
|
||||
pull-requests: write
|
||||
issues: write
|
||||
steps:
|
||||
- name: Add help resources
|
||||
uses: peter-evans/create-or-update-comment@v5
|
||||
- name: Check account age
|
||||
id: check
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
issue-number: ${{ github.event.issue.number }}
|
||||
body: |
|
||||
🆘 需要帮助?
|
||||
script: |
|
||||
const user = await github.rest.users.getByUsername({
|
||||
username: context.payload.issue.user.login
|
||||
});
|
||||
const created = new Date(user.data.created_at);
|
||||
const days = (Date.now() - created) / (1000 * 60 * 60 * 24);
|
||||
return days >= 30;
|
||||
result-encoding: string
|
||||
|
||||
这里有一些可能对您有用的资源:
|
||||
- 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 }}
|
||||
|
||||
📚 **文档资源**
|
||||
- [项目文档](https://neteasecloudmusicapienhanced.js.org)
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
token: ${{ steps.token.outputs.token }}
|
||||
|
||||
🔍 **常见问题**
|
||||
- 搜索[已关闭的issues](https://github.com/neteasecloudmusicapienhanced/api-enhanced/issues?q=is%3Aissue+is%3Aclosed) 看看是否有类似的问题已经被解答。
|
||||
- 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"
|
||||
|
||||
💬 **即时帮助**
|
||||
- 加入QQ群:https://qm.qq.com/q/TpeP9Uv2yk
|
||||
|
||||
如果以上资源无法解决您的问题,请提供更多详细信息,我们会尽快为您解答!
|
||||
- name: Run opencode
|
||||
uses: anomalyco/opencode/github@latest
|
||||
env:
|
||||
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
|
||||
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
|
||||
with:
|
||||
model: opencode/deepseek-v4-flash-free
|
||||
use_github_token: true
|
||||
prompt: |
|
||||
Review this issue. If there's a clear fix or relevant docs:
|
||||
- Provide documentation links
|
||||
- Add error handling guidance for code examples
|
||||
Otherwise, do not comment.
|
||||
${{ secrets.OPENCODE_PROMPT }}
|
||||
|
||||
stale-issues:
|
||||
if: github.event.action == 'opened'
|
||||
|
||||
@@ -5,8 +5,6 @@ on:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -51,4 +49,5 @@ jobs:
|
||||
with:
|
||||
model: opencode/deepseek-v4-flash-free
|
||||
use_github_token: true
|
||||
prompt: ${{ secrets.OPENCODE_PROMPT }}
|
||||
prompt: |
|
||||
${{ secrets.OPENCODE_PROMPT }}
|
||||
@@ -0,0 +1,50 @@
|
||||
name: PR Reviewer
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
review:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
pull-requests: read
|
||||
issues: read
|
||||
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
|
||||
uses: anomalyco/opencode/github@latest
|
||||
env:
|
||||
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
|
||||
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
|
||||
with:
|
||||
model: opencode/deepseek-v4-flash-free
|
||||
use_github_token: true
|
||||
prompt: |
|
||||
${{ secrets.PR_REVIEW_PROMPT }}
|
||||
${{ secrets.OPENCODE_PROMPT }}
|
||||
Reference in New Issue
Block a user