feat: 添加初始项目结构和基础文件
CI - 构建、测试和质量检查 / Rust 代码检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / 单元测试 (push) Has been cancelled
CI - 构建、测试和质量检查 / 代码格式检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / Clippy 代码质量检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs, macos-latest, x86_64-apple-darwin) (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs, ubuntu-latest, x86_64-unknown-linux-gnu) (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs.exe, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
CI - 构建、测试和质量检查 / Rust 代码检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / 单元测试 (push) Has been cancelled
CI - 构建、测试和质量检查 / 代码格式检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / Clippy 代码质量检查 (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs, macos-latest, x86_64-apple-darwin) (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs, ubuntu-latest, x86_64-unknown-linux-gnu) (push) Has been cancelled
CI - 构建、测试和质量检查 / 构建可执行文件 (claude_code_rs.exe, windows-latest, x86_64-pc-windows-msvc) (push) Has been cancelled
- 添加 Rust GUI 桌面应用程序入口点 - 添加 TypeScript/JavaScript 项目基础结构文件 - 包含组件、工具、命令、服务和工具定义 - 添加配置文件如 .gitignore、.gitattributes 和 LICENSE - 包含图片资源和演示文件 - 为各种功能模块添加占位符和类型定义
This commit is contained in:
@@ -0,0 +1,188 @@
|
||||
name: 🐛 Bug Report
|
||||
description: Report a bug or unexpected behavior in Claude Code
|
||||
title: "[BUG] "
|
||||
labels:
|
||||
- bug
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to report this bug! Please fill out the sections below to help us understand and fix the issue.
|
||||
|
||||
Before submitting, please check:
|
||||
- You're using the [latest version](https://www.npmjs.com/package/@anthropic-ai/claude-code?activeTab=versions) of Claude Code (`claude --version`)
|
||||
- This issue hasn't already been reported by searching [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug).
|
||||
- This is a bug, not a feature request or support question
|
||||
|
||||
- type: checkboxes
|
||||
id: preflight
|
||||
attributes:
|
||||
label: Preflight Checklist
|
||||
description: Please confirm before submitting
|
||||
options:
|
||||
- label: I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) and this hasn't been reported yet
|
||||
required: true
|
||||
- label: This is a single bug report (please file separate reports for different bugs)
|
||||
required: true
|
||||
- label: I am using the latest version of Claude Code
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: actual
|
||||
attributes:
|
||||
label: What's Wrong?
|
||||
description: Describe what's happening that shouldn't be
|
||||
placeholder: |
|
||||
When I try to create a Python file, Claude shows an error "EACCES: permission denied" and the file isn't created.
|
||||
|
||||
The command fails immediately after accepting the file write permission...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: What Should Happen?
|
||||
description: Describe the expected behavior
|
||||
placeholder: Claude should create a Python script file successfully without errors
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: error_output
|
||||
attributes:
|
||||
label: Error Messages/Logs
|
||||
description: If you see any error messages, paste them here
|
||||
placeholder: |
|
||||
Paste any error output, stack traces, or relevant logs here.
|
||||
This will be automatically formatted as code.
|
||||
render: shell
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: reproduction
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
description: |
|
||||
Please provide clear, numbered steps that anyone can follow to reproduce the issue.
|
||||
**Important**: Include any necessary code, file contents, or context needed to reproduce the bug.
|
||||
If the issue involves specific files or code, please create a minimal example.
|
||||
placeholder: |
|
||||
1. Create a file `test.py` with this content:
|
||||
```python
|
||||
def hello():
|
||||
print("test")
|
||||
```
|
||||
2. Run `claude "add type hints to test.py"`
|
||||
3. When prompted for file access, accept
|
||||
4. Error appears: "Unable to parse..."
|
||||
|
||||
Note: The bug only happens with Python files containing...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: model
|
||||
attributes:
|
||||
label: Claude Model
|
||||
description: Which model were you using? (Run `/model` to check)
|
||||
options:
|
||||
- Sonnet (default)
|
||||
- Opus
|
||||
- Not sure / Multiple models
|
||||
- Other
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
id: regression
|
||||
attributes:
|
||||
label: Is this a regression?
|
||||
description: Did this work in a previous version?
|
||||
options:
|
||||
- "Yes, this worked in a previous version"
|
||||
- "No, this never worked"
|
||||
- "I don't know"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: working_version
|
||||
attributes:
|
||||
label: Last Working Version
|
||||
description: If this is a regression, which version last worked? This helps expedite a fix.
|
||||
placeholder: "e.g., 1.0.100"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Claude Code Version
|
||||
description: Run `claude --version` and paste the output
|
||||
placeholder: "e.g., 1.0.123 (Claude Code)"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: platform
|
||||
attributes:
|
||||
label: Platform
|
||||
description: Which API platform are you using?
|
||||
options:
|
||||
- Anthropic API
|
||||
- AWS Bedrock
|
||||
- Google Vertex AI
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: os
|
||||
attributes:
|
||||
label: Operating System
|
||||
options:
|
||||
- macOS
|
||||
- Windows
|
||||
- Ubuntu/Debian Linux
|
||||
- Other Linux
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: terminal
|
||||
attributes:
|
||||
label: Terminal/Shell
|
||||
description: Which terminal are you using?
|
||||
options:
|
||||
- Terminal.app (macOS)
|
||||
- Warp
|
||||
- Cursor
|
||||
- iTerm2
|
||||
- IntelliJ IDEA terminal
|
||||
- VS Code integrated terminal
|
||||
- PyCharm terminal
|
||||
- Windows Terminal
|
||||
- PowerShell
|
||||
- WSL (Windows Subsystem for Linux)
|
||||
- Xterm
|
||||
- Non-interactive/CI environment
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional Information
|
||||
description: |
|
||||
Anything else that might help us understand the issue?
|
||||
- Screenshots (drag and drop images here)
|
||||
- Configuration files
|
||||
- Related files or code
|
||||
- Links to repositories demonstrating the issue
|
||||
placeholder: Any additional context, screenshots, or information...
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,14 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 💬 Discord Community
|
||||
url: https://anthropic.com/discord
|
||||
about: Get help, ask questions, and chat with other Claude Code users
|
||||
- name: 📖 Documentation
|
||||
url: https://docs.claude.com/en/docs/claude-code
|
||||
about: Read the official documentation and guides
|
||||
- name: 🎓 Getting Started Guide
|
||||
url: https://docs.claude.com/en/docs/claude-code/quickstart
|
||||
about: New to Claude Code? Start here
|
||||
- name: 🔧 Troubleshooting Guide
|
||||
url: https://docs.claude.com/en/docs/claude-code/troubleshooting
|
||||
about: Common issues and how to fix them
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
name: 📚 Documentation Issue
|
||||
description: Report missing, unclear, or incorrect documentation
|
||||
title: "[DOCS] "
|
||||
labels:
|
||||
- documentation
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Help us improve our documentation!
|
||||
|
||||
Good documentation is crucial for a great developer experience. Please let us know what's missing or confusing.
|
||||
|
||||
- type: dropdown
|
||||
id: doc_type
|
||||
attributes:
|
||||
label: Documentation Type
|
||||
description: What kind of documentation issue is this?
|
||||
options:
|
||||
- Missing documentation (feature not documented)
|
||||
- Unclear/confusing documentation
|
||||
- Incorrect/outdated documentation
|
||||
- Typo or formatting issue
|
||||
- Missing code examples
|
||||
- Broken links
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: location
|
||||
attributes:
|
||||
label: Documentation Location
|
||||
description: Where did you encounter this issue? Provide a URL if possible
|
||||
placeholder: "e.g., https://docs.anthropic.com/en/docs/claude-code/getting-started"
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
id: section
|
||||
attributes:
|
||||
label: Section/Topic
|
||||
description: Which specific section or topic needs improvement?
|
||||
placeholder: "e.g., MCP Server Configuration section"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: current
|
||||
attributes:
|
||||
label: Current Documentation
|
||||
description: |
|
||||
What does the documentation currently say?
|
||||
Quote the specific text if applicable.
|
||||
placeholder: |
|
||||
The docs currently say:
|
||||
"To configure MCP servers, add them to your configuration..."
|
||||
|
||||
But it doesn't explain...
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: issue
|
||||
attributes:
|
||||
label: What's Wrong or Missing?
|
||||
description: Explain what's incorrect, unclear, or missing
|
||||
placeholder: |
|
||||
The documentation doesn't explain how to:
|
||||
- Configure multiple MCP servers
|
||||
- Handle authentication
|
||||
- Debug connection issues
|
||||
|
||||
The example code doesn't work because...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: suggested
|
||||
attributes:
|
||||
label: Suggested Improvement
|
||||
description: How should the documentation be improved? Provide suggested text if possible
|
||||
placeholder: |
|
||||
The documentation should include:
|
||||
|
||||
1. A complete example showing...
|
||||
2. Explanation of common errors like...
|
||||
3. Step-by-step guide for...
|
||||
|
||||
Suggested text:
|
||||
"To configure multiple MCP servers, create an array in your settings..."
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: impact
|
||||
attributes:
|
||||
label: Impact
|
||||
description: How much does this documentation issue affect users?
|
||||
options:
|
||||
- High - Prevents users from using a feature
|
||||
- Medium - Makes feature difficult to understand
|
||||
- Low - Minor confusion or inconvenience
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: |
|
||||
- Screenshots showing the issue
|
||||
- Links to related documentation
|
||||
- Examples from other projects that do this well
|
||||
placeholder: Any additional information that would help...
|
||||
validations:
|
||||
required: false
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
name: ✨ Feature Request
|
||||
description: Suggest a new feature or enhancement for Claude Code
|
||||
title: "[FEATURE] "
|
||||
labels:
|
||||
- enhancement
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Thanks for suggesting a feature!
|
||||
|
||||
We love hearing ideas from our community. Please help us understand your use case by filling out the sections below.
|
||||
Before submitting, please check if this feature has already been requested.
|
||||
|
||||
- type: checkboxes
|
||||
id: preflight
|
||||
attributes:
|
||||
label: Preflight Checklist
|
||||
options:
|
||||
- label: I have searched [existing requests](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20label%3Aenhancement) and this feature hasn't been requested yet
|
||||
required: true
|
||||
- label: This is a single feature request (not multiple features)
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Problem Statement
|
||||
description: |
|
||||
What problem are you trying to solve? Why do you need this feature?
|
||||
Focus on the problem, not the solution. Help us understand your workflow.
|
||||
placeholder: |
|
||||
I often need to work with multiple projects simultaneously, but Claude Code doesn't support...
|
||||
|
||||
When I'm debugging code, I find it difficult to...
|
||||
|
||||
The current workflow requires me to manually...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Proposed Solution
|
||||
description: |
|
||||
How would you like this to work? Describe the ideal user experience.
|
||||
Be specific about how you'd interact with this feature.
|
||||
placeholder: |
|
||||
I'd like to be able to run `claude --workspace project1,project2` to...
|
||||
|
||||
There should be a command or setting that allows...
|
||||
|
||||
The interface should show...
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: Alternative Solutions
|
||||
description: |
|
||||
What alternatives have you considered or tried?
|
||||
Are there workarounds you're currently using?
|
||||
placeholder: |
|
||||
I've tried using multiple terminal windows but...
|
||||
|
||||
Currently I work around this by...
|
||||
|
||||
Other tools solve this by...
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
id: priority
|
||||
attributes:
|
||||
label: Priority
|
||||
description: How important is this feature to your workflow?
|
||||
options:
|
||||
- Critical - Blocking my work
|
||||
- High - Significant impact on productivity
|
||||
- Medium - Would be very helpful
|
||||
- Low - Nice to have
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: category
|
||||
attributes:
|
||||
label: Feature Category
|
||||
description: What area does this feature relate to?
|
||||
options:
|
||||
- CLI commands and flags
|
||||
- Interactive mode (TUI)
|
||||
- File operations
|
||||
- API and model interactions
|
||||
- MCP server integration
|
||||
- Performance and speed
|
||||
- Configuration and settings
|
||||
- Developer tools/SDK
|
||||
- Documentation
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: use_case
|
||||
attributes:
|
||||
label: Use Case Example
|
||||
description: |
|
||||
Provide a concrete, real-world example of when you'd use this feature.
|
||||
Walk us through a scenario step-by-step.
|
||||
placeholder: |
|
||||
Example scenario:
|
||||
1. I'm working on a React app with a Node.js backend
|
||||
2. I need to make changes to both frontend and backend
|
||||
3. With this feature, I could...
|
||||
4. This would save me time because...
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: |
|
||||
- Screenshots or mockups of the proposed feature
|
||||
- Links to similar features in other tools
|
||||
- Technical considerations or constraints
|
||||
- Any other relevant information
|
||||
placeholder: Add any other context, mockups, or examples here...
|
||||
validations:
|
||||
required: false
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
name: 🤖 Model Behavior Issue
|
||||
description: Report unexpected Claude model behavior, incorrect actions, or permission violations
|
||||
title: "[MODEL] "
|
||||
labels:
|
||||
- model
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Report Unexpected Model Behavior
|
||||
|
||||
Use this template when Claude does something unexpected, makes unwanted changes, or behaves inconsistently with your instructions.
|
||||
|
||||
**This is for:** Unexpected actions, file modifications outside scope, ignoring instructions, making assumptions
|
||||
**NOT for:** Crashes, API errors, or installation issues (use Bug Report instead)
|
||||
|
||||
- type: checkboxes
|
||||
id: preflight
|
||||
attributes:
|
||||
label: Preflight Checklist
|
||||
description: Please confirm before submitting
|
||||
options:
|
||||
- label: I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Amodel) for similar behavior reports
|
||||
required: true
|
||||
- label: This report does NOT contain sensitive information (API keys, passwords, etc.)
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: behavior_type
|
||||
attributes:
|
||||
label: Type of Behavior Issue
|
||||
description: What category best describes the unexpected behavior?
|
||||
options:
|
||||
- Claude modified files I didn't ask it to modify
|
||||
- Claude accessed files outside the working directory
|
||||
- Claude ignored my instructions or configuration
|
||||
- Claude reverted/undid previous changes without asking
|
||||
- Claude made incorrect assumptions about my project
|
||||
- Claude refused a reasonable request
|
||||
- Claude's behavior changed between sessions
|
||||
- Subagent behaved unexpectedly
|
||||
- Other unexpected behavior
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: what_you_asked
|
||||
attributes:
|
||||
label: What You Asked Claude to Do
|
||||
description: Provide the exact prompt or command you gave
|
||||
placeholder: |
|
||||
I asked: "Update the README.md file to add installation instructions"
|
||||
|
||||
Or I ran: `claude "fix the bug in auth.js"`
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: what_claude_did
|
||||
attributes:
|
||||
label: What Claude Actually Did
|
||||
description: Describe step-by-step what Claude did instead
|
||||
placeholder: |
|
||||
1. Claude read README.md
|
||||
2. Instead of updating it, Claude deleted the entire file
|
||||
3. Created a new README from scratch with different content
|
||||
4. Also modified package.json without being asked
|
||||
5. Changed .gitignore file
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected_behavior
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: What should Claude have done?
|
||||
placeholder: |
|
||||
Claude should have:
|
||||
1. Read the existing README.md
|
||||
2. Added an "Installation" section
|
||||
3. Only modified that single file
|
||||
4. Not touched any other files
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: files_affected
|
||||
attributes:
|
||||
label: Files Affected
|
||||
description: |
|
||||
List all files that were accessed or modified (even if you didn't expect them to be)
|
||||
placeholder: |
|
||||
Modified:
|
||||
- README.md (deleted and recreated)
|
||||
- package.json (version bumped - not requested)
|
||||
- .gitignore (added entries - not requested)
|
||||
|
||||
Read (unexpectedly):
|
||||
- /Users/me/.ssh/config
|
||||
- ../../../parent-directory/secrets.env
|
||||
render: shell
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
id: permission_mode
|
||||
attributes:
|
||||
label: Permission Mode
|
||||
description: What permission settings were active?
|
||||
options:
|
||||
- Accept Edits was ON (auto-accepting changes)
|
||||
- Accept Edits was OFF (manual approval required)
|
||||
- I don't know / Not sure
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: reproducible
|
||||
attributes:
|
||||
label: Can You Reproduce This?
|
||||
description: Does this happen consistently?
|
||||
options:
|
||||
- Yes, every time with the same prompt
|
||||
- Sometimes (intermittent)
|
||||
- No, only happened once
|
||||
- Haven't tried to reproduce
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: reproduction_steps
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
description: If reproducible, provide minimal steps
|
||||
placeholder: |
|
||||
1. Create a new directory with a simple README.md
|
||||
2. Ask Claude Code to "improve the README"
|
||||
3. Claude will delete and recreate the file instead of editing
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
id: model
|
||||
attributes:
|
||||
label: Claude Model
|
||||
description: Which model were you using? (Run `/model` to check)
|
||||
options:
|
||||
- Sonnet
|
||||
- Opus
|
||||
- Haiku
|
||||
- Not sure
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: conversation_log
|
||||
attributes:
|
||||
label: Relevant Conversation
|
||||
description: |
|
||||
Include relevant parts of Claude's responses, especially where it explains what it's doing
|
||||
placeholder: |
|
||||
Claude said: "I'll help you update the README. Let me first delete the old one and create a fresh version..."
|
||||
|
||||
[Then proceeded to delete without asking for confirmation]
|
||||
render: markdown
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: dropdown
|
||||
id: impact
|
||||
attributes:
|
||||
label: Impact
|
||||
description: How severe was the impact of this behavior?
|
||||
options:
|
||||
- Critical - Data loss or corrupted project
|
||||
- High - Significant unwanted changes
|
||||
- Medium - Extra work to undo changes
|
||||
- Low - Minor inconvenience
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: Claude Code Version
|
||||
description: Run `claude --version` and paste the output
|
||||
placeholder: "e.g., 1.0.123 (Claude Code)"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
id: platform
|
||||
attributes:
|
||||
label: Platform
|
||||
description: Which API platform are you using?
|
||||
options:
|
||||
- Anthropic API
|
||||
- AWS Bedrock
|
||||
- Google Vertex AI
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: additional
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: |
|
||||
- Any patterns you've noticed
|
||||
- Similar behavior in other sessions
|
||||
- Specific file types or project structures that trigger this
|
||||
- Screenshots if relevant
|
||||
placeholder: |
|
||||
This seems to happen more often with:
|
||||
- Python projects
|
||||
- When there are multiple similar files
|
||||
- After long conversations
|
||||
validations:
|
||||
required: false
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
name: Auto-close duplicate issues
|
||||
description: Auto-closes issues that are duplicates of existing issues
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 9 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
auto-close-duplicates:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Auto-close duplicate issues
|
||||
run: bun run scripts/auto-close-duplicates.ts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
|
||||
GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }}
|
||||
STATSIG_API_KEY: ${{ secrets.STATSIG_API_KEY }}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
name: Backfill Duplicate Comments
|
||||
description: Triggers duplicate detection for old issues that don't have duplicate comments
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
days_back:
|
||||
description: 'How many days back to look for old issues'
|
||||
required: false
|
||||
default: '90'
|
||||
type: string
|
||||
dry_run:
|
||||
description: 'Dry run mode (true to only log what would be done)'
|
||||
required: false
|
||||
default: 'true'
|
||||
type: choice
|
||||
options:
|
||||
- 'true'
|
||||
- 'false'
|
||||
|
||||
jobs:
|
||||
backfill-duplicate-comments:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
permissions:
|
||||
contents: read
|
||||
issues: read
|
||||
actions: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Backfill duplicate comments
|
||||
run: bun run scripts/backfill-duplicate-comments.ts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
DAYS_BACK: ${{ inputs.days_back }}
|
||||
DRY_RUN: ${{ inputs.dry_run }}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
name: Claude Issue Dedupe
|
||||
description: Automatically dedupe GitHub issues using Claude Code
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
issue_number:
|
||||
description: 'Issue number to process for duplicate detection'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
claude-dedupe-issues:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run Claude Code slash command
|
||||
uses: anthropics/claude-code-action@v1
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
CLAUDE_CODE_SCRIPT_CAPS: '{"comment-on-duplicates.sh":1}'
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
allowed_non_write_users: "*"
|
||||
prompt: "/dedupe ${{ github.repository }}/issues/${{ github.event.issue.number || inputs.issue_number }}"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
claude_args: "--model claude-sonnet-4-5-20250929"
|
||||
|
||||
- name: Log duplicate comment event to Statsig
|
||||
if: always()
|
||||
env:
|
||||
STATSIG_API_KEY: ${{ secrets.STATSIG_API_KEY }}
|
||||
run: |
|
||||
ISSUE_NUMBER=${{ github.event.issue.number || inputs.issue_number }}
|
||||
REPO=${{ github.repository }}
|
||||
|
||||
if [ -z "$STATSIG_API_KEY" ]; then
|
||||
echo "STATSIG_API_KEY not found, skipping Statsig logging"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Prepare the event payload
|
||||
EVENT_PAYLOAD=$(jq -n \
|
||||
--arg issue_number "$ISSUE_NUMBER" \
|
||||
--arg repo "$REPO" \
|
||||
--arg triggered_by "${{ github.event_name }}" \
|
||||
'{
|
||||
events: [{
|
||||
eventName: "github_duplicate_comment_added",
|
||||
value: 1,
|
||||
metadata: {
|
||||
repository: $repo,
|
||||
issue_number: ($issue_number | tonumber),
|
||||
triggered_by: $triggered_by,
|
||||
workflow_run_id: "${{ github.run_id }}"
|
||||
},
|
||||
time: (now | floor | tostring)
|
||||
}]
|
||||
}')
|
||||
|
||||
# Send to Statsig API
|
||||
echo "Logging duplicate comment event to Statsig for issue #${ISSUE_NUMBER}"
|
||||
|
||||
RESPONSE=$(curl -s -w "\n%{http_code}" -X POST https://events.statsigapi.net/v1/log_event \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "STATSIG-API-KEY: ${STATSIG_API_KEY}" \
|
||||
-d "$EVENT_PAYLOAD")
|
||||
|
||||
HTTP_CODE=$(echo "$RESPONSE" | tail -n1)
|
||||
BODY=$(echo "$RESPONSE" | head -n-1)
|
||||
|
||||
if [ "$HTTP_CODE" -eq 200 ] || [ "$HTTP_CODE" -eq 202 ]; then
|
||||
echo "Successfully logged duplicate comment event for issue #${ISSUE_NUMBER}"
|
||||
else
|
||||
echo "Failed to log duplicate comment event for issue #${ISSUE_NUMBER}. HTTP ${HTTP_CODE}: ${BODY}"
|
||||
fi
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
name: Claude Issue Triage
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
jobs:
|
||||
triage-issue:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
if: >-
|
||||
github.event_name == 'issues' ||
|
||||
(github.event_name == 'issue_comment' && !github.event.issue.pull_request && github.event.comment.user.type != 'Bot')
|
||||
concurrency:
|
||||
group: issue-triage-${{ github.event.issue.number }}
|
||||
cancel-in-progress: true
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Run Claude Code for Issue Triage
|
||||
timeout-minutes: 5
|
||||
uses: anthropics/claude-code-action@v1
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
CLAUDE_CODE_SCRIPT_CAPS: '{"edit-issue-labels.sh":2}'
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
allowed_non_write_users: "*"
|
||||
prompt: "/triage-issue REPO: ${{ github.repository }} ISSUE_NUMBER: ${{ github.event.issue.number }} EVENT: ${{ github.event_name }}"
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
claude_args: |
|
||||
--model claude-opus-4-6
|
||||
@@ -0,0 +1,38 @@
|
||||
name: Claude Code
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
issues:
|
||||
types: [opened, assigned]
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
|
||||
jobs:
|
||||
claude:
|
||||
if: |
|
||||
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
||||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
issues: read
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Run Claude Code
|
||||
id: claude
|
||||
uses: anthropics/claude-code-action@v1
|
||||
with:
|
||||
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
claude_args: "--model claude-sonnet-4-5-20250929"
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
name: "Issue Lifecycle Comment"
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Post lifecycle comment
|
||||
run: bun run scripts/lifecycle-comment.ts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
LABEL: ${{ github.event.label.name }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
name: Issue Opened Dispatch
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
permissions:
|
||||
issues: read
|
||||
actions: write
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 1
|
||||
steps:
|
||||
- name: Process new issue
|
||||
env:
|
||||
ISSUE_URL: ${{ github.event.issue.html_url }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
ISSUE_TITLE: ${{ github.event.issue.title }}
|
||||
TARGET_REPO: ${{ secrets.ISSUE_OPENED_DISPATCH_TARGET_REPO }}
|
||||
GH_TOKEN: ${{ secrets.ISSUE_OPENED_DISPATCH_TOKEN }}
|
||||
run: |
|
||||
gh api repos/${TARGET_REPO}/dispatches \
|
||||
-f event_type=issue_opened \
|
||||
-f client_payload[issue_url]="${ISSUE_URL}" || {
|
||||
exit 0
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
name: "Lock Stale Issues"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# 8am Pacific = 1pm UTC (2pm UTC during DST)
|
||||
- cron: "0 14 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
group: lock-threads
|
||||
|
||||
jobs:
|
||||
lock-closed-issues:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Lock closed issues after 7 days of inactivity
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const sevenDaysAgo = new Date();
|
||||
sevenDaysAgo.setDate(sevenDaysAgo.getDate() - 7);
|
||||
|
||||
const lockComment = `This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.`;
|
||||
|
||||
let page = 1;
|
||||
let hasMore = true;
|
||||
let totalLocked = 0;
|
||||
|
||||
while (hasMore) {
|
||||
// Get closed issues (pagination)
|
||||
const { data: issues } = await github.rest.issues.listForRepo({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'closed',
|
||||
sort: 'updated',
|
||||
direction: 'asc',
|
||||
per_page: 100,
|
||||
page: page
|
||||
});
|
||||
|
||||
if (issues.length === 0) {
|
||||
hasMore = false;
|
||||
break;
|
||||
}
|
||||
|
||||
for (const issue of issues) {
|
||||
// Skip if already locked
|
||||
if (issue.locked) continue;
|
||||
|
||||
// Skip pull requests
|
||||
if (issue.pull_request) continue;
|
||||
|
||||
// Check if updated more than 7 days ago
|
||||
const updatedAt = new Date(issue.updated_at);
|
||||
if (updatedAt > sevenDaysAgo) {
|
||||
// Since issues are sorted by updated_at ascending,
|
||||
// once we hit a recent issue, all remaining will be recent too
|
||||
hasMore = false;
|
||||
break;
|
||||
}
|
||||
|
||||
try {
|
||||
// Add comment before locking
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: issue.number,
|
||||
body: lockComment
|
||||
});
|
||||
|
||||
// Lock the issue
|
||||
await github.rest.issues.lock({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: issue.number,
|
||||
lock_reason: 'resolved'
|
||||
});
|
||||
|
||||
totalLocked++;
|
||||
console.log(`Locked issue #${issue.number}: ${issue.title}`);
|
||||
} catch (error) {
|
||||
console.error(`Failed to lock issue #${issue.number}: ${error.message}`);
|
||||
}
|
||||
}
|
||||
|
||||
page++;
|
||||
}
|
||||
|
||||
console.log(`Total issues locked: ${totalLocked}`);
|
||||
@@ -0,0 +1,40 @@
|
||||
name: Log Issue Events to Statsig
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, closed]
|
||||
|
||||
jobs:
|
||||
log-to-statsig:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: read
|
||||
steps:
|
||||
- name: Log issue creation to Statsig
|
||||
env:
|
||||
STATSIG_API_KEY: ${{ secrets.STATSIG_API_KEY }}
|
||||
ISSUE_NUMBER: ${{ github.event.issue.number }}
|
||||
REPO: ${{ github.repository }}
|
||||
ISSUE_TITLE: ${{ github.event.issue.title }}
|
||||
AUTHOR: ${{ github.event.issue.user.login }}
|
||||
CREATED_AT: ${{ github.event.issue.created_at }}
|
||||
run: |
|
||||
# All values are now safely passed via environment variables
|
||||
# No direct templating in the shell script to prevent injection attacks
|
||||
|
||||
curl -X POST "https://events.statsigapi.net/v1/log_event" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "statsig-api-key: $STATSIG_API_KEY" \
|
||||
-d '{
|
||||
"events": [{
|
||||
"eventName": "github_issue_created",
|
||||
"metadata": {
|
||||
"issue_number": "'"$ISSUE_NUMBER"'",
|
||||
"repository": "'"$REPO"'",
|
||||
"title": "'"$(echo "$ISSUE_TITLE" | sed "s/\"/\\\\\"/g")"'",
|
||||
"author": "'"$AUTHOR"'",
|
||||
"created_at": "'"$CREATED_AT"'"
|
||||
},
|
||||
"time": '"$(date +%s)000"'
|
||||
}]
|
||||
}'
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
name: Non-write Users Check
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/**"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
jobs:
|
||||
allowed-non-write-check:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
steps:
|
||||
- run: |
|
||||
DIFF=$(gh pr diff "$PR_NUMBER" -R "$REPO" || true)
|
||||
|
||||
if ! echo "$DIFF" | grep -qE '^diff --git a/\.github/.*\.ya?ml'; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
MATCHES=$(echo "$DIFF" | grep "^+.*allowed_non_write_users" || true)
|
||||
|
||||
if [ -z "$MATCHES" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
EXISTING=$(gh pr view "$PR_NUMBER" -R "$REPO" --json comments --jq '.comments[].body' \
|
||||
| grep -c "<!-- non-write-users-check -->" || true)
|
||||
|
||||
if [ "$EXISTING" -gt 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
gh pr comment "$PR_NUMBER" -R "$REPO" --body '<!-- non-write-users-check -->
|
||||
**`allowed_non_write_users` detected**
|
||||
|
||||
This PR adds or modifies `allowed_non_write_users`, which allows users without write access to trigger Claude Code Action workflows. This can introduce security risks.
|
||||
|
||||
If this is a new flow, please make sure you actually need `allowed_non_write_users`. If you are editing an existing workflow, double check that you are not adding new Claude permissions which might lead to a vulnerability.
|
||||
|
||||
See existing workflows in this repo for safe usage examples, or contact the AppSec team.'
|
||||
env:
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
REPO: ${{ github.repository }}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
name: "Remove Autoclose Label on Activity"
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
remove-autoclose:
|
||||
# Only run if the issue has the autoclose label
|
||||
if: |
|
||||
github.event.issue.state == 'open' &&
|
||||
contains(github.event.issue.labels.*.name, 'autoclose') &&
|
||||
github.event.comment.user.login != 'github-actions[bot]'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Remove autoclose label
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
console.log(`Removing autoclose label from issue #${context.issue.number} due to new comment from ${context.payload.comment.user.login}`);
|
||||
|
||||
try {
|
||||
// Remove the autoclose label
|
||||
await github.rest.issues.removeLabel({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
name: 'autoclose'
|
||||
});
|
||||
|
||||
console.log(`Successfully removed autoclose label from issue #${context.issue.number}`);
|
||||
} catch (error) {
|
||||
// If the label was already removed or doesn't exist, that's fine
|
||||
if (error.status === 404) {
|
||||
console.log(`Autoclose label was already removed from issue #${context.issue.number}`);
|
||||
} else {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
name: "Issue Sweep"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 10,22 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
concurrency:
|
||||
group: daily-issue-sweep
|
||||
|
||||
jobs:
|
||||
sweep:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v2
|
||||
with:
|
||||
bun-version: latest
|
||||
|
||||
- name: Enforce lifecycle timeouts
|
||||
run: bun run scripts/sweep.ts
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}
|
||||
GITHUB_REPOSITORY_NAME: ${{ github.event.repository.name }}
|
||||
Reference in New Issue
Block a user