Skip to content

AL-Go Telemetry Enhancements: repository fork and hosting information - #2392

Open
Alexander Holstrup (aholstrup1) wants to merge 3 commits into
mainfrom
aholstrup1-al-go-telemetry
Open

Alexander Holstrup (aholstrup1) wants to merge 3 commits into
mainfrom
aholstrup1-al-go-telemetry

Conversation

@aholstrup1

Copy link
Copy Markdown
Collaborator

❔What, Why & How

Add repository and hosting context to AL-Go telemetry so consumers can distinguish workflows running in forks and across GitHub hosting environments.

Separate Get-RepositoryIsFork and Get-GitHubHostingType getters populate common dimensions for both Microsoft and partner telemetry, respecting existing telemetry settings:

  • RepositoryIsFork: true or false from the workflow event's repository.fork, not the pull request source repository.
  • GitHubHostingType: GitHub.com, GHEC for *.ghe.com, or GHES for other valid HTTP(S) hosts.

Missing or invalid metadata produces a warning and Unknown without blocking existing telemetry. Server hostnames and URLs are not added to telemetry.

Classification limitation: The GHES fallback is a hostname-based heuristic, not positive identification through the GitHub API. GitHub.com also includes Enterprise Cloud customers hosted there; this does not identify subscription plans.

Added scenario documentation, release notes, and 27 unit tests passing on both PowerShell 7 and Windows PowerShell 5.

Related to issue: N/A

✅ Checklist

  • Add tests (E2E, unit tests)
  • Update RELEASENOTES.md
  • Update documentation (e.g. for new settings or scenarios)
  • Add telemetry

Add separate getters for repository fork status and GitHub hosting classification, with common telemetry dimensions, documentation, and unit coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 6, 2026 09:54
Comment thread Tests/TelemetryHelper.Test.ps1 Fixed
Comment thread Tests/TelemetryHelper.Test.ps1 Fixed
Comment thread Tests/TelemetryHelper.Test.ps1 Fixed

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

🟢 Approval recommended

The implementation is resilient, documented, privacy-conscious, and comprehensively tested across supported PowerShell environments.

Review effort: Balanced
Findings: None

What changed in this PR

Adds repository fork status and GitHub hosting classification to common AL-Go telemetry.

Changes:

  • Adds resilient telemetry getters with Unknown fallbacks.
  • Adds 27 cross-platform Pester test cases.
  • Documents the new dimensions and release impact.
File Description
Actions/​TelemetryHelper.psm1 Collects and attaches the new dimensions.
Tests/​TelemetryHelper.Test.ps1 Tests classification, invalid metadata, and integration.
Scenarios/​EnablingTelemetry.md Documents behavior and privacy limitations.
RELEASENOTES.md Announces the telemetry enhancement.

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

Emit action names and wrapper-owned conclusions, cover handled errors and skipped telemetry, and document the dimensions. Suppress Pester scope false positives using the repository's existing analyzer pattern.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

4 participants