feat(cli): generate the issue update command - #1486
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (6)
WalkthroughThe PR updates generated CLI flag specifications to append allowed enum values to scalar and array flag descriptions. Tests cover generated, existing, and published Estimated code review effort: 2 (Simple) | ~15 minutes Suggested reviewers: ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Mateus Zitelli (MateusZitelli)
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
PR body AI drafted & edited as needed
Overview of Changes
The CLI makes one command for each public API contract. Two contracts gave a bad result.
The
issue.updatecontract had no command, because a skip list held its name. The note for the skip said that the input was a union of branches, and that a union has no flat set of fields to make flags from. This was correct for an older contract. The installed contract gives the input as one object, and the contract source says that it has this shape so that the CLI can make flags from it. Thus the skip was no longer necessary.Also, a flag that accepts only a small set of values showed no values in the help. A user learned the permitted values only from the error message of a rejected command.
src/domains/publicApi/skippedContracts.ts: removesissue.updatefrom the skip list. Makes the two sets into one set, because each remaining name has a hand-written command. The note gives the one condition to add a name.skills/qawolf-cli/SKILL.md: generated file. The command table now includesqawolf issue update.src/core/publicApi/flagSpecs.ts: addsdescribeFlag. When a field accepts a set of permitted values, the help showsOne of: ...after the description of the flag. An array field keeps its values on the item schema, so the code reads both locations. This does not change a union discriminator, which gets its text fromobjectShape.tsand has no such set.src/core/publicApi/flagSpecs.test.ts: adds four tests for the new help text.Testing
bun run test bun run typecheck bun run lint bun run format:check bun run knipflagSpecs.test.ts: a field with permitted values and no description, a field with permitted values and a description, an array field, and the values of the two flags of the publishedissue.updatecontract.node dist/cli.js):issue createmade an issue, thenissue updatechanged the title, the body, and the priority.issue getshowed the new values. An empty--descriptioncleared the body, and an empty--namewas refused. A command with no field to change was refused before the request. An invalid value for--prioritywas refused before the request, and the message showed the permitted values.Checklist