n release
=item *
L<Dist::Zilla::Plugin::Bitbucket::Meta>
Add Bitbucket repo info to META.{yml,json}
=back
=head2 Configuration
Configure git with your Bitbucket credentials:
$ git config --gl
= '0.001';
our $AUTHORITY = 'cpan:APOCAL';
# ABSTRACT: Add a Bitbucket repo's info to META.{yml,json}
use Moose;
extends 'Dist::Zilla::Plugin::Bitbucket';
with 'Dist::Zilla::Role::MetaProvider';
ata
=head1 NAME
Dist::Zilla::Plugin::Bitbucket::Meta - Add a Bitbucket repo's info to META.{yml,json}
=head1 VERSION
This document describes v0.001 of Dist::Zilla::Plugin::Bitbucket::Meta - rele
illa> plugin adds some information about the distribution's Bitbucket
repository to the META.{yml,json} files, using the official L<CPAN::Meta>
specification.
This module currently sets the following
ints;
use HTTP::Tiny 0.050;
use Try::Tiny 0.22;
use MIME::Base64 3.14;
use JSON::MaybeXS 1.002006 qw( encode_json decode_json );
use Git::Wrapper 0.037;
use File::pushd 1.009;
extends 'Dist::Zilla::P
c " . MIME::Base64::encode_base64("$login:$pass", '');
$headers->{'content-type'} = "application/json";
# We use the v2.0 API to create
my $url = 'https://api.bitbucket.org/2.0/repositories/' . $l
ository '%s'", $repo_name ]);
my $response = $http->request( 'POST', $url, {
content => encode_json( $params ),
headers => $headers
});
if ( ! $response->{'success'} ) {
$self->log( ["Error:
fo on release
use Moose;
use HTTP::Tiny 0.050;
use MIME::Base64 3.14;
use JSON::MaybeXS 1.002006 qw( encode_json decode_json );
extends 'Dist::Zilla::Plugin::Bitbucket';
with 'Dist::Zilla::Role::Aft
c " . MIME::Base64::encode_base64("$login:$pass", '');
$headers->{'content-type'} = "application/json";
# We use the v1.0 API to update
my $url = 'https://bitbucket.org/api/1.0/repositories/' . $r
Bitbucket repository info" );
my $response = $http->request( 'PUT', $url, {
content => encode_json( $params ),
headers => $headers
});
if ( ! $response->{'success'} ) {
$self->log( ["Error: