diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md deleted file mode 100644 index 7ea0001c..00000000 --- a/.github/ISSUE_TEMPLATE/bug.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -name: Bug report / 错误报告 -about: Create a report to help us improve / 创建报告以帮助我们改进 -title: "[bug]请补充标题内容" -labels: bug ---- - - - -- 系统环境 / System Environment: - - -- BetterGI版本号 / BetterGI Version: - - -- 问题描述 / Description of the issue: - - -- 复现步骤 / Reproduction steps: - diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml new file mode 100644 index 00000000..aee9294e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -0,0 +1,41 @@ +name: Bug report / 错误报告 +description: 提交可复现的问题,帮助我们定位错误 / Report a reproducible problem +title: "[bug] " +labels: + - BUG +body: + - type: textarea + id: environment + attributes: + label: 系统环境 + description: System Environment,例如系统版本、运行环境 + placeholder: Win11 / BetterGI 0.58.0 / .NET 8 + validations: + required: true + - type: input + id: version + attributes: + label: BetterGI 版本号 + description: BetterGI Version + placeholder: 0.58.0 + validations: + required: true + - type: textarea + id: description + attributes: + label: 问题描述 + description: Description of the issue + placeholder: 请详细描述你遇到的问题,可直接粘贴日志并附带截图 + validations: + required: true + - type: textarea + id: steps + attributes: + label: 复现步骤 + description: Reproduction steps + placeholder: |- + 1. 打开…… + 2. 点击…… + 3. 出现…… + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/feature.md b/.github/ISSUE_TEMPLATE/feature.md deleted file mode 100644 index 9e8b792b..00000000 --- a/.github/ISSUE_TEMPLATE/feature.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: I have feature requesting / 我有新功能请求 -about: Your request may come as a surprise. / 你的请求也许成为惊喜 -title: "[feature] " -labels: feature 功能请求 ---- - -- Your feature requesting / 你的新功能请求 - diff --git a/.github/ISSUE_TEMPLATE/feature.yml b/.github/ISSUE_TEMPLATE/feature.yml new file mode 100644 index 00000000..35820331 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature.yml @@ -0,0 +1,30 @@ +name: I have feature requesting / 我有功能需求 +description: 提出新的功能想法 / Share a feature request +title: "[feature] " +labels: + - 功能建议 +body: + - type: textarea + id: request + attributes: + label: 功能请求 + description: Feature Request + placeholder: 请简要说明你希望新增什么能力 + validations: + required: true + - type: textarea + id: scenario + attributes: + label: 使用场景 + description: Use Case + placeholder: 这个功能要解决什么问题?在哪些场景下使用? + validations: + required: true + - type: textarea + id: extra + attributes: + label: 补充信息 + description: Optional + placeholder: 可选,补充示意图、参考方案或限制条件 + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/normal.md b/.github/ISSUE_TEMPLATE/normal.md deleted file mode 100644 index 2b03cdcf..00000000 --- a/.github/ISSUE_TEMPLATE/normal.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -name: Feel free to express / 随便写写 -about: Record something / 简单写写记录记录 ---- - diff --git a/.github/ISSUE_TEMPLATE/normal.yml b/.github/ISSUE_TEMPLATE/normal.yml new file mode 100644 index 00000000..ad71e485 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/normal.yml @@ -0,0 +1,12 @@ +name: Feel free to express / 自由描述 +description: 记录你想反馈的内容 / Share general feedback +title: "[feedback] " +body: + - type: textarea + id: description + attributes: + label: 描述 + description: Description + placeholder: 请描述你想反馈的内容 + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index 1f03a9e0..00000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: I have a question / 我有疑问 -about: Solve your problem / 解决你的疑问 -title: "[question] " -labels: question ---- - -- Problem Description / 问题描述 -- 请尽量提供问题相关的截图/日志等内容 diff --git a/.github/ISSUE_TEMPLATE/question.yml b/.github/ISSUE_TEMPLATE/question.yml new file mode 100644 index 00000000..81c97c14 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question.yml @@ -0,0 +1,22 @@ +name: I have a question / 我有疑问 +description: 提交你的问题,我们会尽量帮助你解决 / Ask a question +title: "[question] " +labels: + - 问题咨询 +body: + - type: textarea + id: question + attributes: + label: 问题描述 + description: Problem Description + placeholder: 请清楚描述你的问题 + validations: + required: true + - type: textarea + id: tried + attributes: + label: 已尝试内容 + description: Screenshots / logs / what you already tried + placeholder: 可附上截图、日志,以及你已经尝试过的排查过程 + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/suggestion.md b/.github/ISSUE_TEMPLATE/suggestion.md deleted file mode 100644 index 7c3bf708..00000000 --- a/.github/ISSUE_TEMPLATE/suggestion.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -name: I have suggestions / 我有建议 -about: Your suggestions may benefit everyone / 你的建议可能让所有人受益 -title: "[suggestion] " -labels: suggestion ---- - -- Your suggestions / 你的建议 - diff --git a/.github/ISSUE_TEMPLATE/suggestion.yml b/.github/ISSUE_TEMPLATE/suggestion.yml new file mode 100644 index 00000000..8d24b45e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/suggestion.yml @@ -0,0 +1,22 @@ +name: I have suggestions / 我有建议 +description: 分享对项目的改进建议 / Share an improvement suggestion +title: "[suggestion] " +labels: + - 功能建议 +body: + - type: textarea + id: suggestion + attributes: + label: 建议内容 + description: Suggestion + placeholder: 请描述你的建议内容 + validations: + required: true + - type: textarea + id: benefit + attributes: + label: 预期收益 + description: Expected Benefit + placeholder: 这个建议会给用户或项目带来什么帮助? + validations: + required: true diff --git a/.github/repo-bot.yml b/.github/repo-bot.yml new file mode 100644 index 00000000..c4bd5745 --- /dev/null +++ b/.github/repo-bot.yml @@ -0,0 +1,227 @@ +runtime: + languageMode: auto + dryRun: false + +providers: + openAiCompatible: + enabled: true + baseUrl: https://api.openai.com/v1 + model: gpt-5.4 + apiStyle: responses + timeoutMs: 30000 + +issues: + validation: + enabled: true + fallbackTemplateKey: normal + commentAnchor: issue-bot:validation + templates: + - key: bug + detect: + markers: + - bug + titlePrefixes: + - "[bug]" + requiredSections: + - id: environment + aliases: + - 系统环境 + - System Environment + - id: version + aliases: + - BetterGI 版本号 + - BetterGI Version + - id: description + aliases: + - 问题描述 + - Description of the issue + - id: steps + aliases: + - 复现步骤 + - Reproduction steps + labels: + whenValid: + - BUG + whenInvalid: + - 需要更多信息 + - key: feature + detect: + markers: + - feature + titlePrefixes: + - "[feature]" + requiredSections: + - id: request + aliases: + - 功能请求 + - Feature Request + - id: scenario + aliases: + - 使用场景 + - Use Case + labels: + whenValid: + - 功能建议 + whenInvalid: + - 需要更多信息 + - key: suggestion + detect: + markers: + - suggestion + titlePrefixes: + - "[suggestion]" + requiredSections: + - id: suggestion + aliases: + - 建议内容 + - Suggestion + - id: benefit + aliases: + - 预期收益 + - Expected Benefit + labels: + whenValid: + - 功能建议 + whenInvalid: + - 需要更多信息 + - key: question + detect: + markers: + - question + titlePrefixes: + - "[question]" + requiredSections: + - id: question + aliases: + - 问题描述 + - Problem Description + - id: tried + aliases: + - 已尝试内容 + - What I Tried + labels: + whenValid: + - 问题咨询 + whenInvalid: + - 需要更多信息 + - key: normal + detect: + markers: + - normal + titlePrefixes: + - "[feedback]" + - "[normal]" + requiredSections: + - id: description + aliases: + - 描述 + - Description + labels: + whenValid: [] + whenInvalid: + - 需要更多信息 + duplicateDetection: + enabled: true + bypassLabels: + - 跳过重复检测 + duplicateLabel: 重复 + searchResultLimit: 50 + candidateLimit: 20 + aiReviewMaxCandidates: 3 + thresholds: + exact: 0.995 + highConfidence: 0.93 + reviewMin: 0.82 + similarityComment: + enabled: true + commentAnchor: issue-bot:similar-issues + minScore: 0.3 + maxCandidates: 3 + labeling: + enabled: true + autoCreateMissing: true + managed: + - BUG + - 功能建议 + - 问题咨询 + - 需要更多信息 + - 重复 + definitions: + BUG: + color: d73a4a + description: 程序存在缺陷或异常行为。 + 功能建议: + color: a2eeef + description: 新功能建议或现有功能改进。 + 问题咨询: + color: d876e3 + description: 使用问题、求助或咨询。 + 需要更多信息: + color: fbca04 + description: 当前 Issue 缺少必要信息。 + 重复: + color: cfd3d7 + description: 已存在相同或高度相似的问题。 + keywordRules: [] + aiClassification: + enabled: true + maxLabels: 3 + minConfidence: 0.65 + include: [] + exclude: + - BUG + - 功能请求 + - 重复 + - 不会修复 + - 使用问题 + - 需要帮助 + - 已完成 + - 未解决 + - 待确认 + - P0 + - P1 + - 需要文档 + - 优化点 + - 急急急 + prompt: 优先给 BetterGI Issue 选择能反映具体功能模块、子系统或使用场景的标签,例如一条龙、调度器、脚本、设置项、地图追踪;避免只选择宽泛的流程或状态标签。 + sourceRepository: + owner: babalae + repo: better-genshin-impact + aiHelp: + enabled: true + triggerLabels: [] + commentAnchor: issue-bot:ai + projectContext: + enabled: true + includeRepositoryMetadata: true + includeReadme: true + readmeMaxChars: 3000 + profile: + name: BetterGI + aliases: + - BGI + - Better Genshin Impact + summary: BetterGI is a desktop automation assistant for Genshin Impact. + techStack: + - C# + - WPF + - .NET + commands: + enabled: true + mentions: + - "@bot" + - "@bettergi-repo-bot" + access: collaborators + fix: + enabled: true + commentAnchor: issue-bot:fix + refresh: + enabled: true + +pullRequests: + review: + enabled: false + labeling: + enabled: false + summary: + enabled: false diff --git a/.github/workflows/repo-bot.yml b/.github/workflows/repo-bot.yml new file mode 100644 index 00000000..ce64b5ab --- /dev/null +++ b/.github/workflows/repo-bot.yml @@ -0,0 +1,55 @@ +name: Repo Bot + +on: + issues: + types: + - opened + - edited + - reopened + - labeled + issue_comment: + types: + - created + - edited + +jobs: + repo-bot: + runs-on: ubuntu-latest + permissions: + issues: write + contents: read + steps: + - name: Detect GitHub App configuration + id: auth-mode + shell: bash + env: + REPO_BOT_GITHUB_APP_ID: ${{ vars.REPO_BOT_GITHUB_APP_ID }} + REPO_BOT_GITHUB_APP_PRIVATE_KEY: ${{ secrets.REPO_BOT_GITHUB_APP_PRIVATE_KEY }} + run: | + if [ -n "$REPO_BOT_GITHUB_APP_ID" ] && [ -n "$REPO_BOT_GITHUB_APP_PRIVATE_KEY" ]; then + echo "use_app=true" >> "$GITHUB_OUTPUT" + else + echo "use_app=false" >> "$GITHUB_OUTPUT" + fi + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Create GitHub App token + if: ${{ steps.auth-mode.outputs.use_app == 'true' }} + id: app-token + uses: actions/create-github-app-token@v3 + with: + app-id: ${{ vars.REPO_BOT_GITHUB_APP_ID }} + private-key: ${{ secrets.REPO_BOT_GITHUB_APP_PRIVATE_KEY }} + + - name: Run Repo Bot + uses: ddaodan/bettergi-github-bot@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + REPO_BOT_GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} + REPO_BOT_AI_API_KEY: ${{ secrets.REPO_BOT_AI_API_KEY }} + REPO_BOT_AI_BASE_URL: ${{ vars.REPO_BOT_AI_BASE_URL }} + with: + config-path: .github/repo-bot.yml + config-overrides-json: ${{ vars.REPO_BOT_CONFIG_OVERRIDES_JSON }}