NAME
Dist::Zilla::Plugin::Bitbucket::Create - Create a new Bitbucket repo on dzil new
VERSION
This document describes v0.001 of Dist::Zilla::Plugin::Bitbucket::Create - released November 03, 2014 as part of Dist-Zilla-Plugin-Bitbucket.
DESCRIPTION
# in your profile.ini in the MintingProvider's profile
[Bitbucket::Create]
# to override publicness
[Bitbucket::Create]
public = 0
# use a template for the repository name
[Bitbucket::Create]
repo = {{ lc $dist -> name }}
This Dist::Zilla plugin creates a new git repository on Bitbucket when a new distribution is created with dzil new
.
It will also add a new git remote pointing to the newly created Bitbucket repository's private URL. See "ADDING REMOTE" for more info.
Furthermore, please consult the Bitbucket API reference at https://confluence.atlassian.com/display/BITBUCKET/repository+Resource#repositoryResource-POSTanewrepository for an in-depth explanation of the various settings.
ATTRIBUTES
is_private
Create a private repository if this option is set to true, otherwise create a private repository (default is false).
prompt
Prompt for confirmation before creating a Bitbucket repository if this option is set to true (default is false).
has_issues
Enable issues for the new repository if this option is set to true (default).
has_wiki
Enable the wiki for the new repository if this option is set to true (default).
description
Provide a string describing the repository. Defaults to nothing.
NOTE: If you are also using the Dist::Zilla::Plugin::Bitbucket::Update plugin watch out for it clobbering your description on release!
fork_policy
Control the rules for forking this repository. Available values are (the default is allow_forks):
allow_forks: unrestricted forking
no_public_forks: restrict forking to private forks (forks cannot be made public later)
no_forks: deny all forking
language
The programming language used in the repository. Defaults to nothing.
NOTE: Must be a valid (lowercase) item as shown in the drop-down list on the repository's admin page on the Bitbucket website.
ADDING REMOTE
By default Bitbucket::Create
adds a new git remote pointing to the newly created Bitbucket repository's private URL if, and only if, a git repository has already been initialized, and if the remote doesn't already exist in that repository.
To take full advantage of this feature you should use, along with Bitbucket::Create
, the Dist::Zilla::Plugin::Git::Init plugin, leaving blank its remote
option, as follows:
[Git::Init]
; here goes your Git::Init config, remember
; to not set the 'remote' option
[Bitbucket::Create]
You may set your preferred remote name, by setting the remote
option of the Bitbucket::Create
plugin, as follows:
[Git::Init]
[Bitbucket::Create]
remote = myremote
Remember to put [Git::Init]
before [Bitbucket::Create]
.
After the new remote is added, the current branch will track it, unless remote tracking for the branch was already set. This may allow one to use the Dist::Zilla::Plugin::Git::Push plugin without the need to do a git push
between the dzil new
and dzil release
. Note though that this will work only when the push.default
Git configuration option is set to either upstream
or simple
(which will be the default in Git 2.0). If you are using an older Git or don't want to change your config, you may want to have a look at Dist::Zilla::Plugin::Git::PushInitial.
Mercurial usage
This author admits to being a newbie to Mercurial (hg) and haven't tested it thoroughly! In theory this plugin should play nice with the Dist::Zilla::Plugin::Mercurial dist so please let me know if you encounter issues!
SEE ALSO
Please see those modules/websites for more information related to this module.
AUTHOR
Apocalypse <APOCAL@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Apocalypse.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
The full text of the license can be found in the LICENSE file included with this distribution.
DISCLAIMER OF WARRANTY
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.