-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from siketyan/feat/additional-patterns
feat: Support additional patterns for cloning
- Loading branch information
Showing
11 changed files
with
542 additions
and
105 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# | ||
# Example configuration for ghr. | ||
# | ||
|
||
[defaults] | ||
# Sets the default owner of repositories. | ||
# You can pass only repository name to 'ghr clone' when this is set. | ||
owner = "siketyan" | ||
|
||
[git] | ||
# Chooses the strategy to use on Git clones. | ||
# 'Cli' is the default. 'Git2' is also supported, but deprecated. | ||
strategy.clone = "Cli" | ||
|
||
[[patterns]] | ||
# You can use additional patterns to specify where the repository is cloned from. | ||
# For details of regular expression syntax, see https://docs.rs/regex/latest/regex/index.html . | ||
regex = "^(?P<scheme>https)://(?P<host>git\\.kernel\\.org)/pub/scm/linux/kernel/git/(?P<owner>.+)/(?P<repo>.+)\\.git" | ||
|
||
# You can override parameters if those are not in or different from the pattern. | ||
vcs = "git" | ||
scheme = "https" | ||
user = "" | ||
host = "git.kernel.org" | ||
owner = "torvalds" | ||
|
||
# Composes URL different from the input. | ||
# This does not work when inferring is enabled. | ||
url = "{{scheme}}://{{host}}/pub/scm/linux/kernel/git/{{owner}}/{{repo}}.{{vcs}}" | ||
|
||
# Turn off inferring URL to use the raw input to clone. | ||
infer = false | ||
|
||
[profiles.work] | ||
# Overrides Git profile using the profile. | ||
# You need to add rule(s) to attach this profile onto a repository. | ||
user.name = "My Working Name" | ||
user.email = "[email protected]" | ||
|
||
[applications.vscode] | ||
# You can open a repository in VS Code using `ghr open <repo> vscode`. | ||
cmd = "code" | ||
args = ["%p"] | ||
|
||
[[rules]] | ||
# 'work' profile declared above is attached on this rule. | ||
profile.name = "work" | ||
|
||
# This rule is applied when the repository is owned by your company on GitHub. | ||
host = "github.com" | ||
owner = "my-company-org" | ||
|
||
# Optionally you can apply the rule onto a specific repo. | ||
#repo = "company-repo" |
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
Oops, something went wrong.