diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 556b65b9..579bc385 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,6 +1,6 @@ name: 'Bug Report' description: 'Report a bug to help us improve Qwen Code' -labels: ['kind/bug', 'status/need-triage'] +labels: ['type/bug', 'status/needs-triage'] body: - type: 'markdown' attributes: diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index febece87..411ca604 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,8 +1,8 @@ name: 'Feature Request' description: 'Suggest an idea for this project' labels: - - 'kind/enhancement' - - 'status/need-triage' + - 'type/feature-request' + - 'status/needs-triage' body: - type: 'markdown' attributes: diff --git a/.github/scripts/pr-triage.sh b/.github/scripts/pr-triage.sh index 985b3ffc..a13481f6 100755 --- a/.github/scripts/pr-triage.sh +++ b/.github/scripts/pr-triage.sh @@ -40,21 +40,13 @@ process_pr() { fi if [[ -z "${ISSUE_NUMBER}" ]]; then - echo "⚠️ No linked issue found for PR #${PR_NUMBER}, adding status/need-issue label" - if ! gh pr edit "${PR_NUMBER}" --repo "${GITHUB_REPOSITORY}" --add-label "status/need-issue" 2>/dev/null; then - echo " ⚠️ Failed to add label (may already exist or have permission issues)" - fi - # Add PR number to the list - if [[ -z "${PRS_NEEDING_COMMENT}" ]]; then - PRS_NEEDING_COMMENT="${PR_NUMBER}" - else - PRS_NEEDING_COMMENT="${PRS_NEEDING_COMMENT},${PR_NUMBER}" - fi - echo "needs_comment=true" >> "${GITHUB_OUTPUT}" + echo "ℹ️ No linked issue found for PR #${PR_NUMBER} - this is acceptable for independent contributions" + # We no longer require PRs to have linked issues + # Independent valuable contributions are encouraged else echo "🔗 Found linked issue #${ISSUE_NUMBER}" - # Remove status/need-issue label if present + # Remove status/need-issue label if present (legacy cleanup) if ! gh pr edit "${PR_NUMBER}" --repo "${GITHUB_REPOSITORY}" --remove-label "status/need-issue" 2>/dev/null; then echo " status/need-issue label not present or could not be removed" fi @@ -99,7 +91,7 @@ process_pr() { local LABELS_TO_REMOVE="" for label in "${PR_LABEL_ARRAY[@]}"; do if [[ -n "${label}" ]] && [[ " ${ISSUE_LABEL_ARRAY[*]} " != *" ${label} "* ]]; then - # Don't remove status/need-issue since we already handled it + # Don't remove status/need-issue since we already handled it (legacy cleanup) if [[ "${label}" != "status/need-issue" ]]; then if [[ -z "${LABELS_TO_REMOVE}" ]]; then LABELS_TO_REMOVE="${label}" diff --git a/.github/workflows/check-issue-completeness.yml b/.github/workflows/check-issue-completeness.yml new file mode 100644 index 00000000..bf8630bc --- /dev/null +++ b/.github/workflows/check-issue-completeness.yml @@ -0,0 +1,201 @@ +name: 'Check Issue Completeness' + +on: + issues: + types: + - 'opened' + - 'edited' + +permissions: + contents: 'read' + issues: 'write' + +jobs: + check-issue-info: + timeout-minutes: 2 + if: |- + ${{ github.repository == 'QwenLM/qwen-code' && contains(github.event.issue.labels.*.name, 'type/bug') }} + runs-on: 'ubuntu-latest' + steps: + - name: 'Check for Client Information' + id: 'check_info' + env: + ISSUE_BODY: '${{ github.event.issue.body }}' + run: |- + echo "Checking issue body for required information..." + + # Convert issue body to lowercase for case-insensitive matching + ISSUE_BODY_LOWER=$(echo "$ISSUE_BODY" | tr '[:upper:]' '[:lower:]') + + # Initialize flags + HAS_VERSION=false + HAS_OS_INFO=false + HAS_AUTH_METHOD=false + HAS_ABOUT_OUTPUT=false + MISSING_INFO=() + + # Check for /about command output by looking for its characteristic fields + # The /about output contains: CLI Version, Git Commit, Model, Sandbox, OS, Auth Method + if echo "$ISSUE_BODY_LOWER" | grep -qE 'cli version.*[0-9]+\.[0-9]+\.[0-9]+'; then + HAS_ABOUT_OUTPUT=true + HAS_VERSION=true + fi + + # If full /about output is not detected, check individual components + if [ "$HAS_ABOUT_OUTPUT" = false ]; then + # Check for version information (various formats) + if echo "$ISSUE_BODY_LOWER" | grep -qE '(cli version|version|v)[[:space:]]*[0-9]+\.[0-9]+\.[0-9]+'; then + HAS_VERSION=true + fi + + # Check for OS information + if echo "$ISSUE_BODY_LOWER" | grep -qE '(^os[[:space:]]|macos|windows|linux|ubuntu|debian|fedora|arch|darwin|win32|platform)'; then + HAS_OS_INFO=true + fi + + # Check for Auth Method information + if echo "$ISSUE_BODY_LOWER" | grep -qE '(auth method|authentication|login|qwen-oauth|api.?config|oauth)'; then + HAS_AUTH_METHOD=true + fi + else + # If /about output is present, assume it contains OS and auth info + HAS_OS_INFO=true + HAS_AUTH_METHOD=true + fi + + # Determine what's missing + if [ "$HAS_ABOUT_OUTPUT" = false ]; then + if [ "$HAS_VERSION" = false ]; then + MISSING_INFO+=("Qwen Code version") + fi + if [ "$HAS_OS_INFO" = false ]; then + MISSING_INFO+=("operating system information") + fi + if [ "$HAS_AUTH_METHOD" = false ]; then + MISSING_INFO+=("authentication/login method") + fi + # Suggest providing /about output for completeness + if [ "$HAS_VERSION" = false ] || [ "$HAS_OS_INFO" = false ] || [ "$HAS_AUTH_METHOD" = false ]; then + MISSING_INFO+=("full output of the \`/about\` command (recommended)") + fi + fi + + # Set output variables + if [ ${#MISSING_INFO[@]} -eq 0 ]; then + echo "info_complete=true" >> "$GITHUB_OUTPUT" + echo "All required information is present." + else + echo "info_complete=false" >> "$GITHUB_OUTPUT" + # Join array elements with comma + MISSING_LIST=$(IFS=','; echo "${MISSING_INFO[*]}") + echo "missing_info=$MISSING_LIST" >> "$GITHUB_OUTPUT" + echo "Missing information: $MISSING_LIST" + fi + + - name: 'Comment on Issue if Information is Missing' + if: |- + ${{ steps.check_info.outputs.info_complete == 'false' }} + uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' # ratchet:actions/github-script@v7 + env: + MISSING_INFO: '${{ steps.check_info.outputs.missing_info }}' + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + script: | + const missingInfo = process.env.MISSING_INFO.split(','); + const missingList = missingInfo.map(item => `- ${item}`).join('\n'); + + const comments = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + + const botComment = comments.data.find(comment => + comment.user.type === 'Bot' && + comment.body.includes('Missing Required Information') + ); + + const commentBody = `### ⚠️ Missing Required Information + + Thank you for reporting this issue! To help us investigate and resolve this problem more effectively, we need some additional information: + + ${missingList} + + ### How to provide this information: + + Please run the following command and paste the complete output: + + \`\`\`bash + qwen + # Then in the interactive CLI, run: + /about + \`\`\` + + The output should look like: + \`\`\` + CLI Version 0.0.14 + Git Commit 9a0cb64a + Model coder-model + Sandbox no sandbox + OS darwin + Auth Method qwen-oauth + \`\`\` + + Once you provide this information, we'll be able to assist you better. Thank you! 🙏`; + + if (botComment) { + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: botComment.id, + body: commentBody + }); + console.log('Updated existing comment about missing information.'); + } else { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: commentBody + }); + console.log('Created new comment about missing information.'); + } + + - name: 'Add status/need-information Label' + if: |- + ${{ steps.check_info.outputs.info_complete == 'false' }} + uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' # ratchet:actions/github-script@v7 + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + script: | + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: ['status/need-information'] + }); + console.log('Added status/need-information label.'); + + - name: 'Remove status/need-information Label if Complete' + if: |- + ${{ steps.check_info.outputs.info_complete == 'true' }} + uses: 'actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea' # ratchet:actions/github-script@v7 + continue-on-error: true + with: + github-token: '${{ secrets.GITHUB_TOKEN }}' + script: | + try { + await github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + name: 'status/need-information' + }); + console.log('Removed status/need-information label as information is now complete.'); + } catch (error) { + if (error.status === 404) { + console.log('Label not found on issue, nothing to remove.'); + } else { + throw error; + } + } diff --git a/.github/workflows/gemini-automated-issue-triage.yml b/.github/workflows/qwen-automated-issue-triage.yml similarity index 68% rename from .github/workflows/gemini-automated-issue-triage.yml rename to .github/workflows/qwen-automated-issue-triage.yml index 5a426751..5b5a556e 100644 --- a/.github/workflows/gemini-automated-issue-triage.yml +++ b/.github/workflows/qwen-automated-issue-triage.yml @@ -71,20 +71,20 @@ jobs: 1. Run: `gh label list --repo ${{ github.repository }} --limit 100` to get all available labels. 2. Use shell command `echo` to check the issue title and body provided in the environment variables: "${ISSUE_TITLE}" and "${ISSUE_BODY}". 3. Ignore any existing priorities or tags on the issue. Just report your findings. - 4. Select the most relevant labels from the existing labels, focusing on kind/*, area/*, sub-area/* and priority/*. For area/* and kind/* limit yourself to only the single most applicable label in each case. + 4. Select the most relevant labels from the existing labels, focusing on type/*, category/*, scope/*, status/* and priority/*. For category/* and type/* limit yourself to only the single most applicable label in each case. 6. Apply the selected labels to this issue using: `gh issue edit ${{ github.event.issue.number }} --repo ${{ github.repository }} --add-label "label1,label2"`. 7. For each issue please check if CLI version is present, this is usually in the output of the /about command and will look like 0.1.5 for anything more than 6 versions older than the most recent should add the status/need-retesting label. 8. If you see that the issue doesn't look like it has sufficient information recommend the status/need-information label. - 9. Use Area definitions mentioned below to help you narrow down issues. + 9. Use Category and Scope definitions mentioned below to help you narrow down issues. ## Guidelines - Only use labels that already exist in the repository - Do not add comments or modify the issue content - Triage only the current issue - - Identify only one area/ label - - Identify only one kind/ label - - Identify all applicable sub-area/* and priority/* labels based on the issue content. It's ok to have multiple of these + - Identify only one category/ label + - Identify only one type/ label + - Identify all applicable scope/*, status/* and 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 - Reference all shell variables as "${VAR}" (with quotes and braces) - Output only valid JSON format @@ -127,45 +127,55 @@ jobs: Things you should know: - 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. + Definition of Categories and Scopes + + category/cli: Command line interface and interaction + - Issues with interactive CLI features, command parsing, keyboard shortcuts + - Related scopes: scope/commands, scope/interactive, scope/non-interactive, scope/keybindings + + category/core: Core engine and logic + - Issues with fundamental components, content generation, session management + - Related scopes: scope/content-generation, scope/token-management, scope/session-management, scope/model-switching + + category/ui: User interface and display + - Issues with themes, UI components, rendering, markdown display + - Related scopes: scope/themes, scope/components, scope/rendering, scope/markdown + + category/authentication: Authentication and authorization + - Issues with login flows, API keys, OAuth, credential storage + - Related scopes: scope/oauth, scope/api-keys, scope/token-storage + + category/tools: Tool integration and execution + - Issues with MCP, shell execution, file operations, web search, memory, git integration + - Related scopes: scope/mcp, scope/shell, scope/file-operations, scope/web-search, scope/memory, scope/git + + category/configuration: Configuration management + - Issues with settings, extensions, trusted folders, sandbox configuration + - Related scopes: scope/settings, scope/extensions, scope/trusted-folders, scope/sandbox + + category/integration: External integrations + - Issues with IDE integration, VSCode extension, Zed integration, GitHub Actions + - Related scopes: scope/ide, scope/vscode, scope/zed, scope/github-actions + + category/platform: Platform compatibility + - Issues with installation, OS compatibility, packaging + - Related scopes: scope/installation, scope/macos, scope/windows, scope/linux, scope/packaging + + category/performance: Performance and optimization + - Issues with latency, memory usage, model performance, caching + - Related scopes: scope/latency, scope/memory-usage, scope/model-performance, scope/caching + + category/security: Security and privacy + - Issues with data privacy, credential security, vulnerabilities + - Related scopes: scope/data-privacy, scope/credential-security, scope/vulnerability + + category/telemetry: Telemetry and analytics + - Issues with metrics collection, logging, analytics + - Related scopes: scope/metrics, scope/logging, scope/analytics + + category/development: Development experience + - Issues with build system, testing, CI/CD, documentation + - Related scopes: scope/build-system, scope/testing, scope/ci-cd, scope/documentation - name: 'Post Issue Analysis Failure Comment' if: |- diff --git a/.github/workflows/gemini-scheduled-issue-triage.yml b/.github/workflows/qwen-scheduled-issue-triage.yml similarity index 71% rename from .github/workflows/gemini-scheduled-issue-triage.yml rename to .github/workflows/qwen-scheduled-issue-triage.yml index ba417ecc..9b9a94f0 100644 --- a/.github/workflows/gemini-scheduled-issue-triage.yml +++ b/.github/workflows/qwen-scheduled-issue-triage.yml @@ -84,16 +84,16 @@ jobs: 2. Use shell command `echo` to 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. Ignore any existing priorities or tags on the issue. - 5. Select the most relevant labels from the existing labels, focusing on kind/*, area/*, sub-area/* and priority/*. + 5. Select the most relevant labels from the existing labels, focusing on type/*, category/*, scope/*, status/* and priority/*. 6. Get the list of labels already on the issue using `gh issue view ISSUE_NUMBER --repo ${{ github.repository }} --json labels -t '{{range .labels}}{{.name}}{{"\n"}}{{end}}' - 7. For area/* and kind/* limit yourself to only the single most applicable label in each case. + 7. For category/* and type/* limit yourself to only the single most applicable label in each case. 8. Give me a single short paragraph about why you are selecting each label in the process. use the format Issue ID: , Title, Label applied:, Label removed, ovearll explanation 9. Parse the JSON array from step 2 and for EACH INDIVIDUAL issue, apply appropriate labels using separate commands: - `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --add-label "label1"` - `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --add-label "label2"` - Continue for each label separately - IMPORTANT: Label each issue individually, one command per issue, one label at a time if needed. - - Make sure after you apply labels there is only one area/* and one kind/* label per issue. + - Make sure after you apply labels there is only one category/* and one type/* label per issue. - To do this look for labels found in step 6 that no longer apply remove them one at a time using - `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --remove-label "label-name1"` - `gh issue edit ISSUE_NUMBER --repo ${{ github.repository }} --remove-label "label-name2"` @@ -113,9 +113,9 @@ jobs: - Do not add comments or modify the issue content. - Do not remove labels titled 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 only one category/ label + - Identify only one type/ label (Do not apply type/duplicate or type/parent-issue) + - Identify all applicable scope/*, status/* and 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 @@ -157,48 +157,52 @@ 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. + Definition of Categories and Scopes + + category/cli: Command line interface and interaction + - Issues with interactive CLI features, command parsing, keyboard shortcuts + - Related scopes: scope/commands, scope/interactive, scope/non-interactive, scope/keybindings + + category/core: Core engine and logic + - Issues with fundamental components, content generation, session management + - Related scopes: scope/content-generation, scope/token-management, scope/session-management, scope/model-switching + + category/ui: User interface and display + - Issues with themes, UI components, rendering, markdown display + - Related scopes: scope/themes, scope/components, scope/rendering, scope/markdown + + category/authentication: Authentication and authorization + - Issues with login flows, API keys, OAuth, credential storage + - Related scopes: scope/oauth, scope/api-keys, scope/token-storage + + category/tools: Tool integration and execution + - Issues with MCP, shell execution, file operations, web search, memory, git integration + - Related scopes: scope/mcp, scope/shell, scope/file-operations, scope/web-search, scope/memory, scope/git + + category/configuration: Configuration management + - Issues with settings, extensions, trusted folders, sandbox configuration + - Related scopes: scope/settings, scope/extensions, scope/trusted-folders, scope/sandbox + + category/integration: External integrations + - Issues with IDE integration, VSCode extension, Zed integration, GitHub Actions + - Related scopes: scope/ide, scope/vscode, scope/zed, scope/github-actions + + category/platform: Platform compatibility + - Issues with installation, OS compatibility, packaging + - Related scopes: scope/installation, scope/macos, scope/windows, scope/linux, scope/packaging + + category/performance: Performance and optimization + - Issues with latency, memory usage, model performance, caching + - Related scopes: scope/latency, scope/memory-usage, scope/model-performance, scope/caching + + category/security: Security and privacy + - Issues with data privacy, credential security, vulnerabilities + - Related scopes: scope/data-privacy, scope/credential-security, scope/vulnerability + + category/telemetry: Telemetry and analytics + - Issues with metrics collection, logging, analytics + - Related scopes: scope/metrics, scope/logging, scope/analytics + + category/development: Development experience + - Issues with build system, testing, CI/CD, documentation + - Related scopes: scope/build-system, scope/testing, scope/ci-cd, scope/documentation