App-Gitc
view release on metacpan or search on metacpan
This is a howto document to show you the process of setting up GITC from the
beginning with RT. You can alter it for your relevant ticketing system.
This document assumes that you already have a working ticketing system, a
working install of GIT, and have git pull-ed or downloaded and expanded an
archive of gitc in the 'gitc' directory.
Begin by editing gitc.config. In this file, you will specify the various
statuses tickets will be put in by gitc, as well as the user lookup method.
The default rt_statuses for github is probably fine if that's what you're
using, but we're using RT for this example, so copy/edit
examples/rt-gitc.config.
For RT, my default workflow is:
Set( %Lifecycles, default => {
initial => [qw( new )],
active => [qw( in_progress merged failed in_test in_stage in_production pending_review )],
inactive => [qw( worksforme closed rejected )],
transitions => {
q{} => [qw(new)],
new => [qw(worksforme in_progress closed rejected )],
worksforme => [qw(closed new)],
in_progress => [qw(new pending_review)],
closed => [qw(new)],
rejected => [qw(new closed)],
pending_review => [qw(in_progress new failed merged)],
failed => [qw(in_progress pending_review closed)],
merged => [qw(in_test in_progress failed)],
in_test => [qw(failed in_progress in_stage)],
in_stage => [qw(failed in_progress in_production)],
in_production => [qw(failed in_progress closed)],
},
} );
In short, an example status:
open:
from: '.*'
to: 'in_progress'
block: ['closed', 'in_production']
This means the 'open' command will put a ticket in the 'in_progress' status,
and it will let it go from any status, except closed or in production. The
from is a regex.
user_lookup_method specifies which module in lib/App/Gitc/UserLookup will be
used to get a list of users for submitting changesets to.
user_lookup_group is a specific config value used by LocalGroup.
The defaults are gitc tags, as well as users in a unix group. You can
implement your own class here if you need to. The module is expected to have a
'user_list' method. The method will receive a copy of the gitc config, and is
expected to return a list of usernames.
Once your configuration file is ready to go, copy it to either
/etc/gitc/gitc.config, or $HOME/.gitc/gitc.config or gitc.config in your
project root directory.
Next, create a '.gitc' file inside of the root of your git project. In that
file, enter:
( run in 1.292 second using v1.01-cache-2.11-cpan-5623c5533a1 )