-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
this adds recognition of the git_protocol setting when: - creating a repo - cloning a repo - forking a repo - forking/pushing during pr create - checking out a PR additionally, it: - consolidates remote adding to use AddRemote; this introduces a fetch where there previously hadn't been one - changes repo clone to accept an ssh url - changes repo fork to accept an ssh url i just added basic unit tests; adding new test cases for all of the above scenarios seemed like diminishing returns.
- Loading branch information
Showing
7 changed files
with
94 additions
and
28 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,3 +40,22 @@ func TestChangelogURL(t *testing.T) { | |
t.Errorf("expected %s to create url %s but got %s", tag, url, result) | ||
} | ||
} | ||
|
||
func TestRemoteURLFormatting_no_config(t *testing.T) { | ||
initBlankContext("", "OWNER/REPO", "master") | ||
result := formatRemoteURL(repoForkCmd, "OWNER/REPO") | ||
eq(t, result, "https://github.com/OWNER/REPO.git") | ||
} | ||
|
||
func TestRemoteURLFormatting_ssh_config(t *testing.T) { | ||
cfg := `--- | ||
hosts: | ||
github.com: | ||
user: OWNER | ||
oauth_token: MUSTBEHIGHCUZIMATOKEN | ||
git_protocol: ssh | ||
` | ||
initBlankContext(cfg, "OWNER/REPO", "master") | ||
result := formatRemoteURL(repoForkCmd, "OWNER/REPO") | ||
eq(t, result, "[email protected]:OWNER/REPO.git") | ||
} |
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