From 72dae7e0eebc7da2656c83daa4fea5a1226c854d Mon Sep 17 00:00:00 2001 From: Bryan Morgan Date: Sat, 10 Jan 2026 14:58:36 -0500 Subject: [PATCH] Triage action cleanup (#16319) --- .../gemini-automated-issue-triage.yml | 17 ++++-- .../gemini-scheduled-issue-triage.yml | 60 +++---------------- scripts/relabel_issues.sh | 42 +++++++++++++ 3 files changed, 61 insertions(+), 58 deletions(-) create mode 100755 scripts/relabel_issues.sh diff --git a/.github/workflows/gemini-automated-issue-triage.yml b/.github/workflows/gemini-automated-issue-triage.yml index 864174ca1c..02809630bc 100644 --- a/.github/workflows/gemini-automated-issue-triage.yml +++ b/.github/workflows/gemini-automated-issue-triage.yml @@ -14,9 +14,15 @@ on: description: 'issue number to triage' required: true type: 'number' + workflow_call: + inputs: + issue_number: + description: 'issue number to triage' + required: false + type: 'string' concurrency: - group: '${{ github.workflow }}-${{ github.event.issue.number || github.event.inputs.issue_number }}' + group: '${{ github.workflow }}-${{ github.event.issue.number || github.event.inputs.issue_number || inputs.issue_number }}' cancel-in-progress: true defaults: @@ -34,7 +40,7 @@ permissions: jobs: triage-issue: if: |- - github.repository == 'google-gemini/gemini-cli' && + (github.repository == 'google-gemini/gemini-cli' || github.repository == 'google-gemini/maintainers-gemini-cli') && ( github.event_name == 'workflow_dispatch' || ( @@ -57,10 +63,11 @@ jobs: with: github-token: '${{ secrets.GITHUB_TOKEN }}' script: | + const issueNumber = ${{ github.event.inputs.issue_number || inputs.issue_number }}; const { data: issue } = await github.rest.issues.get({ owner: context.repo.owner, repo: context.repo.repo, - issue_number: ${{ github.event.inputs.issue_number }}, + issue_number: issueNumber, }); core.setOutput('title', issue.title); core.setOutput('body', issue.body); @@ -71,7 +78,7 @@ jobs: if: |- github.event_name == 'workflow_dispatch' env: - ISSUE_NUMBER_INPUT: '${{ github.event.inputs.issue_number }}' + ISSUE_NUMBER_INPUT: '${{ github.event.inputs.issue_number || inputs.issue_number }}' LABELS: '${{ steps.get_issue_data.outputs.labels }}' run: | if echo "${LABELS}" | grep -q 'area/'; then @@ -127,7 +134,7 @@ jobs: ISSUE_BODY: >- ${{ github.event_name == 'workflow_dispatch' && steps.get_issue_data.outputs.body || github.event.issue.body }} ISSUE_NUMBER: >- - ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.issue_number || github.event.issue.number }} + ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.issue_number || inputs.issue_number) || github.event.issue.number }} REPOSITORY: '${{ github.repository }}' AVAILABLE_LABELS: '${{ steps.get_labels.outputs.available_labels }}' with: diff --git a/.github/workflows/gemini-scheduled-issue-triage.yml b/.github/workflows/gemini-scheduled-issue-triage.yml index 8887a47413..a892ddbe13 100644 --- a/.github/workflows/gemini-scheduled-issue-triage.yml +++ b/.github/workflows/gemini-scheduled-issue-triage.yml @@ -116,12 +116,12 @@ jobs: 1. You are only able to use the echo command. Review the available labels in the environment variable: "${AVAILABLE_LABELS}". 2. Check environment variable for issues to triage: $ISSUES_TO_TRIAGE (JSON array of issues) 3. Review the issue title, body and any comments provided in the environment variables. - 4. Identify the most relevant labels from the existing labels, focusing on kind/*, area/*, sub-area/* and priority/*. - 5. If the issue already has area/ label, dont try to change it. Similarly, if the issue already has a kind/ label don't change it. And if the issue already has a priority/ label do not change it for example: - If an issue has area/core and kind/bug you will only add a priority/ label. - Instead if an issue has no labels, you will could add one lable of each kind. + 4. Identify the most relevant labels from the existing labels, focusing on kind/* and priority/*. + 5. If the issue already has a kind/ label don't change it. And if the issue already has a priority/ label do not change it for example: + If an issue has kind/bug you will only add a priority/ label. + Instead if an issue has no labels, you could add one label of each kind. 6. Identify other applicable labels based on the issue content, such as status/*, help wanted, good first issue, etc. - 7. For area/* and kind/* limit yourself to only the single most applicable label in each case. + 7. For kind/* limit yourself to only the single most applicable label. 8. Give me a single short explanation about why you are selecting each label in the process. 9. Output a JSON array of objects, each containing the issue number and the labels to add and remove, along with an explanation. For example: @@ -147,7 +147,7 @@ jobs: 11. If you see that the issue doesn't look like it has sufficient information recommend the status/need-information label and leave a comment politely requesting the relevant information, eg.. if repro steps are missing request for repro steps. if version information is missing request for version information into the explanation section below. - After identifying appropriate labels to an issue, add "status/need-triage" label to labels_to_remove in the output. 12. If you think an issue might be a Priority/P0 do not apply the priority/p0 label. Instead apply a status/manual-triage label and include a note in your explanation. - 13. If you are uncertain and have not been able to apply one each of kind/, area/ and priority/ , apply the status/manual-triage label. + 13. If you are uncertain and have not been able to apply one each of kind/ and priority/ , apply the status/manual-triage label. ## Guidelines @@ -157,9 +157,8 @@ jobs: - Do not add comments or modify the issue content. - Do not remove the following labels maintainer, help wanted or good first issue. - Triage only the current issue. - - Identify only one area/ label - Identify only one kind/ label (Do not apply kind/duplicate or kind/parent-issue) - - Identify all applicable sub-area/* and priority/* labels based on the issue content. It's ok to have multiple of these. + - Identify all applicable priority/* labels based on the issue content. It's ok to have multiple of these. - Once you categorize the issue if it needs information bump down the priority by 1 eg.. a p0 would become a p1 a p1 would become a p2. P2 and P3 can stay as is in this scenario. Categorization Guidelines: P0: Critical / Blocker @@ -206,51 +205,6 @@ jobs: - If users are talking about issues where the model gets downgraded from pro to flash then i want you to categorize that as a performance issue - This product is designed to use different models eg.. using pro, downgrading to flash etc. - When users report that they dont expect the model to change those would be categorized as feature requests. - Definition of Areas - area/ux: - - Issues concerning user-facing elements like command usability, interactive features, help docs, and perceived performance. - - I am seeing my screen flicker when using Gemini CLI - - I am seeing the output malformed - - Theme changes aren't taking effect - - My keyboard inputs arent' being recognzied - area/platform: - - Issues related to installation, packaging, OS compatibility (Windows, macOS, Linux), and the underlying CLI framework. - area/background: Issues related to long-running background tasks, daemons, and autonomous or proactive agent features. - area/models: - - i am not getting a response that is reasonable or expected. this can include things like - - I am calling a tool and the tool is not performing as expected. - - i am expecting a tool to be called and it is not getting called , - - Including experience when using - - built-in tools (e.g., web search, code interpreter, read file, writefile, etc..), - - Function calling issues should be under this area - - i am getting responses from the model that are malformed. - - Issues concerning Gemini quality of response and inference, - - Issues talking about unnecessary token consumption. - - Issues talking about Model getting stuck in a loop be watchful as this could be the root cause for issues that otherwise seem like model performance issues. - - Memory compression - - unexpected responses, - - poor quality of generated code - area/tools: - - These are primarily issues related to Model Context Protocol - - These are issues that mention MCP support - - feature requests asking for support for new tools. - area/core: - - Issues with fundamental components like command parsing, configuration management, session state, and the main API client logic. Introducing multi-modality - area/contribution: - - Issues related to improving the developer contribution experience, such as CI/CD pipelines, build scripts, and test automation infrastructure. - area/authentication: - - Issues related to user identity, login flows, API key handling, credential storage, and access token management, unable to sign in selecting wrong authentication path etc.. - area/security-privacy: - - Issues concerning vulnerability patching, dependency security, data sanitization, privacy controls, and preventing unauthorized data access. - area/extensibility: - - Issues related to the plugin system, extension APIs, or making the CLI's functionality available in other applications, github actions, ide support etc.. - area/performance: - - Issues focused on model performance - - Issues with running out of capacity, - - 429 errors etc.. - - could also pertain to latency, - - other general software performance like, memory usage, CPU consumption, and algorithmic efficiency. - - Switching models from one to the other unexpectedly. - name: 'Apply Labels to Issues' if: |- diff --git a/scripts/relabel_issues.sh b/scripts/relabel_issues.sh new file mode 100755 index 0000000000..82857bfa45 --- /dev/null +++ b/scripts/relabel_issues.sh @@ -0,0 +1,42 @@ +#!/bin/bash +# scripts/relabel_issues.sh +# Usage: ./scripts/relabel_issues.sh [repository] + +set -e + +OLD_LABEL="$1" +NEW_LABEL="$2" +REPO="${3:-google-gemini/gemini-cli}" + +if [ -z "$OLD_LABEL" ] || [ -z "$NEW_LABEL" ]; then + echo "Usage: $0 [repository]" + echo "Example: $0 'area/models' 'area/agent'" + exit 1 +fi + +echo "🔍 Searching for open issues in '$REPO' with label '$OLD_LABEL'..." + +# Fetch issues with the old label +ISSUES=$(gh issue list --repo "$REPO" --label "$OLD_LABEL" --state open --limit 1000 --json number,title) + +COUNT=$(echo "$ISSUES" | jq '. | length') + +if [ "$COUNT" -eq 0 ]; then + echo "✅ No issues found with label '$OLD_LABEL'." + exit 0 +fi + +echo "found $COUNT issues to relabel." + +# Iterate and update +echo "$ISSUES" | jq -r '.[] | "\(.number) \(.title)"' | while read -r number title; do + echo "🔄 Processing #$number: $title" + echo " - Removing: $OLD_LABEL" + echo " + Adding: $NEW_LABEL" + + gh issue edit "$number" --repo "$REPO" --add-label "$NEW_LABEL" --remove-label "$OLD_LABEL" + + echo " ✅ Done." +done + +echo "🎉 All issues relabeled!"