You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement gitee pr edit as a thin vertical slice that updates an existing pull request end-to-end through the CLI. The command should support explicit --repo or local repository inference, use the official Gitee pull request update endpoint, and return the updated pull request with the same stable text and --json contract used by pr view.
The initial slice should cover the high-frequency edit operations defined in the parent PRD addendum: updating the title, updating or clearing the body via --body or --body-file, changing state with --state open|closed, and controlling draft readiness with --draft or --ready.
Acceptance criteria
gitee pr edit <number> supports --title, --body, --body-file, --state open|closed, --draft, and --ready, and requires at least one explicit mutation flag.
The command preserves unspecified fields, supports --body-file - for stdin, allows an explicitly empty body to clear the remote PR body, and validates conflicting or unsupported flag combinations with stable usage errors.
The implementation works with explicit --repo and inferred local repository context, reuses the existing authentication, canonical repository fallback, exit-code mapping, and pull-request rendering behavior, and surfaces remote validation errors clearly.
gitee pr edit --json returns the same field contract as gitee pr view, and default text output remains readable and stable.
Integration coverage exercises success and failure paths for title/body edits, state transitions, draft readiness changes, stdin/body-file behavior, missing authentication, repository or PR not found, and invalid argument combinations.
Blocked by
None - can start immediately.
User stories addressed
Reference from the gitee pr edit addendum on parent PRD #2:
Parent PRD
#2
PRD addendum comment: #2 (comment)
What to build
Implement
gitee pr editas a thin vertical slice that updates an existing pull request end-to-end through the CLI. The command should support explicit--repoor local repository inference, use the official Gitee pull request update endpoint, and return the updated pull request with the same stable text and--jsoncontract used bypr view.The initial slice should cover the high-frequency edit operations defined in the parent PRD addendum: updating the title, updating or clearing the body via
--bodyor--body-file, changing state with--state open|closed, and controlling draft readiness with--draftor--ready.Acceptance criteria
gitee pr edit <number>supports--title,--body,--body-file,--state open|closed,--draft, and--ready, and requires at least one explicit mutation flag.--body-file -for stdin, allows an explicitly empty body to clear the remote PR body, and validates conflicting or unsupported flag combinations with stable usage errors.--repoand inferred local repository context, reuses the existing authentication, canonical repository fallback, exit-code mapping, and pull-request rendering behavior, and surfaces remote validation errors clearly.gitee pr edit --jsonreturns the same field contract asgitee pr view, and default text output remains readable and stable.Blocked by
None - can start immediately.
User stories addressed
Reference from the
gitee pr editaddendum on parent PRD #2: