fix: support GitHub Enterprise Server domains in annotation URLs#542
Open
ejaifeobuks wants to merge 1 commit into
Open
fix: support GitHub Enterprise Server domains in annotation URLs#542ejaifeobuks wants to merge 1 commit into
ejaifeobuks wants to merge 1 commit into
Conversation
Replace hardcoded https://github.com in the deployment annotation runUri and getNormalizedPath blob links with GITHUB_SERVER_URL, falling back to https://github.com when the var is unset. This makes the generated links correct on GitHub Enterprise Server instances hosted on custom domains.
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.
Replace hardcoded https://github.com in the deployment annotation runUri and getNormalizedPath blob links with GITHUB_SERVER_URL, falling back to https://github.com when the var is unset. This makes the generated links correct on GitHub Enterprise Server instances hosted on custom domains.
This PR fixes issue
This pull request improves how URLs are constructed for GitHub resources by ensuring that the correct GitHub server URL is used, especially in environments where GitHub Enterprise or custom domains are in use. The changes make the code more flexible and robust for different deployment scenarios.
URL Construction Improvements:
getNormalizedPathinsrc/utilities/githubUtils.tsto useGITHUB_SERVER_URL(defaulting tohttps://github.com) when constructing blob URLs, instead of hardcoding the domain.getWorkflowAnnotationsinsrc/utilities/workflowAnnotationUtils.tsto useGITHUB_SERVER_URL(defaulting tohttps://github.com) when constructing workflow run URLs, instead of hardcoding the domain.