On Wed, Dec 2, 2015 at 5:08 PM, Tim Johnston <[email protected]> wrote:
> I'm wondering about migrating my github 'issues' and turning them into
> fossil 'tickets'. Does anyone have experience with this? Any
> recommendations for approaching it?
>
I can't help with parsing the github tickets, but I can make suggestions
for automating creation of Fossil tickets.
See "fossil help ticket" for a description of the CLI to Fossil tickets.
Note that the ticket CLI doesn't perform any TH1/TCL processing you might
define in the ticket setup via the GUI. What you specify for the fields and
values will be what gets put in to the tickets created this way.
Here's a partial Perl program to process 1 ticket:
#!Perl
use strict;
use warnings;
# List of ticket fields in Fossil (Default fields with addition of gh_id to
hold the github ticket id. Modify for your needs.)
my @FossilFields = qw/gh_id title status severity priority resolution
subsystem private_contact foundin username comment/;
# List of ticket fields in github project. Use same order as corresponding
Fossil ticket fields. Modify for your project.
my @GhFields = qw/id title status severity priority resolution subsystem
private_contact foundin username comment/;
my %mapGh2F;
my $i = 0;
for my $n (@GhFields)
{
$mapGh2F{$n} = @FossilFields[$i++];
}
my %FieldsValues;
# code to parse github ticket record goes here, inserting extracted values
into %FieldsValues
# build Fossil command to add ticket
my @cmd = qw/fossil ticket add/;
# might need to: push@cmd, "-q";
# if needed, make sure ticket parser quotes (escapes) certain character as
described in "fossil help ticket"
for my $n (@FossilFields)
{
push @cmd, $n;
push @cmd, $FieldsValues{$n};
}
# now, run it (the following is roughly equivalent, in C, to:
execvp(cmd[0], cmd);
system @cmd;
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users