copia-cli pr edit¶
copia-cli pr edit {<number> | <url>} [flags]
Edit the title, body, base branch, labels, assignees, reviewers or milestone of a Copia pull request by number or URL.
--body-file reads the body from a file, "-" from standard input; it cannot be combined with --body. An empty --body clears the body.
--add-label and --remove-label take label names of the repository or its organization; an unknown name fails before the pull request is changed. --add-assignee and --remove-assignee take logins, "@me" is the authenticated user. Labels and assignees are read first and the changed lists are sent whole; removing a value the pull request does not have changes nothing.
--add-reviewer and --remove-reviewer take a login or an org/team name.
--milestone takes a milestone name or its numeric ID; an unknown milestone fails before the pull request is changed. --remove-milestone clears it.
Adding and removing the same value, or --milestone with --remove-milestone, fails before any request. On success the URL of the pull request is printed.
Options¶
--add-assignee <login>- Add assigned users by their login. Use "@me" to assign yourself.
--add-label <name>- Add labels by name
--add-reviewer <login>- Add reviewers by their login or org/team name
-B,--base <branch>- Change the base branch for this pull request
-b,--body <string>- Set the new body
-F,--body-file <file>- Read body text from file (use "-" to read from standard input)
-m,--milestone <name>- Edit the milestone the pull request belongs to by its name or ID
--remove-assignee <login>- Remove assigned users by their login. Use "@me" to unassign yourself.
--remove-label <name>- Remove labels by name
--remove-milestone- Remove the milestone association from the pull request
--remove-reviewer <login>- Remove reviewers by their login or org/team name
-t,--title <string>- Set the new title
Options inherited from parent commands¶
--host <string>- Target Copia host
-R,--repo <string>- Select repository (owner/repo)
--token <string>- Authentication token
Examples¶
# Change the title and the base branch
$ copia-cli pr edit 7 --title "Add conveyor interlock" \
--base develop
# Replace the body from a file, or from standard input with -
$ copia-cli pr edit 7 --body-file description.md
# Change labels, assignees and reviewers
$ copia-cli pr edit 7 --add-label plc --remove-label wip \
--add-assignee @me
$ copia-cli pr edit 7 --add-reviewer jane \
--remove-reviewer my-org/controls
# Set or clear the milestone
$ copia-cli pr edit https://app.copia.io/my-org/my-repo/pulls/7 \
--milestone v1.0
$ copia-cli pr edit 7 --remove-milestone