mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-08-12 08:50:38 +00:00
111 lines
3.9 KiB
YAML
111 lines
3.9 KiB
YAML
name: Issue Management
|
||
permissions:
|
||
issues: write
|
||
contents: read
|
||
|
||
on:
|
||
issues:
|
||
types: [opened, labeled]
|
||
issue_comment:
|
||
types: [created]
|
||
|
||
jobs:
|
||
welcome-new-issues:
|
||
if: github.event.action == 'opened'
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- name: Welcome new issue
|
||
uses: peter-evans/create-or-update-comment@v5
|
||
with:
|
||
issue-number: ${{ github.event.issue.number }}
|
||
body: |
|
||
感谢您在该仓库提出问题!我们非常重视您的反馈,并希望尽快为您提供帮助。
|
||
|
||
如果您在一周左右的时间里没有收到我们的回复,请在下方留言,以便我们注意到。我们的大部分审核都是志愿者,有时难免会有疏漏。
|
||
|
||
你可能会想要尝试以下方法来获得更快的帮助:
|
||
- 📖 查看[项目文档](https://neteasecloudmusicapienhanced.js.org)
|
||
- 💬 加入[QQ交流群](https://qm.qq.com/q/TpeP9Uv2yk)
|
||
- 🔍 搜索[现有issues](https://github.com/neteasecloudmusicapienhanced/api-enhanced/issues) 看是否有类似问题
|
||
|
||
triage:
|
||
runs-on: ubuntu-latest
|
||
permissions:
|
||
id-token: write
|
||
contents: write
|
||
pull-requests: write
|
||
issues: write
|
||
steps:
|
||
- name: Check account age
|
||
id: check
|
||
uses: actions/github-script@v7
|
||
with:
|
||
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 }}
|
||
|
||
- 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: |
|
||
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'
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- name: Mark stale issues
|
||
uses: actions/stale@v10
|
||
with:
|
||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||
stale-issue-message: |
|
||
这个issue已经30天没有活动了。
|
||
|
||
如果这个问题仍然存在,请回复此评论说明当前状态。
|
||
否则,这个issue将在7天后自动关闭。
|
||
|
||
您可以随时重新打开已关闭的issue。
|
||
stale-pr-message: |
|
||
这个PR已经30天没有活动了。
|
||
|
||
如果您仍在处理这个PR,请回复此评论。
|
||
否则,这个PR将在7天后自动关闭。
|
||
days-before-stale: 30
|
||
days-before-close: 7
|
||
stale-issue-label: "stale"
|
||
stale-pr-label: "stale"
|
||
exempt-issue-labels: "pinned,enhancement,priority:high,ongoing,fatal"
|
||
exempt-pr-labels: "pinned,priority:high,ongoing,fatal" |