Skip to content

Commit ee10119

Browse files
authored
Migrate to shared workflows from organization repository (#539)
1 parent b6d0cf0 commit ee10119

File tree

2 files changed

+5
-105
lines changed

2 files changed

+5
-105
lines changed

.github/workflows/claude.yml

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -12,39 +12,5 @@ on:
1212

1313
jobs:
1414
claude:
15-
if: |
16-
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
17-
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
18-
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
19-
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
20-
runs-on: ubuntu-latest
21-
permissions:
22-
contents: read
23-
pull-requests: read
24-
issues: read
25-
id-token: write
26-
actions: read # Required for Claude to read CI results on PRs
27-
steps:
28-
- name: Checkout repository
29-
uses: actions/checkout@v4
30-
with:
31-
fetch-depth: 1
32-
33-
- name: Run Claude Code
34-
id: claude
35-
uses: anthropics/claude-code-action@v1
36-
with:
37-
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
38-
39-
# This is an optional setting that allows Claude to read CI results on PRs
40-
additional_permissions: |
41-
actions: read
42-
43-
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
44-
# prompt: 'Update the pull request description to include a summary of changes.'
45-
46-
# Optional: Add claude_args to customize behavior and configuration
47-
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
48-
# or https://docs.anthropic.com/en/docs/claude-code/sdk#command-line for available options
49-
# claude_args: '--model claude-opus-4-1-20250805 --allowed-tools Bash(gh pr:*)'
50-
15+
uses: OpenSwiftUIProject/github-workflows/.github/workflows/claude.yml@main
16+
secrets: inherit

.github/workflows/issue-triage.yml

Lines changed: 3 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,10 @@
11
name: Issue Triage
2+
23
on:
34
issues:
45
types: [opened]
56

67
jobs:
78
triage-issue:
8-
runs-on: ubuntu-latest
9-
timeout-minutes: 10
10-
permissions:
11-
contents: read
12-
issues: write
13-
14-
steps:
15-
- name: Checkout repository
16-
uses: actions/checkout@v4
17-
with:
18-
fetch-depth: 0
19-
20-
- name: Triage issue with Claude
21-
uses: anthropics/claude-code-action@v1
22-
with:
23-
prompt: |
24-
You're an issue triage assistant for GitHub issues. Your task is to analyze the issue and select appropriate labels from the provided list.
25-
26-
IMPORTANT: Don't post any comments or messages to the issue. Your only action should be to apply labels.
27-
28-
Issue Information:
29-
- REPO: ${{ github.repository }}
30-
- ISSUE_NUMBER: ${{ github.event.issue.number }}
31-
32-
TASK OVERVIEW:
33-
34-
1. First, fetch the list of labels available in this repository by running: `gh label list`. Run exactly this command with nothing else.
35-
36-
2. Next, use the GitHub tools to get context about the issue:
37-
- You have access to these tools:
38-
- mcp__github__get_issue: Use this to retrieve the current issue's details including title, description, and existing labels
39-
- mcp__github__get_issue_comments: Use this to read any discussion or additional context provided in the comments
40-
- mcp__github__update_issue: Use this to apply labels to the issue (do not use this for commenting)
41-
- mcp__github__search_issues: Use this to find similar issues that might provide context for proper categorization and to identify potential duplicate issues
42-
- mcp__github__list_issues: Use this to understand patterns in how other issues are labeled
43-
- Start by using mcp__github__get_issue to get the issue details
44-
45-
3. Analyze the issue content, considering:
46-
- The issue title and description
47-
- The type of issue (bug report, feature request, question, etc.)
48-
- Technical areas mentioned
49-
- Severity or priority indicators
50-
- User impact
51-
- Components affected
52-
53-
4. Select appropriate labels from the available labels list provided above:
54-
- Choose labels that accurately reflect the issue's nature
55-
- Be specific but comprehensive
56-
- Select priority labels if you can determine urgency (high-priority, med-priority, or low-priority)
57-
- Consider platform labels (android, ios) if applicable
58-
- If you find similar issues using mcp__github__search_issues, consider using a "duplicate" label if appropriate. Only do so if the issue is a duplicate of another OPEN issue.
59-
60-
5. Apply the selected labels:
61-
- Use mcp__github__update_issue to apply your selected labels
62-
- DO NOT post any comments explaining your decision
63-
- DO NOT communicate directly with users
64-
- If no labels are clearly applicable, do not apply any labels
65-
66-
IMPORTANT GUIDELINES:
67-
- Be thorough in your analysis
68-
- Only select labels from the provided list above
69-
- DO NOT post any comments to the issue
70-
- Your ONLY action should be to apply labels using mcp__github__update_issue
71-
- It's okay to not add any labels if none are clearly applicable
72-
73-
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
74-
github_token: ${{ secrets.GITHUB_TOKEN }}
75-
claude_args: |
76-
--allowedTools "Bash(gh label list),mcp__github__get_issue,mcp__github__get_issue_comments,mcp__github__update_issue,mcp__github__search_issues,mcp__github__list_issues"
9+
uses: OpenSwiftUIProject/github-workflows/.github/workflows/issue-triage.yml@main
10+
secrets: inherit

0 commit comments

Comments
 (0)