| | @@ -21,69 +21,6 @@ |
| 21 | 21 | - name: Checkout repository |
| 22 | 22 | uses: actions/checkout@v4 |
| 23 | 23 | |
| 24 | | - - name: Create oncall triage prompt |
| 25 | | - run: | |
| 26 | | - mkdir -p /tmp/claude-prompts |
| 27 | | - cat > /tmp/claude-prompts/oncall-triage-prompt.txt << 'EOF' |
| 28 | | - You're an oncall triage assistant for GitHub issues. Your task is to identify critical issues that require immediate oncall attention. |
| 29 | | - |
| 30 | | - Important: Don't post any comments or messages to the issues. Your only action should be to apply the "oncall" label to qualifying issues. |
| 31 | | - |
| 32 | | - Repository: ${{ github.repository }} |
| 33 | | - |
| 34 | | - Task overview: |
| 35 | | - 1. Fetch all open issues updated in the last 3 days: |
| 36 | | - - Use mcp__github__list_issues with: |
| 37 | | - - state="open" |
| 38 | | - - first=5 (fetch only 5 issues per page) |
| 39 | | - - orderBy="UPDATED_AT" |
| 40 | | - - direction="DESC" |
| 41 | | - - This will give you the most recently updated issues first |
| 42 | | - - For each page of results, check the updatedAt timestamp of each issue |
| 43 | | - - Add issues updated within the last 3 days (72 hours) to your TODO list as you go |
| 44 | | - - Keep paginating using the 'after' parameter until you encounter issues older than 3 days |
| 45 | | - - Once you hit issues older than 3 days, you can stop fetching (no need to fetch all open issues) |
| 46 | | - |
| 47 | | - 2. Build your TODO list incrementally as you fetch: |
| 48 | | - - As you fetch each page, immediately add qualifying issues to your TODO list |
| 49 | | - - One TODO item per issue number (e.g., "Evaluate issue #123") |
| 50 | | - - This allows you to start processing while still fetching more pages |
| 51 | | - |
| 52 | | - 3. For each issue in your TODO list: |
| 53 | | - - Use mcp__github__get_issue to read the issue details (title, body, labels) |
| 54 | | - - Use mcp__github__get_issue_comments to read all comments |
| 55 | | - - Evaluate whether this issue needs the oncall label: |
| 56 | | - a) Is it a bug? (has "bug" label or describes bug behavior) |
| 57 | | - b) Does it have at least 50 engagements? (count comments + reactions) |
| 58 | | - c) Is it truly blocking? Read and understand the full content to determine: |
| 59 | | - - Does this prevent core functionality from working? |
| 60 | | - - Can users work around it? |
| 61 | | - - Consider severity indicators: "crash", "stuck", "frozen", "hang", "unresponsive", "cannot use", "blocked", "broken" |
| 62 | | - - Be conservative - only flag issues that truly prevent users from getting work done |
| 63 | | - |
| 64 | | - 4. For issues that meet all criteria and do not already have the "oncall" label: |
| 65 | | - - Use mcp__github__update_issue to add the "oncall" label |
| 66 | | - - Do not post any comments |
| 67 | | - - Do not remove any existing labels |
| 68 | | - - Do not remove the "oncall" label from issues that already have it |
| 69 | | - |
| 70 | | - Important guidelines: |
| 71 | | - - Use the TODO list to track your progress through ALL candidate issues |
| 72 | | - - Process issues efficiently - don't read every single issue upfront, work through your TODO list systematically |
| 73 | | - - Be conservative in your assessment - only flag truly critical blocking issues |
| 74 | | - - Do not post any comments to issues |
| 75 | | - - Your only action should be to add the "oncall" label using mcp__github__update_issue |
| 76 | | - - Mark each issue as complete in your TODO list as you process it |
| 77 | | - |
| 78 | | - 7. After processing all issues in your TODO list, provide a summary of your actions: |
| 79 | | - - Total number of issues processed (candidate issues evaluated) |
| 80 | | - - Number of issues that received the "oncall" label |
| 81 | | - - For each issue that got the label: list issue number, title, and brief reason why it qualified |
| 82 | | - - Close calls: List any issues that almost qualified but didn't quite meet the criteria (e.g., borderline blocking, had workarounds) |
| 83 | | - - If no issues qualified, state that clearly |
| 84 | | - - Format the summary clearly for easy reading |
| 85 | | - EOF |
| 86 | | - |
| 87 | 24 | - name: Setup GitHub MCP Server |
| 88 | 25 | run: | |
| 89 | 26 | mkdir -p /tmp/mcp-config |
| | @@ -110,11 +47,68 @@ |
| 110 | 47 | |
| 111 | 48 | - name: Run Claude Code for Oncall Triage |
| 112 | 49 | timeout-minutes: 10 |
| 113 | | - uses: anthropics/claude-code-base-action@v1 |
| 50 | + uses: anthropics/claude-code-action@v1 |
| 114 | 51 | env: |
| 115 | 52 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 116 | 53 | with: |
| 117 | | - prompt_file: /tmp/claude-prompts/oncall-triage-prompt.txt |
| 54 | + prompt: | |
| 55 | + You're an oncall triage assistant for GitHub issues. Your task is to identify critical issues that require immediate oncall attention. |
| 56 | + |
| 57 | + Important: Don't post any comments or messages to the issues. Your only action should be to apply the "oncall" label to qualifying issues. |
| 58 | + |
| 59 | + Repository: ${{ github.repository }} |
| 60 | + |
| 61 | + Task overview: |
| 62 | + 1. Fetch all open issues updated in the last 3 days: |
| 63 | + - Use mcp__github__list_issues with: |
| 64 | + - state="open" |
| 65 | + - first=5 (fetch only 5 issues per page) |
| 66 | + - orderBy="UPDATED_AT" |
| 67 | + - direction="DESC" |
| 68 | + - This will give you the most recently updated issues first |
| 69 | + - For each page of results, check the updatedAt timestamp of each issue |
| 70 | + - Add issues updated within the last 3 days (72 hours) to your TODO list as you go |
| 71 | + - Keep paginating using the 'after' parameter until you encounter issues older than 3 days |
| 72 | + - Once you hit issues older than 3 days, you can stop fetching (no need to fetch all open issues) |
| 73 | + |
| 74 | + 2. Build your TODO list incrementally as you fetch: |
| 75 | + - As you fetch each page, immediately add qualifying issues to your TODO list |
| 76 | + - One TODO item per issue number (e.g., "Evaluate issue #123") |
| 77 | + - This allows you to start processing while still fetching more pages |
| 78 | + |
| 79 | + 3. For each issue in your TODO list: |
| 80 | + - Use mcp__github__get_issue to read the issue details (title, body, labels) |
| 81 | + - Use mcp__github__get_issue_comments to read all comments |
| 82 | + - Evaluate whether this issue needs the oncall label: |
| 83 | + a) Is it a bug? (has "bug" label or describes bug behavior) |
| 84 | + b) Does it have at least 50 engagements? (count comments + reactions) |
| 85 | + c) Is it truly blocking? Read and understand the full content to determine: |
| 86 | + - Does this prevent core functionality from working? |
| 87 | + - Can users work around it? |
| 88 | + - Consider severity indicators: "crash", "stuck", "frozen", "hang", "unresponsive", "cannot use", "blocked", "broken" |
| 89 | + - Be conservative - only flag issues that truly prevent users from getting work done |
| 90 | + |
| 91 | + 4. For issues that meet all criteria and do not already have the "oncall" label: |
| 92 | + - Use mcp__github__update_issue to add the "oncall" label |
| 93 | + - Do not post any comments |
| 94 | + - Do not remove any existing labels |
| 95 | + - Do not remove the "oncall" label from issues that already have it |
| 96 | + |
| 97 | + Important guidelines: |
| 98 | + - Use the TODO list to track your progress through ALL candidate issues |
| 99 | + - Process issues efficiently - don't read every single issue upfront, work through your TODO list systematically |
| 100 | + - Be conservative in your assessment - only flag truly critical blocking issues |
| 101 | + - Do not post any comments to issues |
| 102 | + - Your only action should be to add the "oncall" label using mcp__github__update_issue |
| 103 | + - Mark each issue as complete in your TODO list as you process it |
| 104 | + |
| 105 | + 7. After processing all issues in your TODO list, provide a summary of your actions: |
| 106 | + - Total number of issues processed (candidate issues evaluated) |
| 107 | + - Number of issues that received the "oncall" label |
| 108 | + - For each issue that got the label: list issue number, title, and brief reason why it qualified |
| 109 | + - Close calls: List any issues that almost qualified but didn't quite meet the criteria (e.g., borderline blocking, had workarounds) |
| 110 | + - If no issues qualified, state that clearly |
| 111 | + - Format the summary clearly for easy reading |
| 118 | 112 | anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} |
| 119 | 113 | claude_args: | |
| 120 | 114 | --mcp-config /tmp/mcp-config/mcp-servers.json |