-
-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: support github server url for pushing to fork (#1318)
* feat: support github server url for pushing to fork (#1315) Co-authored-by: Kevin Zhu <[email protected]> * fix: code formatting * test: fix tests for getRemoteUrl Co-authored-by: MildC <[email protected]> Co-authored-by: Kevin Zhu <[email protected]>
- Loading branch information
1 parent
d7db273
commit 331d02c
Showing
4 changed files
with
43 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,11 +90,28 @@ describe('utils tests', () => { | |
}) | ||
|
||
test('getRemoteUrl successfully returns remote URLs', async () => { | ||
const url1 = utils.getRemoteUrl('HTTPS', 'peter-evans/create-pull-request') | ||
const url1 = utils.getRemoteUrl( | ||
'HTTPS', | ||
'github.com', | ||
'peter-evans/create-pull-request' | ||
) | ||
expect(url1).toEqual('https://github.com/peter-evans/create-pull-request') | ||
|
||
const url2 = utils.getRemoteUrl('SSH', 'peter-evans/create-pull-request') | ||
const url2 = utils.getRemoteUrl( | ||
'SSH', | ||
'github.com', | ||
'peter-evans/create-pull-request' | ||
) | ||
expect(url2).toEqual('[email protected]:peter-evans/create-pull-request.git') | ||
|
||
const url3 = utils.getRemoteUrl( | ||
'HTTPS', | ||
'mygithubserver.com', | ||
'peter-evans/create-pull-request' | ||
) | ||
expect(url3).toEqual( | ||
'https://mygithubserver.com/peter-evans/create-pull-request' | ||
) | ||
}) | ||
|
||
test('secondsSinceEpoch returns the number of seconds since the Epoch', async () => { | ||
|
This file contains 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
This file contains 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
This file contains 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