diff --git a/.github/workflows/check-python-versions.lock.yml b/.github/workflows/check-python-versions.lock.yml index 59e6f81..6f50b61 100644 --- a/.github/workflows/check-python-versions.lock.yml +++ b/.github/workflows/check-python-versions.lock.yml @@ -23,7 +23,7 @@ # # Annual check of the latest supported Python versions from peps.python.org. Creates a PR to add newly released versions and remove end-of-life versions from CI workflows, actions, Azure Pipelines, and source code. # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"9d3296491efb7bf7c3e0a99978036edb72d9a02f8e161a3522fe3da88a67ba65","compiler_version":"v0.47.5"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"bb962f8e02a0b044f2a7f184807c71f4bd237159c4e6fdbf55a16dbc05c241ad","compiler_version":"v0.47.5"} name: 'Annual Python Version Update' 'on': @@ -48,7 +48,7 @@ jobs: comment_repo: '' steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Validate context variables @@ -266,7 +266,7 @@ jobs: secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Checkout repository @@ -666,7 +666,7 @@ jobs: const { generateWorkflowOverview } = require('/opt/gh-aw/actions/generate_workflow_overview.cjs'); await generateWorkflowOverview(core); - name: Download prompt artifact - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: prompt path: /tmp/gh-aw/aw-prompts @@ -678,7 +678,7 @@ jobs: timeout-minutes: 20 run: | set -o pipefail - sudo -E awf --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains '*.pythonhosted.org,anaconda.org,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,binstar.org,bootstrap.pypa.io,conda.anaconda.org,conda.binstar.org,crates.io,files.pythonhosted.org,github.com,host.docker.internal,index.crates.io,pip.pypa.io,pypi.org,pypi.python.org,raw.githubusercontent.com,registry.npmjs.org,repo.anaconda.com,repo.continuum.io,static.crates.io,telemetry.enterprise.githubcopilot.com' --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.20.2 --skip-pull --enable-api-proxy \ + sudo -E awf --env-all --container-workdir "${GITHUB_WORKSPACE}" --allow-domains '*.pythonhosted.org,anaconda.org,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,binstar.org,bootstrap.pypa.io,conda.anaconda.org,conda.binstar.org,crates.io,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,github.com,host.docker.internal,index.crates.io,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,peps.python.org,pip.pypa.io,ppa.launchpad.net,pypi.org,pypi.python.org,raw.githubusercontent.com,registry.npmjs.org,repo.anaconda.com,repo.continuum.io,s.symcb.com,s.symcd.com,security.ubuntu.com,static.crates.io,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com' --log-level info --proxy-logs-dir /tmp/gh-aw/sandbox/firewall/logs --enable-host-access --image-tag 0.20.2 --skip-pull --enable-api-proxy \ -- /bin/bash -c '/usr/local/bin/copilot --add-dir /tmp/gh-aw/ --log-level all --log-dir /tmp/gh-aw/sandbox/agent/logs/ --add-dir "${GITHUB_WORKSPACE}" --disable-builtin-mcps --allow-all-tools --allow-all-paths --share /tmp/gh-aw/sandbox/agent/logs/conversation.md --prompt "$(cat /tmp/gh-aw/aw-prompts/prompt.txt)"${GH_AW_MODEL_AGENT_COPILOT:+ --model "$GH_AW_MODEL_AGENT_COPILOT"}' 2>&1 | tee -a /tmp/gh-aw/agent-stdio.log env: COPILOT_AGENT_RUNNER_TYPE: STANDALONE @@ -758,7 +758,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_SAFE_OUTPUTS: ${{ env.GH_AW_SAFE_OUTPUTS }} - GH_AW_ALLOWED_DOMAINS: '*.pythonhosted.org,anaconda.org,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,binstar.org,bootstrap.pypa.io,conda.anaconda.org,conda.binstar.org,crates.io,files.pythonhosted.org,github.com,host.docker.internal,index.crates.io,pip.pypa.io,pypi.org,pypi.python.org,raw.githubusercontent.com,registry.npmjs.org,repo.anaconda.com,repo.continuum.io,static.crates.io,telemetry.enterprise.githubcopilot.com' + GH_AW_ALLOWED_DOMAINS: '*.pythonhosted.org,anaconda.org,api.business.githubcopilot.com,api.enterprise.githubcopilot.com,api.github.com,api.githubcopilot.com,api.individual.githubcopilot.com,api.snapcraft.io,archive.ubuntu.com,azure.archive.ubuntu.com,binstar.org,bootstrap.pypa.io,conda.anaconda.org,conda.binstar.org,crates.io,crl.geotrust.com,crl.globalsign.com,crl.identrust.com,crl.sectigo.com,crl.thawte.com,crl.usertrust.com,crl.verisign.com,crl3.digicert.com,crl4.digicert.com,crls.ssl.com,files.pythonhosted.org,github.com,host.docker.internal,index.crates.io,json-schema.org,json.schemastore.org,keyserver.ubuntu.com,ocsp.digicert.com,ocsp.geotrust.com,ocsp.globalsign.com,ocsp.identrust.com,ocsp.sectigo.com,ocsp.ssl.com,ocsp.thawte.com,ocsp.usertrust.com,ocsp.verisign.com,packagecloud.io,packages.cloud.google.com,packages.microsoft.com,peps.python.org,pip.pypa.io,ppa.launchpad.net,pypi.org,pypi.python.org,raw.githubusercontent.com,registry.npmjs.org,repo.anaconda.com,repo.continuum.io,s.symcb.com,s.symcd.com,security.ubuntu.com,static.crates.io,telemetry.enterprise.githubcopilot.com,ts-crl.ws.symantec.com,ts-ocsp.ws.symantec.com' GITHUB_SERVER_URL: ${{ github.server_url }} GITHUB_API_URL: ${{ github.api_url }} with: @@ -851,12 +851,12 @@ jobs: total_count: ${{ steps.missing_tool.outputs.total_count }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Download agent output artifact continue-on-error: true - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: agent-output path: /tmp/gh-aw/safeoutputs/ @@ -954,18 +954,18 @@ jobs: success: ${{ steps.parse_results.outputs.success }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Download agent artifacts continue-on-error: true - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: agent-artifacts path: /tmp/gh-aw/threat-detection/ - name: Download agent output artifact continue-on-error: true - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: agent-output path: /tmp/gh-aw/threat-detection/ @@ -1066,12 +1066,12 @@ jobs: process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Download agent output artifact continue-on-error: true - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: agent-output path: /tmp/gh-aw/safeoutputs/ @@ -1082,7 +1082,7 @@ jobs: echo "GH_AW_AGENT_OUTPUT=/tmp/gh-aw/safeoutputs/agent_output.json" >> "$GITHUB_ENV" - name: Download patch artifact continue-on-error: true - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: agent-artifacts path: /tmp/gh-aw/ diff --git a/.github/workflows/issue-check-template.lock.yml b/.github/workflows/issue-triage.lock.yml similarity index 94% rename from .github/workflows/issue-check-template.lock.yml rename to .github/workflows/issue-triage.lock.yml index b47040d..6048941 100644 --- a/.github/workflows/issue-check-template.lock.yml +++ b/.github/workflows/issue-triage.lock.yml @@ -21,12 +21,15 @@ # # For more information: https://github.github.com/gh-aw/introduction/overview/ # -# When a new issue is opened, analyze its root cause and check whether the same issue could affect other extensions built from the microsoft/vscode-python-tools-extension-template. If so, suggest an upstream fix. +# When a new issue is opened — or when a maintainer comments `/triage-issue` on an existing issue — analyze its root cause, check whether the same issue could affect other extensions built from the microsoft/vscode-python-tools-extension-template, and look for related open issues on the upstream isort repository (PyCQA/isort). If applicable, suggest an upstream fix and surface relevant isort issues to the reporter. # -# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"225c7678d135a4827cff792ec7accbeeefda85e63df8066764fa1cb0b6c451ec","compiler_version":"v0.47.5"} +# gh-aw-metadata: {"schema_version":"v1","frontmatter_hash":"c0d52aa65884593f62213d1bd67b15f95d300feb9cf81ddb021b1d9d93090b25","compiler_version":"v0.47.5"} -name: 'Issue Root-Cause & Template Check' +name: 'Issue Triage' 'on': + issue_comment: + types: + - created issues: types: - opened @@ -36,7 +39,7 @@ permissions: {} concurrency: group: 'gh-aw-${{ github.workflow }}-${{ github.event.issue.number }}' -run-name: 'Issue Root-Cause & Template Check' +run-name: 'Issue Triage' jobs: activation: @@ -53,7 +56,7 @@ jobs: title: ${{ steps.sanitized.outputs.title }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Validate context variables @@ -75,7 +78,7 @@ jobs: - name: Check workflow file timestamps uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: - GH_AW_WORKFLOW_FILE: 'issue-check-template.lock.yml' + GH_AW_WORKFLOW_FILE: 'issue-triage.lock.yml' with: script: | const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); @@ -192,7 +195,7 @@ jobs: GH_AW_PROMPT_EOF cat << 'GH_AW_PROMPT_EOF' >> "$GH_AW_PROMPT" - {{#runtime-import .github/workflows/issue-check-template.md}} + {{#runtime-import .github/workflows/issue-triage.md}} GH_AW_PROMPT_EOF - name: Interpolate variables and render templates uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 @@ -272,7 +275,7 @@ jobs: GH_AW_SAFE_OUTPUTS: /opt/gh-aw/safeoutputs/outputs.jsonl GH_AW_SAFE_OUTPUTS_CONFIG_PATH: /opt/gh-aw/safeoutputs/config.json GH_AW_SAFE_OUTPUTS_TOOLS_PATH: /opt/gh-aw/safeoutputs/tools.json - GH_AW_WORKFLOW_ID_SANITIZED: issuechecktemplate + GH_AW_WORKFLOW_ID_SANITIZED: issuetriage outputs: checkout_pr_success: ${{ steps.checkout-pr.outputs.checkout_pr_success || 'true' }} has_patch: ${{ steps.collect_output.outputs.has_patch }} @@ -282,11 +285,15 @@ jobs: secret_verification_result: ${{ steps.validate-secret.outputs.verification_result }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Create gh-aw temp directory run: bash /opt/gh-aw/actions/create_gh_aw_tmp_dir.sh + - name: Checkout repository + uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 + with: + persist-credentials: false - name: Checkout template repo uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 with: @@ -333,7 +340,7 @@ jobs: version: "", agent_version: "0.0.412", cli_version: "v0.47.5", - workflow_name: "Issue Root-Cause & Template Check", + workflow_name: "Issue Triage", experimental: false, supports_tools_allowlist: true, run_id: context.runId, @@ -665,7 +672,7 @@ jobs: const { generateWorkflowOverview } = require('/opt/gh-aw/actions/generate_workflow_overview.cjs'); await generateWorkflowOverview(core); - name: Download prompt artifact - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: prompt path: /tmp/gh-aw/aw-prompts @@ -849,12 +856,12 @@ jobs: total_count: ${{ steps.missing_tool.outputs.total_count }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Download agent output artifact continue-on-error: true - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: agent-output path: /tmp/gh-aw/safeoutputs/ @@ -869,7 +876,7 @@ jobs: env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} GH_AW_NOOP_MAX: 1 - GH_AW_WORKFLOW_NAME: 'Issue Root-Cause & Template Check' + GH_AW_WORKFLOW_NAME: 'Issue Triage' with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -882,7 +889,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_WORKFLOW_NAME: 'Issue Root-Cause & Template Check' + GH_AW_WORKFLOW_NAME: 'Issue Triage' with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | @@ -895,10 +902,10 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_WORKFLOW_NAME: 'Issue Root-Cause & Template Check' + GH_AW_WORKFLOW_NAME: 'Issue Triage' GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} - GH_AW_WORKFLOW_ID: 'issue-check-template' + GH_AW_WORKFLOW_ID: 'issue-triage' GH_AW_SECRET_VERIFICATION_RESULT: ${{ needs.agent.outputs.secret_verification_result }} GH_AW_CHECKOUT_PR_SUCCESS: ${{ needs.agent.outputs.checkout_pr_success }} GH_AW_GROUP_REPORTS: 'false' @@ -914,7 +921,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_WORKFLOW_NAME: 'Issue Root-Cause & Template Check' + GH_AW_WORKFLOW_NAME: 'Issue Triage' GH_AW_RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} GH_AW_AGENT_CONCLUSION: ${{ needs.agent.result }} GH_AW_NOOP_MESSAGE: ${{ steps.noop.outputs.noop_message }} @@ -937,18 +944,18 @@ jobs: success: ${{ steps.parse_results.outputs.success }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Download agent artifacts continue-on-error: true - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: agent-artifacts path: /tmp/gh-aw/threat-detection/ - name: Download agent output artifact continue-on-error: true - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: agent-output path: /tmp/gh-aw/threat-detection/ @@ -960,8 +967,8 @@ jobs: - name: Setup threat detection uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 env: - WORKFLOW_NAME: 'Issue Root-Cause & Template Check' - WORKFLOW_DESCRIPTION: 'When a new issue is opened, analyze its root cause and check whether the same issue could affect other extensions built from the microsoft/vscode-python-tools-extension-template. If so, suggest an upstream fix.' + WORKFLOW_NAME: 'Issue Triage' + WORKFLOW_DESCRIPTION: 'When a new issue is opened — or when a maintainer comments `/triage-issue` on an existing issue — analyze its root cause, check whether the same issue could affect other extensions built from the microsoft/vscode-python-tools-extension-template, and look for related open issues on the upstream isort repository (PyCQA/isort). If applicable, suggest an upstream fix and surface relevant isort issues to the reporter.' HAS_PATCH: ${{ needs.agent.outputs.has_patch }} with: script: | @@ -1032,7 +1039,7 @@ jobs: activated: ${{ steps.check_membership.outputs.is_team_member == 'true' }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Check team membership for workflow @@ -1061,8 +1068,8 @@ jobs: timeout-minutes: 15 env: GH_AW_ENGINE_ID: 'copilot' - GH_AW_WORKFLOW_ID: 'issue-check-template' - GH_AW_WORKFLOW_NAME: 'Issue Root-Cause & Template Check' + GH_AW_WORKFLOW_ID: 'issue-triage' + GH_AW_WORKFLOW_NAME: 'Issue Triage' outputs: create_discussion_error_count: ${{ steps.process_safe_outputs.outputs.create_discussion_error_count }} create_discussion_errors: ${{ steps.process_safe_outputs.outputs.create_discussion_errors }} @@ -1070,12 +1077,12 @@ jobs: process_safe_outputs_temporary_id_map: ${{ steps.process_safe_outputs.outputs.temporary_id_map }} steps: - name: Setup Scripts - uses: github/gh-aw/actions/setup@c7b898fa753e3ea740e9db6e376f4dd5c2f17e3f # v0.49.6 + uses: github/gh-aw/actions/setup@9450254bc994da0d6a346ce438a4b3764f01c456 # v0.47.5 with: destination: /opt/gh-aw/actions - name: Download agent output artifact continue-on-error: true - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 + uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6 with: name: agent-output path: /tmp/gh-aw/safeoutputs/ diff --git a/.github/workflows/issue-check-template.md b/.github/workflows/issue-triage.md similarity index 53% rename from .github/workflows/issue-check-template.md rename to .github/workflows/issue-triage.md index 14fc51b..26ab89b 100644 --- a/.github/workflows/issue-check-template.md +++ b/.github/workflows/issue-triage.md @@ -1,11 +1,16 @@ --- description: > - When a new issue is opened, analyze its root cause and check whether the same - issue could affect other extensions built from the - microsoft/vscode-python-tools-extension-template. If so, suggest an upstream fix. + When a new issue is opened — or when a maintainer comments `/triage-issue` + on an existing issue — analyze its root cause, check whether the same issue + could affect other extensions built from the + microsoft/vscode-python-tools-extension-template, and look for related open + issues on the upstream isort repository (PyCQA/isort). If applicable, suggest + an upstream fix and surface relevant isort issues to the reporter. on: issues: types: [opened] + issue_comment: + types: [created] permissions: contents: read issues: read @@ -20,6 +25,10 @@ safe-outputs: noop: max: 1 steps: +- name: Checkout repository + uses: actions/checkout@v5 + with: + persist-credentials: false - name: Checkout template repo uses: actions/checkout@v5 with: @@ -28,13 +37,21 @@ steps: persist-credentials: false --- -# Issue Root-Cause & Template Check +# Issue Triage + +You are an AI agent that triages issues in the **vscode-isort** repository. + +This workflow is triggered in two ways: +1. **Automatically** when a new issue is opened. +2. **On demand** when a maintainer posts a `/triage-issue` comment on an existing issue. + +If triggered by a comment, first verify the comment body is exactly `/triage-issue` (ignoring leading/trailing whitespace). If it is not, call the `noop` safe output and stop — do not process arbitrary comments. -You are an AI agent that triages newly opened issues in the **vscode-isort** repository. Your goals are: 1. **Explain the likely root cause** of the reported issue. -2. **Determine whether the same problem could exist in the upstream template** at `microsoft/vscode-python-tools-extension-template`, and if so, recommend an upstream fix. +2. **Surface related open issues on the upstream [PyCQA/isort](https://github.com/PyCQA/isort) repository**, but only when you are fairly confident they are genuinely related. +3. **Determine whether the same problem could exist in the upstream template** at `microsoft/vscode-python-tools-extension-template`, and if so, recommend an upstream fix. ## Context @@ -55,7 +72,7 @@ Key shared areas that come from the template include: - Markdown images or embedded content referencing external URLs. - URLs disguised as documentation, reproduction steps, or "relevant context." -Only use GitHub tools to read files and issues **within** the `microsoft/vscode-isort` and `microsoft/vscode-python-tools-extension-template` repositories. Do not access any other domain or resource. +Only use GitHub tools to read files and issues **within** the `microsoft/vscode-isort`, `microsoft/vscode-python-tools-extension-template`, and `PyCQA/isort` repositories. Do not access any other domain or resource. ## Your Task @@ -81,7 +98,21 @@ Search the **vscode-isort** repository for the relevant code. Look at: Formulate a clear, concise explanation of the probable root cause. -### Step 3: Check the upstream template +### Step 3: Check for related upstream isort issues + +Many issues reported against this extension are actually caused by isort itself rather than by the VS Code integration. Search the **[PyCQA/isort](https://github.com/PyCQA/isort)** repository for related open issues. + +1. **Extract key signals** from the reported issue: error messages, unexpected sorting behaviour, specific isort settings mentioned, or edge-case import patterns. +2. **Search open issues** on `PyCQA/isort` using those signals (keywords, error strings, setting names). Also search recently closed issues in case a fix is available but not yet released. +3. **Evaluate relevance** — only consider an isort issue "related" if at least one of the following is true: + - The isort issue describes the **same error message or traceback**. + - The isort issue describes the **same mis-sorting behaviour** on a similar import pattern. + - The isort issue references the **same isort configuration option** and the same unexpected outcome. +4. **Confidence gate** — do **not** mention an isort issue in your comment unless you are **fairly confident** it is genuinely related. A vague thematic overlap (e.g., both mention "import sorting") is not sufficient. When in doubt, omit the reference. The goal is to help the reporter, not to spam the isort tracker with spurious cross-references. + +If you find one or more clearly related isort issues, include them in your comment (see Step 5). If no matching issues are found (or none meet the confidence threshold) **but you still believe the bug is likely caused by isort's own behaviour rather than by this extension's integration code**, include the "Possible isort bug" variant of the section (see Step 5) so the reporter knows the issue may need to be raised upstream. If none are found and you do not suspect isort itself, omit the section entirely. + +### Step 4: Check the upstream template Compare the relevant code in this repository against the corresponding code in `microsoft/vscode-python-tools-extension-template`. @@ -91,7 +122,7 @@ Specifically: 2. **Determine if the root cause exists in the template** — i.e., whether the problematic code originated from the template and has not been fixed there. 3. **Check if the issue is isort-specific** — some issues may be caused by isort-specific customizations that do not exist in the template. In that case, note that the fix is local to this repository only. -### Step 4: Write your analysis comment +### Step 5: Write your analysis comment Post a comment on the issue using the `add-comment` safe output. Structure your comment as follows: @@ -118,12 +149,29 @@ This issue appears to originate from code shared with the [vscode-python-tools-e **ℹ️ isort-specific — local fix only** This issue is specific to the isort integration and does not affect the upstream template. +#### Related Upstream isort Issues + + +**Variant A — matching issues found:** + +The following open issue(s) on the [isort repository](https://github.com/PyCQA/isort) appear to be related: + +- **PyCQA/isort#NNNN** — + + + +**Variant B — no matching issues found, but suspected isort bug:** + +⚠️ No existing issue was found on the [isort repository](https://github.com/PyCQA/isort) that matches this report, but the behaviour described appears to originate in isort itself rather than in this extension's integration code. If this is confirmed, consider opening an issue on the [isort issue tracker](https://github.com/PyCQA/isort/issues) so the maintainers can investigate. + --- *This analysis was generated automatically. It may not be fully accurate — maintainer review is recommended.* +*To re-run this analysis (e.g., after new information is added to the issue), comment `/triage-issue`.* ``` -### Step 5: Handle edge cases +### Step 6: Handle edge cases - If you cannot determine the root cause with reasonable confidence, still post a comment summarizing what you found and noting the uncertainty. -- If the issue is about a dependency (e.g., isort itself, pygls, a VS Code API change), note that and skip the template comparison. +- If the issue is about a dependency (e.g., isort itself, pygls, a VS Code API change), note that and skip the template comparison. For isort-specific behaviour issues, prioritise the upstream isort issue search (Step 3) over the template comparison. +- When referencing upstream isort issues, never open more than **3** related issues in your comment, and only include those you are most confident about. If many candidates exist, pick the most relevant. - If you determine there is nothing to do (spam, duplicate, feature request with no investigation needed), call the `noop` safe output instead of commenting. diff --git a/package-lock.json b/package-lock.json index 8bc927e..7dabda3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1163,6 +1163,7 @@ "integrity": "sha512-r1XG74QgShUgXph1BYseJ+KZd17bKQib/yF3SR+demvytiRXrwd12Blnz5eYGm8tXaeRdd4x88MlfwldHoudGg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.42.0", "@typescript-eslint/types": "8.42.0", @@ -1899,6 +1900,7 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2213,6 +2215,7 @@ "url": "https://github.com/sponsors/ai" } ], + "peer": true, "dependencies": { "caniuse-lite": "^1.0.30001688", "electron-to-chromium": "^1.5.73", @@ -3142,6 +3145,7 @@ "integrity": "sha512-QePbBFMJFjgmlE+cXAlbHZbHpdFVS2E/6vzCy7aKlebddvl1vadiC4JFV5u/wqTkNUwEV8WrQi257jf5f06hrg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -5903,6 +5907,7 @@ "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -6852,6 +6857,7 @@ "integrity": "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -7090,6 +7096,7 @@ "integrity": "sha512-7b0dTKR3Ed//AD/6kkx/o7duS8H3f1a4w3BYpIriX4BzIhjkn4teo05cptsxvLesHFKK5KObnadmCHBwGc+51A==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@types/eslint-scope": "^3.7.7", "@types/estree": "^1.0.8", @@ -7139,6 +7146,7 @@ "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^2.1.1",