Skip to content

Commit

Permalink
Added --repo option (alias for queue).
Browse files Browse the repository at this point in the history
This is a partial fix for issue #4.
  • Loading branch information
melmothx committed Oct 10, 2014
1 parent 321c776 commit 4b45b05
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bin/helpdesk-integration
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ my ($subject,
$bts_subject,
$ignore_images,
$transactions,
$repo,
$queue);

# defaults
Expand Down Expand Up @@ -70,6 +71,7 @@ GetOptions (
"todo-list=s" => \$todo_list,
"comment" => \$comment, #boolean
"queue=s" => \$queue,
"repo=s" => \$repo,
"workers=s" => \$workers,
"project=s" => \$project,
"dry-run" => \$dry_run,
Expand Down Expand Up @@ -172,6 +174,7 @@ if ($project) {
}
}

# aliases
if ($todo_list) {
if ($helpdsk->target->type eq 'teamwork') {
if (!$queue) {
Expand All @@ -185,6 +188,19 @@ if ($todo_list) {
warn "Ignored option --todo-list $todo_list, not a teamwork target\n";
}
}
if ($repo) {
if ($helpdsk->target->type eq 'github') {
if (!$queue) {
$queue = $repo;
}
else {
die "repo and queue are alias, you set both, exiting\n";
}
}
else {
warn "Ignored option --repo $repo, not a github target\n";
}
}


if ($workers) {
Expand Down Expand Up @@ -414,6 +430,11 @@ Options for adding to RT/TeamWork
Alias for queue when the target type is teamwork. Ignored
otherwise.
--repo '<my-repo>'
Alias for queue when the target type is github (override the
configuration).
--comment
If the comment flag is set, the mails will be added as comment
Expand Down

0 comments on commit 4b45b05

Please sign in to comment.