Inject GitHub host to be able to clone from another GitHub instance#922
Merged
TingluoHuang merged 3 commits intoactions:mainfrom Sep 26, 2022
Merged
Inject GitHub host to be able to clone from another GitHub instance#922TingluoHuang merged 3 commits intoactions:mainfrom
TingluoHuang merged 3 commits intoactions:mainfrom
Conversation
…o differ from the Actions workflow host
8e2ca23 to
385d3aa
Compare
__test__/git-auth-helper.test.ts
Outdated
| workflowOrganizationId: 123456, | ||
| setSafeDirectory: true | ||
| setSafeDirectory: true, | ||
| githubServerUrl: undefined |
Member
There was a problem hiding this comment.
can we have a test with githubServerUrl set to some URL?
Contributor
Author
There was a problem hiding this comment.
Added tests to the branch and refactored the one that was there to use common code for that test
|
|
||
| export type OctokitOptions = { | ||
| baseUrl?: string | ||
| userAgent?: string |
Member
There was a problem hiding this comment.
anything set this userAgent?
Contributor
Author
There was a problem hiding this comment.
Yes the ref-helper.ts injects this currently, https://github.com/peter-murray/checkout/blob/server-url-injection/src/ref-helper.ts#L250
Link-
requested changes
Sep 16, 2022
Member
There was a problem hiding this comment.
@peter-murray can you please run npm run format and push the changes?
Otherwise, I don't see any glaring issues with this change.
peter-murray
added a commit
to peter-murray/checkout
that referenced
this pull request
Sep 20, 2022
3e002a4 to
0ff8af6
Compare
Link-
approved these changes
Sep 20, 2022
TingluoHuang
approved these changes
Sep 26, 2022
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.
These changes allow for the base URL of another GitHub instance to be provided to the action so that a workflow running on a GHES server can clone a repository from another GHES server or github.com.
These changes maintain the existing default behaviour whilst allowing for a user to inject a URL to alternate GitHub instance and have been validated using an actions runner with and without a git command line client (i.e. git command line clone and HTTP cloning) have been tested.