From 73d8fbfebc9158f58ea671b51698b1b18684ffcb Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Wed, 12 Nov 2025 10:56:33 -0800 Subject: [PATCH] feat: update issue-triage to process comments for AI spam --- .github/workflows/issue-triage.lock.yml | 31 ++++++++++++++----------- .github/workflows/issue-triage.md | 27 +++++++++++---------- 2 files changed, 32 insertions(+), 26 deletions(-) diff --git a/.github/workflows/issue-triage.lock.yml b/.github/workflows/issue-triage.lock.yml index c318215fbc..0813baf008 100644 --- a/.github/workflows/issue-triage.lock.yml +++ b/.github/workflows/issue-triage.lock.yml @@ -5,7 +5,7 @@ # # Source: githubnext/agentics/workflows/issue-triage.md@0837fb7b24c3b84ee77fb7c8cfa8735c48be347a # -# Effective stop-time: 2025-12-07 20:28:14 +# Effective stop-time: 2025-12-12 18:55:25 # # Job Dependency Graph: # ```mermaid @@ -2141,15 +2141,17 @@ jobs: 2. For each issue found, perform the following triage tasks: - 3. Check for spam and quality issues first: + 3. Use the `get_comments` tool to retrieve all the comments on the issue. + + 4. Check for spam and quality issue descriptions and comments first: - **Non-English Content**: If the issue is primarily written in a non-English language, add a respectful and appreciative comment explaining that while you appreciate their contribution, the majority of the community communicates in English and kindly ask them to repost in English so everyone can follow along and help. Provide a friendly translation of your message in their language if possible. - **Multiple Topics**: If the issue discusses multiple unrelated topics or problems, add a comment explaining that each issue should focus on one clear topic so the team can effectively solve the right problem. Politely ask them to split it into separate issues. - - **Obvious Spam or Bot-Generated Content**: If the issue is obviously spam, generated by a bot, or something that is not an actual issue to be worked on, add an issue comment with a one-sentence analysis and move to the next issue. + - **Obvious Spam or Bot-Generated Content**: If the issue/comment is obviously spam, generated by a bot, or something that is not an actual issue to be worked on, add an issue comment with a one-sentence analysis and move to the next issue. - 4. Retrieve the issue content using the `get_issue` tool for any issues that pass the spam checks. + 5. Retrieve the issue content using the `get_issue` tool for any issues that pass the spam checks. - 5. Next, use the GitHub tools to gather additional context about the issue: + 6. Next, use the GitHub tools to gather additional context about the issue: - Fetch the list of labels available in this repository using the `list_label` tool with `owner: "appwrite"` and `repo: "appwrite"` parameters. This will give you the labels you can use for triaging issues. - Fetch any comments on the issue using the `get_issue_comments` tool to understand recent activity @@ -2158,7 +2160,7 @@ jobs: - Then perform an org-wide search across the entire Appwrite organization using: `org:appwrite is:issue (is:open OR is:closed) `. - Prefer linking to OPEN issues when identifying potential duplicates; include CLOSED ones as related history when useful. - 6. Analyze the issue content, considering: + 7. Analyze the issue content, considering: - The issue title and description - The type of issue (bug report, feature request, question, etc.) @@ -2167,9 +2169,9 @@ jobs: - User impact - Components affected - 7. Write notes, ideas, nudges, resource links, debugging strategies and/or reproduction steps for the team to consider relevant to the issue. + 8. Write notes, ideas, nudges, resource links, debugging strategies and/or reproduction steps for the team to consider relevant to the issue. - 8. Select appropriate labels from the available labels list: + 9. Select appropriate labels from the available labels list: - Choose labels that accurately reflect the issue's nature - Be specific but comprehensive @@ -2178,16 +2180,16 @@ jobs: - Search for similar issues. If you find a duplicate of another OPEN issue in THIS repository, you may use a "duplicate" label (if available) and reference the canonical issue. - If the closest match is in another repository within the Appwrite org, do NOT mark as duplicate here; instead, link it in your comment under a "Cross‑repo related issues" section. - Only select labels from the provided list - - Only apply the `good first issue` label on verified issues with straightforward fixes + - Don't apply the `good first issue` or `help wanted` labels - It's okay to not add any labels if none are clearly applicable - 9. Apply the selected labels: + 10. Apply the selected labels: - Use the `update_issue` tool to apply the labels to the issue - DO NOT communicate directly with users - If no labels are clearly applicable, do not apply any labels - 10. Add an issue comment to the issue with your analysis: + 11. Add an issue comment to the issue with your analysis: - Start with "🎯 Agentic Issue Triage" - Provide a brief summary of the issue - **If duplicate or related issues were found**, add sections listing them with links: @@ -2198,9 +2200,10 @@ jobs: - Suggest resources or links that might be helpful for resolving the issue or learning skills related to the issue or the particular area of the codebase affected by it - Mention any nudges or ideas that could help the team in addressing the issue - If appropriate break the issue down to sub-tasks and write a checklist of things to do - - Use collapsed-by-default sections in the GitHub markdown to keep the comment tidy. Collapse all sections except the short main summary at the top. + - Use collapsed-by-default sections in the GitHub markdown to keep the comment tidy. Collapse all sections except the short main summary at the top. Ensure text is bolded using markdown syntax. + - Do not indicate/encourage a community member to submit a PR for the issue. - 11. After processing all issues, provide a summary of how many issues were triaged (created or updated in the last 24 hours). If no issues matched the criteria, simply note that no issues needed triage. + 12. After processing all issues, provide a summary of how many issues were triaged (created or updated in the last 24 hours). If no issues matched the criteria, simply note that no issues needed triage. PROMPT_EOF - name: Append XPIA security instructions to prompt @@ -5004,7 +5007,7 @@ jobs: id: check_stop_time uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd env: - GH_AW_STOP_TIME: 2025-12-07 20:28:14 + GH_AW_STOP_TIME: 2025-12-12 18:55:25 GH_AW_WORKFLOW_NAME: "Agentic Triage" with: script: | diff --git a/.github/workflows/issue-triage.md b/.github/workflows/issue-triage.md index fdc6a2acf4..448ee563cb 100644 --- a/.github/workflows/issue-triage.md +++ b/.github/workflows/issue-triage.md @@ -50,15 +50,17 @@ You're a triage assistant for GitHub issues. Your task is to analyze issues that 2. For each issue found, perform the following triage tasks: -3. Check for spam and quality issues first: +3. Use the `get_comments` tool to retrieve all the comments on the issue. + +4. Check for spam and quality issue descriptions and comments first: - **Non-English Content**: If the issue is primarily written in a non-English language, add a respectful and appreciative comment explaining that while you appreciate their contribution, the majority of the community communicates in English and kindly ask them to repost in English so everyone can follow along and help. Provide a friendly translation of your message in their language if possible. - **Multiple Topics**: If the issue discusses multiple unrelated topics or problems, add a comment explaining that each issue should focus on one clear topic so the team can effectively solve the right problem. Politely ask them to split it into separate issues. - - **Obvious Spam or Bot-Generated Content**: If the issue is obviously spam, generated by a bot, or something that is not an actual issue to be worked on, add an issue comment with a one-sentence analysis and move to the next issue. + - **Obvious Spam or Bot-Generated Content**: If the issue/comment is obviously spam, generated by a bot, or something that is not an actual issue to be worked on, add an issue comment with a one-sentence analysis and move to the next issue. -4. Retrieve the issue content using the `get_issue` tool for any issues that pass the spam checks. +5. Retrieve the issue content using the `get_issue` tool for any issues that pass the spam checks. -5. Next, use the GitHub tools to gather additional context about the issue: +6. Next, use the GitHub tools to gather additional context about the issue: - Fetch the list of labels available in this repository using the `list_label` tool with `owner: "appwrite"` and `repo: "appwrite"` parameters. This will give you the labels you can use for triaging issues. - Fetch any comments on the issue using the `get_issue_comments` tool to understand recent activity @@ -67,7 +69,7 @@ You're a triage assistant for GitHub issues. Your task is to analyze issues that - Then perform an org-wide search across the entire Appwrite organization using: `org:appwrite is:issue (is:open OR is:closed) `. - Prefer linking to OPEN issues when identifying potential duplicates; include CLOSED ones as related history when useful. -6. Analyze the issue content, considering: +7. Analyze the issue content, considering: - The issue title and description - The type of issue (bug report, feature request, question, etc.) @@ -76,9 +78,9 @@ You're a triage assistant for GitHub issues. Your task is to analyze issues that - User impact - Components affected -7. Write notes, ideas, nudges, resource links, debugging strategies and/or reproduction steps for the team to consider relevant to the issue. +8. Write notes, ideas, nudges, resource links, debugging strategies and/or reproduction steps for the team to consider relevant to the issue. -8. Select appropriate labels from the available labels list: +9. Select appropriate labels from the available labels list: - Choose labels that accurately reflect the issue's nature - Be specific but comprehensive @@ -87,16 +89,16 @@ You're a triage assistant for GitHub issues. Your task is to analyze issues that - Search for similar issues. If you find a duplicate of another OPEN issue in THIS repository, you may use a "duplicate" label (if available) and reference the canonical issue. - If the closest match is in another repository within the Appwrite org, do NOT mark as duplicate here; instead, link it in your comment under a "Cross‑repo related issues" section. - Only select labels from the provided list - - Only apply the `good first issue` label on verified issues with straightforward fixes + - Don't apply the `good first issue` or `help wanted` labels - It's okay to not add any labels if none are clearly applicable -9. Apply the selected labels: +10. Apply the selected labels: - Use the `update_issue` tool to apply the labels to the issue - DO NOT communicate directly with users - If no labels are clearly applicable, do not apply any labels -10. Add an issue comment to the issue with your analysis: +11. Add an issue comment to the issue with your analysis: - Start with "🎯 Agentic Issue Triage" - Provide a brief summary of the issue - **If duplicate or related issues were found**, add sections listing them with links: @@ -107,6 +109,7 @@ You're a triage assistant for GitHub issues. Your task is to analyze issues that - Suggest resources or links that might be helpful for resolving the issue or learning skills related to the issue or the particular area of the codebase affected by it - Mention any nudges or ideas that could help the team in addressing the issue - If appropriate break the issue down to sub-tasks and write a checklist of things to do - - Use collapsed-by-default sections in the GitHub markdown to keep the comment tidy. Collapse all sections except the short main summary at the top. + - Use collapsed-by-default sections in the GitHub markdown to keep the comment tidy. Collapse all sections except the short main summary at the top. Ensure text is bolded using markdown syntax. + - Do not indicate/encourage a community member to submit a PR for the issue. -11. After processing all issues, provide a summary of how many issues were triaged (created or updated in the last 24 hours). If no issues matched the criteria, simply note that no issues needed triage. +12. After processing all issues, provide a summary of how many issues were triaged (created or updated in the last 24 hours). If no issues matched the criteria, simply note that no issues needed triage.