8000 Add gitlab shorthand by hackebrot · Pull Request #963 · cookiecutter/cookiecutter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add gitlab shorthand #963

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 24, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cookiecutter/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

BUILTIN_ABBREVIATIONS = {
'gh': 'https://github.com/{0}.git',
'gl': 'https://gitlab.com/{0}.git',
'bb': 'https://bitbucket.org/{0}',
}

Expand Down
4 changes: 2 additions & 2 deletions docs/advanced/user_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ Possible settings are:
the text `{0}`, using standard Python string formatting. With the above
aliases, you could use the `cookiecutter-pypackage` template simply by saying
`cookiecutter pp`, or `cookiecutter gh:audreyr/cookiecutter-pypackage`.
The `gh` (github) and `bb` (bitbucket) abbreviations shown above are actually
built in, and can be used without defining them yourself.
The `gh` (github), `bb` (bitbucket), and `gl` (gitlab) abbreviations shown
above are actually built in, and can be used without defining them yourself.
7 changes: 4 additions & 3 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Modify the variables defined in `cookiecutter.json`.

Open up the skeleton project. If you need to change it around a bit, do so.

You probably also want to create a repo, name it differently, and push it as
You probably also want to create a repo, name it differently, and push it as
your own new Cookiecutter project template, for handy future use.

Generate your project
Expand All @@ -42,8 +42,9 @@ To create a project from the cookiecutter-pypackage.git repo template::

$ cookiecutter gh:audreyr/cookiecutter-pypackage

Cookiecutter knows abbreviations for Github (``gh``) and Bitbucket (``bb``)
projects, but you can also give it the full URL to any repository::
Cookiecutter knows abbreviations for Github (``gh``), Bitbucket (``bb``), and
GitLab (``gl``) projects, but you can also give it the full URL to any
repository::

$ cookiecutter https://github.com/audreyr/cookiecutter-pypackage.git
$ cookiecutter git+ssh://git@github.com/audreyr/cookiecutter-pypackage.git
Expand Down
2 changes: 2 additions & 0 deletions tests/test_get_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def test_get_config():
},
'abbreviations': {
'gh': 'https://github.com/{0}.git',
'gl': 'https://gitlab.com/{0}.git',
'bb': 'https://bitbucket.org/{0}',
}
}
Expand Down Expand Up @@ -70,6 +71,7 @@ def test_get_config_with_defaults():
},
'abbreviations': {
'gh': 'https://github.com/{0}.git',
'gl': 'https://gitlab.com/{0}.git',
'bb': 'https://bitbucket.org/{0}',
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/test_get_user_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def custom_config():
'replay_dir': '/home/example/some-path-to-replay-files',
'abbreviations': {
'gh': 'https://github.com/{0}.git',
'gl': 'https://gitlab.com/{0}.git',
'bb': 'https://bitbucket.org/{0}',
}
}
Expand Down
0