Files
cc-connect/.github/workflows/issue-reply.yml
T
Workflow config file is invalid. Please check your config file: go-yaml load error in scanner at L45.C20: mapping values are not allowed in this context
chenhg5andClaude 34e96c0478 ci: add GitHub workflows for issue handling and update Go setup
Add new workflows:
- issue-reply.yml: Automatically greet new issue creators
- stale.yml: Handle stale issues and PRs with automated warnings/closures
Update ci.yml to use go-version-file instead of hardcoded Go version

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-13 09:43:59 +08:00

50 lines
1.4 KiB
YAML

name: Issue Reply
on:
issues:
types: [opened]
jobs:
greet:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Greet new issue
uses: actions/github-script@v7
with:
script: |
const issue = context.payload.issue;
const author = issue.user.login;
// 检查是否是首次提 issue
const { data: issues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
creator: author,
state: 'all'
});
const isFirstIssue = issues.length === 1;
let comment;
if (isFirstIssue) {
comment = `👋 Hi @${author}! Thanks for opening your first issue here!
We'll review it as soon as possible. While waiting, please make sure:
- You've provided enough details about the issue
- Any error messages are included in full
- For feature requests, describe your use case
Thanks for your feedback!`;
} else {
comment = `👋 Thanks @${author} for opening this issue! We'll take a look soon.`;
}
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: comment
});