Closes#571. Adds three pieces:
- 'tea pulls create --reviewer <user>[,<user>...] [--team-reviewer <team>...]'
to request reviews at PR-creation time (passes through to
CreatePullRequestOption.Reviewers / TeamReviewers).
- 'tea pulls request-review <idx> [<idx>...]' / 'tea pulls cancel-review ...'
subcommands wrapping POST/DELETE /requested_reviewers, with both
--reviewer and --team-reviewer CSV flags.
- 'tea pulls reviewers' listing subcommand (GET /reviewers) so users can
discover who can be requested before they invoke the above.
The WIP/draft toggle was deliberately deferred: upstream main already
exposes 'tea pulls create --draft' and 'tea pulls edit --draft/--ready'
(PR #1008), so this patch stays focused on reviewer support only.
Verification:
make fmt fmt-check vet lint test docs docs-check build
./tea pulls create --help / request-review --help / cancel-review --help / reviewers --help
Signed-off-by: Ross Golder <ross@golder.org>
this is a partial fix to #378, making the command available outside of a local repo.
new behaviour:
- when run interactively without local repo context, the head repo prompt is not pre-populated
- when run with flags without local repo context, it will complain unless `--head` is specified
refactor:
- pass TeaContext down to task.CreatePull
Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/393
Reviewed-by: Alexey 〒erentyev <axifive@noreply.gitea.io>
Reviewed-by: 6543 <6543@obermui.de>
Co-authored-by: Norwin <noerw@noreply.gitea.io>
Co-committed-by: Norwin <noerw@noreply.gitea.io>