Skip to content

Add telemetry for "open on github" - #8941

Merged
Alex Ross (alexr00) merged 1 commit into
mainfrom
alexr00/explicit-octopus
Sep 9, 2026
Merged

Add telemetry for "open on github"#8941
Alex Ross (alexr00) merged 1 commit into
mainfrom
alexr00/explicit-octopus

Conversation

@alexr00

Copy link
Copy Markdown
Member

No description provided.

Copilot AI lite review requested due to automatic review settings September 9, 2026 09:31
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) September 9, 2026 09:31
@alexr00 Alex Ross (alexr00) self-assigned this Sep 9, 2026
@alexr00
Alex Ross (alexr00) merged commit 1315a89 into main Sep 9, 2026
7 checks passed
@alexr00
Alex Ross (alexr00) deleted the alexr00/explicit-octopus branch September 9, 2026 09:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

A new test uses a non-standard assert default import that likely breaks compilation/linting given existing repository test import conventions.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Lite
Findings: 1 Medium severity

New issues introduced by this change (1)
Severity Finding
Medium severity src/​test/​github/​openOnGitHub.test.ts — This test file uses a default import form for Node's assert module, but the rest of the repo’s…
What changed in this PR

This PR centralizes “Open on GitHub” behavior and adds telemetry emission for both pull requests and issues when opening their GitHub URLs.

Changes:

  • Introduces a shared openIssueOrPullRequestOnGitHub helper that opens via the default external opener and emits the appropriate GDPR-annotated telemetry event.
  • Replaces several direct “open on GitHub” call sites to use the shared helper / generalized openItemOnGitHub.
  • Adds test coverage validating telemetry and external-opening behavior for issues, PRs, and several item wrappers.
File Description
src/​test/​mocks/​mockTelemetry.ts Updates mock telemetry signatures to match ITelemetry so new tests can spy on calls.
src/​test/​github/​openOnGitHub.test.ts Adds tests for telemetry + external-open behavior for issue/PR open flows and item classification.
src/​issues/​issueFeatureRegistrar.ts Routes “open issue on GitHub” flow through the shared open+telemetry helper.
src/​github/​pullRequestOverview.ts Switches PR overview “open on GitHub” commands to openItemOnGitHub.
src/​github/​pullRequestModel.ts Uses the shared helper when offering “Open on GitHub” for invalid PR head scenarios.
src/​github/​openOnGitHub.ts New shared helper implementing telemetry + external open for issue/PR kinds.
src/​github/​issueOverview.ts Switches issue/PR overview webview action to openItemOnGitHub.
src/​github/​activityBarViewProvider.ts Switches activity bar actions to openItemOnGitHub.
src/​commands.ts Replaces PR-only open helper with generalized openItemOnGitHub and routes command handling through the new helper.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/

import { default as assert } from 'assert';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants