Repository navigation
publish: send X-Market-CI-Provider header with Marketplace requests - #1345
Merged
Benjamin Christopher Simmonds (benibenj) merged 1 commit intoOct 21, 2026
Conversation
Detect the CI system vsce runs in from well-known environment variables and report it to the Marketplace via the X-Market-CI-Provider header, so publish statistics can distinguish GitHub Actions, Azure Pipelines, GitLab CI, manual publishes, etc. Co-authored-by: Copilot <[email protected]>
Benjamin Christopher Simmonds (benibenj)
marked this pull request as ready for review
October 21, 2026 10:27
Benjamin Christopher Simmonds (benibenj)
enabled auto-merge
October 21, 2026 10:27
Giuseppe Cianci (Giuspepe)
approved these changes
Oct 21, 2026
Benjamin Christopher Simmonds (benibenj)
merged commit Oct 21, 2026
402a12c
into
main
5 checks passed
Benjamin Christopher Simmonds (benibenj)
deleted the
benibenj/agents/ci-provider-header-logging-enhancement
branch
October 21, 2026 11:17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The VS Marketplace team wants to know which CI system extensions are published from (GitHub Actions, GitLab CI, Azure Pipelines, manual, ...). Today the server only sees which tool was used (
vscevsVsixPublisher.exe), not where it ran.What changed
src/ciProvider.tsisolates CI detection:CIProvider: well-known, stable set of values so the Marketplace gets a consistent signal:github-actions,azure-pipelines,gitlab-ci,bitbucket-pipelines,jenkins,circleci,travis-ci,appveyor,teamcity,bamboo,jetbrains-space,buildkite,aws-codebuild,other(genericCIset but unknown provider),none(no CI detected, e.g. manual publish).detectCIProvider(): ordered, env-var-based detection (first match wins), based on each provider's documented variables. Inspired by Nerdbank.GitVersioning's CloudBuildServices.CIProviderRequestHandler: anazure-devops-node-apiIRequestHandlerthat addsX-Market-CI-Provider: <value>to every request.getGalleryAPIregisters the handler, so publish, unpublish andverify-patrequests all carry the header.isGitHubActions()check instead of readingGITHUB_ACTIONSdirectly.Notes for reviewers
none. That lets the Marketplace tell manual publishes apart from older vsce versions, which don't send the header at all.GITHUB_ACTIONS=true; before, any non-empty value turned it on. GitHub always sets it totrue.GalleryApirequest to a local HTTP server and asserts the header arrives.