Repository navigation
fix(sdk): skip PR context for GitHub Enterprise instead of reporting it as github.com (#236) - #239
Merged
Merged
Conversation
…it as github.com (#236) GitHubPullRequestDetector now requires GITHUB_SERVER_URL to point at github.com. GitHub Enterprise Server and GHE.com runs get no PR context, since the context names no host and Xping Cloud would file their repositories under github.com. They are still flagged by CI.IsPullRequest. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…b.com repos on Azure Pipelines (#236) - A missing GITHUB_SERVER_URL is logged as a warning, since it means a container got only some GITHUB_* variables. A malformed value gets its own debug message instead of blaming Enterprise. - Azure Pipelines PR builds with provider GitHub require BUILD_REPOSITORY_URI on github.com. - Fix the ci-cd-setup paragraph that rendered as a heading, and list GITHUB_SERVER_URL in the container guidance. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Closes #236. Follow-up: #240 (
CI.Repositoryhas no host).Summary
GitHubPullRequestDetectorrequiresGITHUB_SERVER_URLto have hostgithub.com(parsed withUri, case-insensitive, so a trailing/is fine and lookalikes likegithub.com.example.orgare rejected). GitHub Enterprise Server and GHE.com (*.ghe.com) runs get no PR context but stay flagged byCI.IsPullRequest.PullRequestEventNamesis unchanged.GITHUB_SERVER_URLis logged as a warning (a container given only someGITHUB_*variables), matching the missing-payload case. A malformed value gets its own debug message.GitHubnow also requiresBUILD_REPOSITORY_URIon github.com;GitHubEnterprisewas already rejected and is now pinned by a test.configuration-reference.mdandci-cd-setup.mdsay only github.com gets PR context, listGITHUB_SERVER_URLin the container guidance, and fix a paragraph that rendered as a setext heading.Tests
GitHubPullRequestDetectorTests: github.com variants → context; GHES,*.ghe.com, lookalike, non-URL, unset, empty and whitespace →null; unset/empty/whitespace log a warning, a set non-github.com value doesn't.AzureDevOpsPullRequestDetectorTests:GitHubEnterpriseprovider →null;BUILD_REPOSITORY_URIon github.com → context, GHES / GHE.com / lookalike / non-URL / unset →null.main.dotnet build -c Releaseclean,Xping.Sdk.Core.Tests1178/1178 pass,dotnet format --verify-no-changesclean.🤖 Generated with Claude Code