Skip to content

feat(cli): generate the issue update command - #1486

Merged
Chase J (chajac) merged 2 commits into
mainfrom
chajac/cli-issue-update
Aug 14, 2026
Merged

feat(cli): generate the issue update command#1486
Chase J (chajac) merged 2 commits into
mainfrom
chajac/cli-issue-update

Conversation

@chajac

Copy link
Copy Markdown
Contributor

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.update contract 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: removes issue.update from 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 includes qawolf issue update.
  • src/core/publicApi/flagSpecs.ts: adds describeFlag. When a field accepts a set of permitted values, the help shows One 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 from objectShape.ts and 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 knip
  • Four new tests in flagSpecs.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 published issue.update contract.
  • End-to-end against app.qawolf.com with a test team, through the built Node bundle (node dist/cli.js): issue create made an issue, then issue update changed the title, the body, and the priority. issue get showed the new values. An empty --description cleared the body, and an empty --name was refused. A command with no field to change was refused before the request. An invalid value for --priority was refused before the request, and the message showed the permitted values.
  • The help of each generated command was examined. No flag with permitted values is now empty, and no flag shows the values two times.

Checklist

  • Changes follow the code style of this project
  • Self-review completed
  • Tests added/updated
  • No breaking changes

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bfca47da-ba90-4f5e-b0d7-9b82180bdfbd

📥 Commits

Reviewing files that changed from the base of the PR and between 049712b and bad54bc.

📒 Files selected for processing (6)
  • .changeset/enum-flag-choices-in-help.md
  • .changeset/issue-update-command.md
  • skills/qawolf-cli/SKILL.md
  • src/core/publicApi/flagSpecs.test.ts
  • src/core/publicApi/flagSpecs.ts
  • src/domains/publicApi/skippedContracts.ts

Walkthrough

The PR updates generated CLI flag specifications to append allowed enum values to scalar and array flag descriptions. Tests cover generated, existing, and published issue.update enum descriptions. It documents the qawolf issue update command and its partial-field update behavior. It also simplifies the skipped contract set and clarifies its relationship to hand-written commands.

Estimated code review effort: 2 (Simple) | ~15 minutes

Suggested reviewers: mateuszitelli

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chajac/cli-issue-update

Comment @coderabbitai help to get the list of available commands.

@chajac
Chase J (chajac) merged commit 36cb09e into main Aug 14, 2026
6 of 7 checks passed
@chajac
Chase J (chajac) deleted the chajac/cli-issue-update branch August 14, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants