Skip to content

🀯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

πŸ”¨ chore: unify Claude Code workflows to use claude-code-action@main (#9712)

Arvin Xu60f43d90e5dc
diff --git a/.github/workflows/claude-dedupe-issues.yml b/.github/workflows/claude-dedupe-issues.yml
index 4b37baaba05..fe0d9dd28e2 100644
--- a/.github/workflows/claude-dedupe-issues.yml
+++ b/.github/workflows/claude-dedupe-issues.yml
@@ -25,9 +25,9 @@ jobs:
fetch-depth: 1
- name: Run Claude Code slash command
- uses: anthropics/claude-code-base-action@beta
+ uses: anthropics/claude-code-action@main
with:
- prompt: '/dedupe ${{ github.repository }}/issues/${{ github.event.issue.number || inputs.issue_number }}'
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ allowed_non_write_users: "*"
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
- claude_env: |
- GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ prompt: '/dedupe ${{ github.repository }}/issues/${{ github.event.issue.number || inputs.issue_number }}'
diff --git a/.github/workflows/claude-issue-triage.yml b/.github/workflows/claude-issue-triage.yml
index fd46f7cf086..dc17ef90913 100644
--- a/.github/workflows/claude-issue-triage.yml
+++ b/.github/workflows/claude-issue-triage.yml
@@ -23,173 +23,166 @@ jobs:
mkdir -p /tmp/claude-prompts
cp .claude/prompts/team-assignment.md /tmp/claude-prompts/
- - name: Create triage prompt
- run: |
- mkdir -p /tmp/claude-prompts
- cat > /tmp/claude-prompts/triage-prompt.md << 'EOF'
- You're an issue triage assistant for GitHub issues. Your task is to analyze issues, apply appropriate labels, and mention the responsible team member.
-
- REPOSITORY: ${{ github.repository }}
- ISSUE_NUMBER: ${{ github.event.issue.number }}
+ - name: Run Claude Code for Issue Triage
+ uses: anthropics/claude-code-action@main
+ with:
+ github_token: ${{ secrets.GH_TOKEN }}
+ allowed_non_write_users: "*"
+ claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
+ claude_args: "--allowed-tools Bash(gh *),Read"
+ prompt: |
+ You're an issue triage assistant for GitHub issues. Your task is to analyze issues, apply appropriate labels, and mention the responsible team member.
- ## WORKFLOW
+ REPOSITORY: ${{ github.repository }}
+ ISSUE_NUMBER: ${{ github.event.issue.number }}
- ### Step 1: Get Available Labels
- ```bash
- gh label list --json name,description --limit 300
- ```
+ ## WORKFLOW
- ### Step 2: Get Issue Details
- ```bash
- gh issue view ${{ github.event.issue.number }} --json number,title,body,labels,comments
- ```
+ ### Step 1: Get Available Labels
+ ```bash
+ gh label list --json name,description --limit 300
+ ```
- ### Step 3: Read Team Assignment Guide
- ```bash
- cat /tmp/claude-prompts/team-assignment.md
- ```
+ ### Step 2: Get Issue Details
+ ```bash
+ gh issue view ${{ github.event.issue.number }} --json number,title,body,labels,comments
+ ```
- ### Step 4: Analyze and Select Labels
+ ### Step 3: Read Team Assignment Guide
+ ```bash
+ cat /tmp/claude-prompts/team-assignment.md
+ ```
- Extract information from the issue template:
- - πŸ“¦ Platform field β†’ platform:web/desktop/mobile
- - πŸ’» Operating System β†’ os:windows/macos/linux/ios
- - 🌐 Browser β†’ device:pc/mobile
- - πŸ“¦ Deployment mode β†’ deployment:server/client/pglite
- - Platform (hosting) β†’ hosting:cloud/self-host/vercel/zeabur/railway
+ ### Step 4: Analyze and Select Labels
- **LABEL CATEGORIES:**
+ Extract information from the issue template:
+ - πŸ“¦ Platform field β†’ platform:web/desktop/mobile
+ - πŸ’» Operating System β†’ os:windows/macos/linux/ios
+ - 🌐 Browser β†’ device:pc/mobile
+ - πŸ“¦ Deployment mode β†’ deployment:server/client/pglite
+ - Platform (hosting) β†’ hosting:cloud/self-host/vercel/zeabur/railway
- **a) Issue Type (REQUIRED - select ONE):**
- - πŸ› Bug, 🌠 Feature Request, πŸ’„ Design, πŸ“ Documentation, ⚑️ Performance
+ **LABEL CATEGORIES:**
- **b) Priority (select ONE if applicable):**
- - priority:high - Critical, maintainer mentions "urgent"/"serious"/"critical"
- - priority:medium - Important, affects multiple users
- - priority:low - Nice to have, minor issues
+ **a) Issue Type (REQUIRED - select ONE):**
+ - πŸ› Bug, 🌠 Feature Request, πŸ’„ Design, πŸ“ Documentation, ⚑️ Performance
- **c) Platform (select ALL applicable):**
- - platform:web, platform:desktop, platform:mobile
+ **b) Priority (select ONE if applicable):**
+ - priority:high - Critical, maintainer mentions "urgent"/"serious"/"critical"
+ - priority:medium - Important, affects multiple users
+ - priority:low - Nice to have, minor issues
- **d) Device (for platform:web, select ONE):**
- - device:pc, device:mobile
+ **c) Platform (select ALL applicable):**
+ - platform:web, platform:desktop, platform:mobile
- **e) Operating System (select ALL applicable):**
- - os:windows, os:macos, os:linux, os:ios
+ **d) Device (for platform:web, select ONE):**
+ - device:pc, device:mobile
- **f) Hosting Platform (select ONE):**
- - hosting:cloud, hosting:self-host, hosting:vercel, hosting:zeabur, hosting:railway
+ **e) Operating System (select ALL applicable):**
+ - os:windows, os:macos, os:linux, os:ios
- **g) Deployment Mode (select ONE if mentioned):**
- - deployment:server, deployment:client, deployment:pglite
+ **f) Hosting Platform (select ONE):**
+ - hosting:cloud, hosting:self-host, hosting:vercel, hosting:zeabur, hosting:railway
- **h) Model Provider (select ALL applicable):**
- - provider:openai, provider:gemini, provider:claude, provider:deepseek
- - provider:google, provider:ollama, provider:azure, provider:bedrock, provider:vertex
+ **g) Deployment Mode (select ONE if mentioned):**
+ - deployment:server, deployment:client, deployment:pglite
- **i) Feature/Component (select ALL applicable):**
- - feature:settings, feature:agent, feature:topic, feature:marketplace
- - feature:streaming, feature:tool, feature:sync, feature:export
- - feature:search, feature:auth, feature:files, feature:knowledge-base
- - feature:tts, feature:vision, feature:mcp, feature:editor, feature:thread
- - feature:image, feature:api, feature:dalle, feature:plugin, feature:markdown
- - feature:group-chat, feature:memory, feature:team-workspace
+ **h) Model Provider (select ALL applicable):**
+ - provider:openai, provider:gemini, provider:claude, provider:deepseek
+ - provider:google, provider:ollama, provider:azure, provider:bedrock, provider:vertex
- **j) Workflow/Status:**
- - Duplicate - Only if duplicate of OPEN issue
- - needs-reproduction, good-first-issue, πŸ€” Need Reproduce
+ **i) Feature/Component (select ALL applicable):**
+ - feature:settings, feature:agent, feature:topic, feature:marketplace
+ - feature:streaming, feature:tool, feature:sync, feature:export
+ - feature:search, feature:auth, feature:files, feature:knowledge-base
+ - feature:tts, feature:vision, feature:mcp, feature:editor, feature:thread
+ - feature:image, feature:api, feature:dalle, feature:plugin, feature:markdown
+ - feature:group-chat, feature:memory, feature:team-workspace
- **IMPORTANT RULES:**
- - Read issue template fields carefully
- - Check maintainer comments for priority/status
- - Use ALL applicable labels from different categories
- - Always use prefixes (feature:, provider:, os:, platform:, etc.)
+ **j) Workflow/Status:**
+ - Duplicate - Only if duplicate of OPEN issue
+ - needs-reproduction, good-first-issue, πŸ€” Need Reproduce
- ### Step 5: Apply Labels
+ **IMPORTANT RULES:**
+ - Read issue template fields carefully
+ - Check maintainer comments for priority/status
+ - Use ALL applicable labels from different categories
+ - Always use prefixes (feature:, provider:, os:, platform:, etc.)
- Add labels:
- ```bash
- gh issue edit ${{ github.event.issue.number }} --add-label "label1,label2,label3"
- ```
+ ### Step 5: Apply Labels
- Remove "unconfirm" if adding other labels:
- ```bash
- gh issue edit ${{ github.event.issue.number }} --remove-label "unconfirm"
- ```
+ Add labels:
+ ```bash
+ gh issue edit ${{ github.event.issue.number }} --add-label "label1,label2,label3"
+ ```
- **Execute the commands now.**
+ Remove "unconfirm" if adding other labels:
+ ```bash
+ gh issue edit ${{ github.event.issue.number }} --remove-label "unconfirm"
+ ```
- ### Step 6: Determine Team Member
+ **Execute the commands now.**
- Based on the team assignment guide and applied labels, determine who to mention.
+ ### Step 6: Determine Team Member
- **Priority Order:**
- 1. Specific feature owner (feature:knowledge-base β†’ @RiverTwilight)
- 2. Platform owner (platform:mobile β†’ @sudongyuer)
- 3. Provider owner (provider:* β†’ @sxjeru)
- 4. Component owner (πŸ’„ Design β†’ @canisminor1990)
- 5. Infrastructure owner (deployment:* β†’ @nekomeowww)
- 6. General maintainer (@ONLY-yours)
- 7. Last resort (@arvinxx)
+ Based on the team assignment guide and applied labels, determine who to mention.
- **Special Cases:**
- - Multiple owners: Mention primary + secondary
- - priority:high: Mention owner + @arvinxx
+ **Priority Order:**
+ 1. Specific feature owner (feature:knowledge-base β†’ @RiverTwilight)
+ 2. Platform owner (platform:mobile β†’ @sudongyuer)
+ 3. Provider owner (provider:* β†’ @sxjeru)
+ 4. Component owner (πŸ’„ Design β†’ @canisminor1990)
+ 5. Infrastructure owner (deployment:* β†’ @nekomeowww)
+ 6. General maintainer (@ONLY-yours)
+ 7. Last resort (@arvinxx)
- ### Step 7: Post Comment
+ **Special Cases:**
+ - Multiple owners: Mention primary + secondary
+ - priority:high: Mention owner + @arvinxx
- Format the comment (1-2 sentences):
+ ### Step 7: Post Comment
- **Single owner:**
- ```
- @username - This is a [feature/component] issue. Please take a look.
- ```
+ Format the comment (1-2 sentences):
- **Multiple owners:**
- ```
- @user1 @user2 - This involves [features]. Please coordinate.
- ```
+ **Single owner:**
+ ```
+ @username - This is a [feature/component] issue. Please take a look.
+ ```
- **High priority:**
- ```
- @owner @arvinxx - High priority [feature] issue.
- ```
+ **Multiple owners:**
+ ```
+ @user1 @user2 - This involves [features]. Please coordinate.
+ ```
- Post the comment:
- ```bash
- gh issue comment ${{ github.event.issue.number }} --body "@username - [message]"
- ```
+ **High priority:**
+ ```
+ @owner @arvinxx - High priority [feature] issue.
+ ```
- **Execute the command now.**
+ Post the comment:
+ ```bash
+ gh issue comment ${{ github.event.issue.number }} --body "@username - [message]"
+ ```
- ### Step 8: Output Summary
+ **Execute the command now.**
- Log your reasoning (2-4 sentences):
- - Labels applied and why
- - Team member(s) mentioned and reason
- - Key factors from issue template/comments
+ ### Step 8: Output Summary
- ## GUIDELINES
+ Log your reasoning (2-4 sentences):
+ - Labels applied and why
+ - Team member(s) mentioned and reason
+ - Key factors from issue template/comments
- - Be thorough in analysis
- - Use only labels from the provided list
- - Extract info from issue template fields
- - ALWAYS post a mention comment (unless no clear owner)
- - Keep comments professional and brief
- - Output reasoning to logs
+ ## GUIDELINES
- **Start the triage process now.**
- EOF
+ - Be thorough in analysis
+ - Use only labels from the provided list
+ - Extract info from issue template fields
+ - ALWAYS post a mention comment (unless no clear owner)
+ - Keep comments professional and brief
+ - Output reasoning to logs
- - name: Run Claude Code for Issue Triage
- uses: anthropics/claude-code-base-action@beta
- with:
- prompt_file: /tmp/claude-prompts/triage-prompt.md
- allowed_tools: "Bash(gh *),Read"
- timeout_minutes: "5"
- claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
- claude_env: |
- GH_TOKEN: ${{ secrets.GH_TOKEN }}
+ **Start the triage process now.**
- name: Remove trigger label
if: github.event.action == 'labeled' && github.event.label.name == 'trigger:triage'