Repository navigation
Conversation
Add CLI commands for the new public API endpoints for folders, test cases, trash, tags, requirements, shared steps and preconditions, projects, AI rules and configurations. New commands: - ai-rules list - configurations list, get, create, update, delete - folders get, tree, path, create, update, move, copy, delete - projects update, users list - requirements get, create, update, delete - shared-preconditions create, update, delete - shared-steps create, update, delete - tags create, update, rename, delete - test-cases get-version, rollback, move, copy, delete, update-priority, update-tags, update-requirements, results list - trash list, restore test-cases create and update gain --requirements, --links and --title-suffix-params, and create gains --pos, so every field can be set without --body. Conventions: - One command per action. Bulk actions take comma-separated IDs and call the multi-item endpoint (--tcase-ids, --folder-ids, --tag-ids). - New resources take --<resource>-id; shared steps and preconditions keep --id, like their existing get. - --tcase-version instead of --version, which is yargs' global flag. - Helpers for integer ID params and comma-separated lists are shared in manifests/utils.ts. The command trees in the README and the agent skill list each command's required options, with a note that every command sending a body also accepts --body or --body-file.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0cbd327d20
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| export const intListSchema = z | ||
| .string() | ||
| .regex(/^\s*\d+\s*(,\s*\d+\s*)*$/, 'must be comma-separated positive integers') |
There was a problem hiding this comment.
Reject zero in positive-integer lists before auth
The regex accepts 0, despite describing positive integers. Consequently, commands such as tags delete --tag-ids 0 and folders delete --folder-ids 0 pass manifest validation and reach resolveAuth() before their API schemas reject the value; without configured credentials, users receive an authentication error instead of the argument error that should be reported first. Require each item to start with [1-9] so this validation happens before credential resolution.
AGENTS.md reference: AGENTS.md:L84-L88
Useful? React with 👍 / 👎.
| export const UpdateTCasesTagsRequestSchema = z.object({ | ||
| tcaseIds: tcaseRefsSchema, | ||
| add: z.array(tagTitleSchema).optional(), | ||
| remove: z.array(tagTitleSchema).optional(), | ||
| }) |
There was a problem hiding this comment.
Require an actual bulk tag or requirement change
When callers use --body, the manifest's requireTCaseIdsAndChange check returns immediately, while this schema accepts a request containing only tcaseIds; it also accepts empty add/remove arrays. Thus --body '{"tcaseIds":["12"]}' and --add '' can reach the bulk-update endpoint without any requested change, and UpdateTCasesRequirementsRequestSchema has the same defect. Refine both request schemas to require at least one non-empty change array so API-level request validation enforces the same contract as the CLI.
AGENTS.md reference: AGENTS.md:L96-L97
Useful? React with 👍 / 👎.
Adds CLI commands for new QA Sphere public API endpoints: folders, test cases, trash, tags, requirements, shared steps and preconditions, projects, AI rules and configurations. This is the first of a series; later PRs add the remaining commands.
Important
Wait for the next QA Sphere release before merging. Most of these commands call endpoints that aren't live yet.
ai-ruleslistconfigurationslist,get,create,update,deletefoldersget,tree,path,create,update,move,copy,deleteprojectsupdate,users listrequirementsget,create,update,deleteshared-preconditionscreate,update,deleteshared-stepscreate,update,deletetagscreate,update,rename,deletetest-casesget-version,rollback,move,copy,delete,update-priority,update-tags,update-requirements,results listtrashlist,restoretest-cases delete --tcase-ids 12,13--<resource>-id; shared steps and preconditions keep--id, like their existinggetconfigurations get --configuration-id <id>--tcase-version, since--versionis yargs' global flagtest-cases rollback --tcase-id 12 --tcase-version 2test-cases create/updategain--requirements,--linksand--title-suffix-params, andcreategains--pos, so every field can be set without--body.skills/qas-cli/SKILL.mdlist each command's required options, with a note that every command sending a body also accepts--bodyor--body-file.🤖 Generated with Claude Code