App-TimeTracker-Command-Gitlab
view release on metacpan or search on metacpan
lib/App/TimeTracker/Command/Gitlab.pm view on Meta::CPAN
use 5.010;
# ABSTRACT: App::TimeTracker Gitlab plugin
use App::TimeTracker::Utils qw(error_message warning_message);
our $VERSION = "1.004";
use Moose::Role;
use HTTP::Tiny;
use JSON::XS qw(encode_json decode_json);
use URI::Escape qw(uri_escape);
has 'issue' => (
is => 'rw',
isa => 'Str',
documentation => 'gitlab issue',
predicate => 'has_issue'
);
has 'gitlab_client' => (
is => 'rw',
lib/App/TimeTracker/Command/Gitlab.pm view on Meta::CPAN
if (my $add = $on_start->{add}) {
foreach my $new (@$add) {
$l{$new}=1;
}
}
if (my $remove = $on_start->{remove}) {
foreach my $remove (@$remove) {
delete $l{$remove};
}
}
$self->_call('PUT','projects/'.$self->project_id.'/issues/'.$self->issue.'?labels='.uri_escape(join(',',keys %l)));
say "Labels are now: ".join(', ',sort keys %l);
}
};
#after [ 'cmd_start', 'cmd_continue', 'cmd_append' ] => sub {
# my $self = shift;
# TODO: do we want to do something after stop?
#};
sub _get_user_id {
( run in 0.295 second using v1.01-cache-2.11-cpan-5467b0d2c73 )