Skip to content

Commit e4b902b

Browse files
Vitexusclaude
andcommitted
feat: add --company_id option to run-template:list command
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent cb82539 commit e4b902b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/Command/RunTemplate/ListCommand.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ protected function configure(): void
3131
->setDescription('List run templates')
3232
->addOption('format', 'f', InputOption::VALUE_OPTIONAL, 'Output format: text or json', 'text')
3333
->addOption('company', null, InputOption::VALUE_REQUIRED, 'Filter by company slug or ID')
34+
->addOption('company_id', null, InputOption::VALUE_REQUIRED, 'Filter by company ID (numeric)')
3435
->addOption('app_uuid', null, InputOption::VALUE_REQUIRED, 'Filter by application UUID')
3536
->addOption('limit', null, InputOption::VALUE_REQUIRED, 'Limit number of results')
3637
->addOption('offset', null, InputOption::VALUE_REQUIRED, 'Offset for results')
@@ -45,8 +46,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
4546
$query = $rt->listingQuery();
4647

4748
$companyOption = $input->getOption('company');
49+
$companyIdOption = $input->getOption('company_id');
4850

49-
if ($companyOption) {
51+
if ($companyIdOption !== null) {
52+
$query->where('runtemplate.company_id', (int) $companyIdOption);
53+
} elseif ($companyOption) {
5054
$query->join('company ON company.id = runtemplate.company_id');
5155

5256
if (is_numeric($companyOption)) {

0 commit comments

Comments
 (0)