diff --git a/README.md b/README.md index 33b1188..0a124a9 100644 --- a/README.md +++ b/README.md @@ -31,9 +31,11 @@ The following env parameters need to be configured, depending on the CLI command ### Use OpenAI to generate your sprint goals for a planned or existing sprint. ```bash > aijira sprint:goals "" +> aijira ticket:sprintgoals ",," ``` ![2023-06-21_1.png](assets/2023-06-21_1.png) +![2023-06-21_5.png](assets%2F2023-06-21_5.png) ### Use OpenAI to generate a sprint review agenda. ```bash diff --git a/aijira b/aijira index cf25820..8043fe0 100755 --- a/aijira +++ b/aijira @@ -177,6 +177,26 @@ $application->add(new class('sprint:goals') extends Command { } }); +$application->add(new class('ticket:sprintgoals') extends Command { + public function __construct(string $name = null) + { + parent::__construct($name); + $this->setDescription('Use OpenAI to generate your sprint goals for a planned or existing sprint using a list of tickets.'); + $this->addArgument('list-of-tickets', InputArgument::REQUIRED, 'List of JIRA Tickets'); + $this->addArgument('overwrite-prompt', InputArgument::OPTIONAL, 'Overwrite Prompt'); + } + + protected function execute(InputInterface $input, OutputInterface $output): int + { + $command = ['aiticketsprintgoals', $input->getArgument('list-of-tickets'), $input->getArgument('overwrite-prompt')]; + $process = new Process($command); + $process->setTty(true); + $process->run(); + + $output->write($process->getOutput()); + return Command::SUCCESS; + } +}); $application->add(new class('sprint:release-notes') extends Command { public function __construct(string $name = null) diff --git a/aireleasenotes b/aireleasenotes index 6bc15ec..390a542 100755 --- a/aireleasenotes +++ b/aireleasenotes @@ -1,4 +1,4 @@ -#!/usr/bin/php +#!/usr/bin/env php