Skip to content

Commit

Permalink
chore: 🤖 Add Help subcommand for pat subcommands #42 (#43)
Browse files Browse the repository at this point in the history
## Why?

The PAT subcommands should display detailed information to utilize any
flags and options.

## How?

-  Declare each subcommand to include the help command

## Tickets?

-
[PLAT-1517](https://linear.app/fleekxyz/issue/PLAT-1517/add-help-to-pat-subcommand)

## Contribution checklist?

- [x] The commit messages are detailed
- [x] The `build` command runs locally
- [ ] Assets or static content are linked and stored in the project
- [ ] You have manually tested
- [ ] You have provided tests

## Security checklist?

- [ ] Sensitive data has been identified and is being protected properly
- [ ] Injection has been prevented (parameterized queries, no eval or
system calls)

## Preview?

<img width="799" alt="Screenshot 2024-09-19 at 16 58 10"
src="https://github.com/user-attachments/assets/61738c3a-38be-4160-ade8-5e294fc10dde">
  • Loading branch information
heldrida authored Sep 19, 2024
1 parent d63411c commit c8419e4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/commands/pat/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default (program: Command) => {
cmd
.command('list') //
.description(t('patListDesc'))
.action(listPersonalAccessTokensActionHandler);
.action(listPersonalAccessTokensActionHandler)
.addHelpCommand();

cmd
.command('create')
Expand All @@ -35,7 +36,8 @@ export default (program: Command) => {
authApiUrl,
...args,
});
});
})
.addHelpCommand();

cmd
.command('delete')
Expand All @@ -50,7 +52,8 @@ export default (program: Command) => {
)
.action((personalAccessTokenId: string) =>
deletePersonalAccessTokenActionHandler({ personalAccessTokenId }),
);
)
.addHelpCommand();

cmd.command('help').description(t('printHelp'));
};

0 comments on commit c8419e4

Please sign in to comment.