App-TimeTracker-Command-GitHub

 view release on metacpan or  search on metacpan

lib/App/TimeTracker/Command/GitHub.pm  view on Meta::CPAN


sub App::TimeTracker::Data::Task::github_issue {
    my $self = shift;
    foreach my $tag ( @{ $self->tags } ) {
        next unless $tag =~ /^issue#(\d+)/;
        return $1;
    }
}

no Moose::Role;

q{ listening to: Train noises on my way from Wien to Graz }

__END__

=pod

=encoding UTF-8

=head1 NAME

App::TimeTracker::Command::GitHub - App::TimeTracker GitHub plugin

=head1 VERSION

version 1.002

=head1 DESCRIPTION

Connect tracker with L<GitHub|https://github.com/>.

Using the GitHub plugin, tracker can fetch the name of an issue and use
it as the task's description; generate a nicely named C<git> branch
(if you're also using the C<Git> plugin).

=head1 CONFIGURATION

=head2 plugins

Add C<GitHub> to the list of plugins.

=head2 github

add a hash named C<github>, containing the following keys:

=head3 user [REQUIRED]

Your github user name. Best stored in your global TimeTracker config file.

=head3 token [REQUIRED]

Your personal access token. Get it from your github settings
(Developer Settings, Personal access token): https://github.com/settings/tokens

Best stored in your global TimeTracker config file.

=head3 repo [REQUIRED]

The name of the repository you are working on. Currently a required
entry to the config file, but we might upgrade it to a command line
param and/or try to guess it from the current working dir or your git
config.

=head3 api_uri

Optional.

Set this to the URL of your local GitHub Enterprise installation.

=head3 upstream

Optional.

If the project you are working on has an upstream project where issues are
handled, then you can set upstream to a hash of user and repo (like on a normal
project) to fetch issues from there.

=head1 NEW COMMANDS

No new commands

=head1 CHANGES TO OTHER COMMANDS

=head2 start, continue

=head3 --issue

    ~/perl/Your-Project$ tracker start --issue 42

If C<--issue> is set and we can find an issue with this id in your current repo

=over

=item * set or append the issue name in the task description ("Rev up FluxCompensator!!")

=item * add the issue id to the tasks tags ("issue#42")

=item * if C<Git> is also used, determine a save branch name from the issue name, and change into this branch ("42-rev-up-fluxcompensator")

=item * TODO: assign to your user, if C<set_assignee> is set and issue is not assigned

=item * TODO: reopen a closed issue if C<reopen> is set

=item * TODO: modifiy the labels by adding all labels listed in C<labels_on_start.add> and removing all lables listed in C<labels_on_start.add>

=back

=head1 Contributors

=over

=item * L<Thomas MANTL|https://github.com/TM2500>

=back

=head1 AUTHOR

Thomas Klausner <domm@plix.at>

=head1 COPYRIGHT AND LICENSE



( run in 0.909 second using v1.01-cache-2.11-cpan-39bf76dae61 )