| 1 | package App::SD::CLI::Command::Help::Attachments; | ||
| 2 | use Any::Moose; | ||
| 3 | extends 'App::SD::CLI::Command::Help'; | ||
| 4 | |||
| 5 | sub run { | ||
| 6 | my $self = shift; | ||
| 7 | $self->print_header('Working with ticket attachments'); | ||
| 8 | my ${cmd}= $self->cli->get_script_name; | ||
| 9 | |||
| 10 | print <<EOF | ||
| 11 | |||
| 12 | ${cmd}ticket attachment create 456 --file bugfix.patch | ||
| 13 | ${cmd}ticket attachment create 456 -f bugfix.patch | ||
| 14 | Create a new attachment on this ticket from the file 'bugfix.patch'. | ||
| 15 | |||
| 16 | ${cmd}ticket attachment list 456 | ||
| 17 | Show all attachemnts on ticket 456. | ||
| 18 | |||
| 19 | ${cmd}ticket attachment show 567 | ||
| 20 | Show the properties of attachment 567 (including the content). | ||
| 21 | |||
| 22 | ${cmd}ticket attachment content 567 | ||
| 23 | Send the content of attachment 567 to STDOUT. | ||
| 24 | |||
| 25 | ${cmd}ticket attachment content 567 > to_apply.patch | ||
| 26 | Save the contents of attachment 567 to a file so the patch | ||
| 27 | can be applied. | ||
| 28 | EOF | ||
| 29 | |||
| 30 | } | ||
| 31 | |||
| 32 | __PACKAGE__->meta->make_immutable; | ||
| 33 | no Any::Moose; | ||
| 34 | |||
| 35 | 1; | ||
| 36 |