From aa7d7a065ce6cdc592f4a026c51d714f886911b2 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Tue, 27 Jan 2026 12:37:58 +0100 Subject: [PATCH 1/6] chore: Add System Info and Package Manager fields to bug template Inspired by https://github.com/remix-run/react-router/blob/8cb826426cf89ef6d89f84339ea4b90e60d2a34d/.github/ISSUE_TEMPLATE/bug_report.yml?plain=1#L45-L63 --- .github/ISSUE_TEMPLATE/bug.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index c09984de5c3b..059b621f3041 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -81,6 +81,25 @@ body: If you're using one of our framework-specific SDKs (`@sentry/react`, for example), what version of the _framework_ are you using? placeholder: ex. React 18.3.0 or Next 14.0.0 + - type: textarea + id: system-info + attributes: + label: System Info + description: Run `npx envinfo --binaries --npmPackages "@sentry/*"` and paste the output here. + render: shell + validations: + required: true + - type: dropdown + id: package-manager + attributes: + label: Package Manager + options: + - npm + - yarn + - pnpm + - bun + validations: + required: true - type: input id: link-to-sentry attributes: From 52aceac60c5fce8382538319aa0257958b6e1cb5 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Tue, 27 Jan 2026 16:00:21 +0100 Subject: [PATCH 2/6] Add deno --- .github/ISSUE_TEMPLATE/bug.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index 059b621f3041..e69e52e72519 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -98,6 +98,7 @@ body: - yarn - pnpm - bun + - deno validations: required: true - type: input From fccddf9c9a48a8ade217b572acd6d85e54240b6b Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Tue, 27 Jan 2026 17:40:55 +0100 Subject: [PATCH 3/6] Remove redundant questions form the template --- .github/ISSUE_TEMPLATE/bug.yml | 50 ++-------------------------------- 1 file changed, 2 insertions(+), 48 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index e69e52e72519..fb264aeb9c4a 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -25,62 +25,16 @@ body: - type: dropdown id: package attributes: - label: Which SDK are you using? + label: Where are you installing the Sentry SDK from? description: If you're using the CDN bundles, please specify the exact bundle (e.g. `bundle.tracing.min.js`) in your SDK setup. options: - - '@sentry/browser' - - '@sentry/node' - - '@sentry/node - express' - - '@sentry/node - fastify' - - '@sentry/node - koa' - - '@sentry/node - hapi' - - '@sentry/node - connect' - - '@sentry/node-native' - - '@sentry/angular' - - '@sentry/astro' - - '@sentry/aws-serverless' - - '@sentry/bun' - - '@sentry/cloudflare' - - '@sentry/cloudflare - hono' - - '@sentry/deno' - - '@sentry/ember' - - '@sentry/gatsby' - - '@sentry/google-cloud-serverless' - - '@sentry/nestjs' - - '@sentry/nextjs' - - '@sentry/nuxt' - - '@sentry/react' - - '@sentry/react-router' - - '@sentry/remix' - - '@sentry/solid' - - '@sentry/solidstart' - - '@sentry/svelte' - - '@sentry/sveltekit' - - '@sentry/tanstackstart-react' - - '@sentry/vue' - - '@sentry/wasm' + - Sentry NPM package - Sentry Browser Loader - Sentry Browser CDN bundle validations: required: true - - type: input - id: sdk-version - attributes: - label: SDK Version - description: What version of the SDK are you using? - placeholder: ex. 8.10.0 - validations: - required: true - - type: input - id: framework-version - attributes: - label: Framework Version - description: - If you're using one of our framework-specific SDKs (`@sentry/react`, for example), what version of the - _framework_ are you using? - placeholder: ex. React 18.3.0 or Next 14.0.0 - type: textarea id: system-info attributes: From f190f142cf2eb2cd949575f8167659099118b333 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Wed, 28 Jan 2026 14:41:24 +0100 Subject: [PATCH 4/6] Update template to make sys info optional, update issue label ci to check envinfo output --- .github/ISSUE_TEMPLATE/bug.yml | 9 +- .github/workflows/issue-package-label.yml | 204 +++++++++------------- 2 files changed, 85 insertions(+), 128 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug.yml b/.github/ISSUE_TEMPLATE/bug.yml index fb264aeb9c4a..c6aa8e7b0b4e 100644 --- a/.github/ISSUE_TEMPLATE/bug.yml +++ b/.github/ISSUE_TEMPLATE/bug.yml @@ -39,14 +39,17 @@ body: id: system-info attributes: label: System Info - description: Run `npx envinfo --binaries --npmPackages "@sentry/*"` and paste the output here. + description: + If you are using an NPM package, run `npx envinfo --binaries --npmPackages "@sentry/*"` and paste the output + here. render: shell validations: - required: true + required: false - type: dropdown id: package-manager attributes: label: Package Manager + description: If you are using an NPM package, which package manager are you using? options: - npm - yarn @@ -54,7 +57,7 @@ body: - bun - deno validations: - required: true + required: false - type: input id: link-to-sentry attributes: diff --git a/.github/workflows/issue-package-label.yml b/.github/workflows/issue-package-label.yml index ef0f0344b8fc..77b8d28ec8a9 100644 --- a/.github/workflows/issue-package-label.yml +++ b/.github/workflows/issue-package-label.yml @@ -10,153 +10,107 @@ jobs: runs-on: ubuntu-latest if: ${{ !github.event.issue.pull_request }} steps: - - name: Get used package from issue body + - name: Get SDK source from issue body # https://github.com/actions-ecosystem/action-regex-match uses: actions-ecosystem/action-regex-match@v2 - id: packageName + id: sdkSource with: - # Parse used package from issue body + # Parse SDK source from issue body text: ${{ github.event.issue.body }} - regex: '### Which SDK are you using\?\n\n(.*)\n\n' + regex: '### Where are you installing the Sentry SDK from\?\n\n(.*)\n\n' - - name: Map package to issue label + - name: Map SDK source to issue label # https://github.com/kanga333/variable-mapper uses: kanga333/variable-mapper@v0.3.0 - id: packageLabel - if: steps.packageName.outputs.match != '' + id: sourceLabel + if: steps.sdkSource.outputs.match != '' with: - key: '${{ steps.packageName.outputs.group1 }}' + key: '${{ steps.sdkSource.outputs.group1 }}' # Note: Since this is handled as a regex, and JSON parse wrangles slashes /, we just use `.` instead map: | { - "@sentry.angular": { - "label": "Angular" - }, - "@sentry.astro": { - "label": "Astro" - }, - "@sentry.aws-serverless": { - "label": "AWS Lambda" - }, - "@sentry.browser": { - "label": "Browser" - }, - "@sentry.bun": { - "label": "Bun" - }, - "@sentry.cloudflare.-.hono": { - "label": "Hono" - }, - "@sentry.cloudflare": { - "label": "Cloudflare Workers" - }, - "@sentry.deno": { - "label": "Deno" - }, - "@sentry.ember": { - "label": "Ember" - }, - "@sentry.gatsby": { - "label": "Gatbsy" - }, - "@sentry.google-cloud-serverless": { - "label": "Google Cloud Functions" - }, - "@sentry.nestjs": { - "label": "Nest.js" - }, - "@sentry.nextjs": { - "label": "Next.js" - }, - "@sentry.node.-.express": { - "label": "Express" - }, - "@sentry.node.-.fastify": { - "label": "Fastify" - }, - "@sentry.node.-.koa": { - "label": "Koa" - }, - "@sentry.node.-.hapi": { - "label": "Hapi" - }, - "@sentry.node.-.connect": { - "label": "Connect" - }, - "@sentry.node": { - "label": "Node.js" - }, - "@sentry.nuxt": { - "label": "Nuxt" - }, - "@sentry.react-router": { - "label": "React Router Framework" - }, - "@sentry.react": { - "label": "React" - }, - "@sentry.remix": { - "label": "Remix" - }, - "@sentry.solid": { - "label": "Solid" - }, - "@sentry.solidstart": { - "label": "SolidStart" - }, - "@sentry.sveltekit": { - "label": "SvelteKit" - }, - "@sentry.svelte": { - "label": "Svelte" - }, - "@sentry.vue": { - "label": "Vue" - }, - "@sentry.tanstackstart-react": { - "label": "Tanstack Start React" - }, - "@sentry.wasm": { - "label": "WASM" - }, "Sentry.Browser.Loader": { - "label": "Browser" + "label": "Loader Script" }, "Sentry.Browser.CDN.bundle": { - "label": "Browser" + "label": "CDN Bundle" } } export_to: output - - name: Add package label if applicable - # Note: We only add the label if the issue is still open - if: steps.packageLabel.outputs.label != '' + - name: Add SDK source label if applicable + if: steps.sourceLabel.outputs.label != '' uses: actions-ecosystem/action-add-labels@v1 with: - labels: ${{ steps.packageLabel.outputs.label }} + labels: ${{ steps.sourceLabel.outputs.label }} - - name: Map additional to issue label - # https://github.com/kanga333/variable-mapper - uses: kanga333/variable-mapper@v0.3.0 - id: additionalLabel - if: steps.packageName.outputs.match != '' + # Scan System Info section for @sentry/* packages (from envinfo output) + - name: Detect @sentry packages and add labels + uses: actions/github-script@v7 with: - key: '${{ steps.packageName.outputs.group1 }}' - # Note: Since this is handled as a regex, and JSON parse wrangles slashes /, we just use `.` instead - map: | - { - "Sentry.Browser.Loader": { - "label": "Loader Script" - }, - "Sentry.Browser.CDN.bundle": { - "label": "CDN Bundle" + script: | + const body = context.payload.issue.body || ''; + + // Extract only the System Info section to avoid matching free-form text + const systemInfoMatch = body.match(/### System Info\s*\n([\s\S]*?)(?=\n### |\n*$)/); + if (!systemInfoMatch) { + console.log('No System Info section found'); + return; + } + + const systemInfoSection = systemInfoMatch[1]; + console.log('Scanning System Info section for @sentry/* packages'); + + // Map of package patterns to labels + const packageToLabel = { + '@sentry/angular': 'Angular', + '@sentry/astro': 'Astro', + '@sentry/aws-serverless': 'AWS Lambda', + '@sentry/browser': 'Browser', + '@sentry/bun': 'Bun', + '@sentry/cloudflare': 'Cloudflare Workers', + '@sentry/deno': 'Deno', + '@sentry/ember': 'Ember', + '@sentry/gatsby': 'Gatsby', + '@sentry/google-cloud-serverless': 'Google Cloud Functions', + '@sentry/nestjs': 'Nest.js', + '@sentry/nextjs': 'Next.js', + '@sentry/node': 'Node.js', + '@sentry/nuxt': 'Nuxt', + '@sentry/react-router': 'React Router Framework', + '@sentry/react': 'React', + '@sentry/remix': 'Remix', + '@sentry/solid': 'Solid', + '@sentry/solidstart': 'SolidStart', + '@sentry/svelte': 'Svelte', + '@sentry/sveltekit': 'SvelteKit', + '@sentry/tanstackstart-react': 'Tanstack Start React', + '@sentry/vue': 'Vue', + '@sentry/wasm': 'WASM', + }; + + const labelsToAdd = new Set(); + + // Check for each package in the System Info section + for (const [pkg, label] of Object.entries(packageToLabel)) { + // Escape special regex characters in package name + const escapedPkg = pkg.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); + // Match package name followed by colon (envinfo format) or version pattern + const regex = new RegExp(escapedPkg + '[:\\s]', 'i'); + if (regex.test(systemInfoSection)) { + labelsToAdd.add(label); } } - export_to: output - - name: Add additional label if applicable - # Note: We only add the label if the issue is still open - if: steps.additionalLabel.outputs.label != '' - uses: actions-ecosystem/action-add-labels@v1 - with: - labels: ${{ steps.additionalLabel.outputs.label }} + if (labelsToAdd.size > 0) { + const labels = Array.from(labelsToAdd); + console.log('Adding labels:', labels); + await github.rest.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + labels: labels + }); + } else { + console.log('No @sentry/* packages detected in System Info section'); + } From d8f0e586cd1d7420fb3a7c224bd887acf33e1d05 Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Wed, 28 Jan 2026 14:50:07 +0100 Subject: [PATCH 5/6] Simplify labels --- .github/workflows/issue-package-label.yml | 25 +++++++++++------------ 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/issue-package-label.yml b/.github/workflows/issue-package-label.yml index 77b8d28ec8a9..76889e80ade4 100644 --- a/.github/workflows/issue-package-label.yml +++ b/.github/workflows/issue-package-label.yml @@ -45,7 +45,8 @@ jobs: labels: ${{ steps.sourceLabel.outputs.label }} # Scan System Info section for @sentry/* packages (from envinfo output) - - name: Detect @sentry packages and add labels + - name: Detect @sentry packages in System Info + id: packageLabels uses: actions/github-script@v7 with: script: | @@ -55,6 +56,7 @@ jobs: const systemInfoMatch = body.match(/### System Info\s*\n([\s\S]*?)(?=\n### |\n*$)/); if (!systemInfoMatch) { console.log('No System Info section found'); + core.setOutput('labels', ''); return; } @@ -102,15 +104,12 @@ jobs: } } - if (labelsToAdd.size > 0) { - const labels = Array.from(labelsToAdd); - console.log('Adding labels:', labels); - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - labels: labels - }); - } else { - console.log('No @sentry/* packages detected in System Info section'); - } + const labels = Array.from(labelsToAdd).join('\n'); + console.log('Detected labels:', labels); + core.setOutput('labels', labels); + + - name: Add package labels if applicable + if: steps.packageLabels.outputs.labels != '' + uses: actions-ecosystem/action-add-labels@v1 + with: + labels: ${{ steps.packageLabels.outputs.labels }} From 7042e8552315d5d3b6e43c2c1af698763186441e Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Wed, 28 Jan 2026 15:04:05 +0100 Subject: [PATCH 6/6] Add browser label --- .github/workflows/issue-package-label.yml | 35 +++++++++++++++++++---- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/.github/workflows/issue-package-label.yml b/.github/workflows/issue-package-label.yml index 76889e80ade4..f76bfea0918e 100644 --- a/.github/workflows/issue-package-label.yml +++ b/.github/workflows/issue-package-label.yml @@ -19,10 +19,35 @@ jobs: text: ${{ github.event.issue.body }} regex: '### Where are you installing the Sentry SDK from\?\n\n(.*)\n\n' - - name: Map SDK source to issue label + - name: Map SDK source to Browser label # https://github.com/kanga333/variable-mapper uses: kanga333/variable-mapper@v0.3.0 - id: sourceLabel + id: browserLabel + if: steps.sdkSource.outputs.match != '' + with: + key: '${{ steps.sdkSource.outputs.group1 }}' + # Note: Since this is handled as a regex, and JSON parse wrangles slashes /, we just use `.` instead + map: | + { + "Sentry.Browser.Loader": { + "label": "Browser" + }, + "Sentry.Browser.CDN.bundle": { + "label": "Browser" + } + } + export_to: output + + - name: Add Browser label if applicable + if: steps.browserLabel.outputs.label != '' + uses: actions-ecosystem/action-add-labels@v1 + with: + labels: ${{ steps.browserLabel.outputs.label }} + + - name: Map SDK source to delivery method label + # https://github.com/kanga333/variable-mapper + uses: kanga333/variable-mapper@v0.3.0 + id: deliveryLabel if: steps.sdkSource.outputs.match != '' with: key: '${{ steps.sdkSource.outputs.group1 }}' @@ -38,11 +63,11 @@ jobs: } export_to: output - - name: Add SDK source label if applicable - if: steps.sourceLabel.outputs.label != '' + - name: Add delivery method label if applicable + if: steps.deliveryLabel.outputs.label != '' uses: actions-ecosystem/action-add-labels@v1 with: - labels: ${{ steps.sourceLabel.outputs.label }} + labels: ${{ steps.deliveryLabel.outputs.label }} # Scan System Info section for @sentry/* packages (from envinfo output) - name: Detect @sentry packages in System Info