-
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.
fix: add ability to generate Gitfile with https urls (#16)
* fix: add ability to generate Gitfile with https urls * Fix typo * Fix typo * Fix typo * Fix typo * Fix typo * Fix typo * Fix typo * Fix typo
- Loading branch information
Showing
4 changed files
with
74 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,7 +126,7 @@ Examples: | |
|
||
git-get config-gen -f Gitfile -p "gitlab" -u "[email protected]:johndoe" -t misc -l debug | ||
git-get config-gen -f Gitfile -p "gitlab" -u "[email protected]:AcmeOrg" -t misc -l debug | ||
git-get config-gen -f Gitfile -p "gitlab" -u "[email protected]:AcmeOrg/kube" | ||
git-get config-gen -f Gitfile -p "gitlab" -u "[email protected]:AcmeOrg/kube" -g "https" | ||
git-get config-gen -f Gitfile -p "bitbucket" -u "[email protected]:AcmeOrg" -t AcmeOrg | ||
git-get config-gen -f Gitfile -p "github" -u "[email protected]:johndoe" -t johndoe -l debug | ||
git-get config-gen -f Gitfile -p "github" -u "[email protected]:AcmeOrg" -t AcmeOrg -l debug | ||
|
@@ -136,6 +136,7 @@ Flags: | |
-f, --config-file string Configuration file (default "~/Gitfile") | ||
-p, --config-provider string Git provider name [gitlab|github|bitbucket] (default "gitlab") | ||
-u, --config-url string Private URL prefix to construct Gitfile from (example: [email protected]:acmeorg), provider specific. | ||
-g, --generate-url-of-type string Generate git URLs of type [ssh|https] (default "ssh") | ||
--github-affiliation string Github: affiliation - comma-separated list of values. | ||
Can include: owner, collaborator, or organization_member (default "owner,collaborator,organization_member") | ||
--github-visibility string Github: visibility [all|public|private] (default "all") | ||
|
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 |
---|---|---|
|
@@ -49,15 +49,21 @@ top level URL of the organisation organization, user or for Gitlab provider Grou | |
Example: ` | ||
git-get config-gen -f Gitfile -p "gitlab" -u "[email protected]:johndoe" -t misc -l debug | ||
git-get config-gen -f Gitfile -p "gitlab" -u "[email protected]:AcmeOrg" -t misc -l debug | ||
git-get config-gen -f Gitfile -p "gitlab" -u "[email protected]:AcmeOrg/kube" | ||
git-get config-gen -f Gitfile -p "gitlab" -u "[email protected]:AcmeOrg/kube" -g "https" | ||
git-get config-gen -f Gitfile -p "bitbucket" -u "[email protected]:AcmeOrg" -t AcmeOrg | ||
git-get config-gen -f Gitfile -p "github" -u "[email protected]:johndoe" -t johndoe -l debug | ||
git-get config-gen -f Gitfile -p "github" -u "[email protected]:AcmeOrg" -t AcmeOrg -l debug`, | ||
Run: func(cmd *cobra.Command, args []string) { | ||
initLogging(logLevel) | ||
log.Debug("Generate Gitfile configuration file") | ||
gitget.GenerateGitfileConfig( | ||
cfgFile, ignoreFiles, gitCloudProviderRootURL, gitCloudProvider, targetClonePath, configGenParams) | ||
cfgFile, | ||
ignoreFiles, | ||
gitCloudProviderRootURL, | ||
gitCloudProvider, | ||
targetClonePath, | ||
configGenParams, | ||
) | ||
}, | ||
} | ||
|
||
|
@@ -88,6 +94,12 @@ func init() { | |
"l", | ||
"info", | ||
"Logging level [debug|info|warn|error|fatal|panic]") | ||
configGenCmd.Flags().StringVarP( | ||
&configGenParams.GitSchema, | ||
"generate-url-of-type", | ||
"g", | ||
"ssh", | ||
"Generate git URLs of type [ssh|https]") | ||
configGenCmd.Flags().StringVarP( | ||
&gitCloudProvider, | ||
"config-provider", | ||
|
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