Add the `rbt review` command.

Review Request #11883 — Created Nov. 24, 2021 and updated

david
RBTools
master
11882
rbtools

This change adds a new RBTools command for creating and editing reviews.
This uses the new MultiCommand subclass in order to provide a variety
of functionality within a single command:

  • rbt review edit will create or edit a draft review.
  • rbt review discard will discard a draft review.
  • rbt review publish will publish a draft review.
  • rbt review add-diff-comment will add a new diff comment.
  • rbt review add-file-attachment-comment will add a new file
    attachment comment.
  • rbt review add-general-comment will add a new general comment.

Based on work by Anahita Mohapatra at /r/11502/.

Ran through manual test cases for each of the review subcommands:
- Creating a new review with various content.
- Editing an existing draft review.
- Creating general comments (both markdown and plain)
- Creating file attachment comments (both markdown and plain)
- Creating diff comments (markdown and plain, single- and multi-line).
- Discarding a draft review.
- Publishing a draft review.
- Tested validation and error handling (file attachment IDs, diff
filenames, diff revisions)

Summary
Add the `rbt review` command.
Description From Last Updated

F401 'argparse' imported but unused

reviewbotreviewbot

F401 'sys' imported but unused

reviewbotreviewbot

F401 'six' imported but unused

reviewbotreviewbot

F841 local variable 'file_attachment' is assigned to but never used

reviewbotreviewbot

F841 local variable 'e' is assigned to but never used

reviewbotreviewbot
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

david
Review request changed

Commits:

Summary
-
Add the `rbt review` command.
+
Add the `rbt review` command.

Diff:

Revision 2 (+990)

Show changes

Checks run (2 succeeded)

flake8 passed.
JSHint passed.
Loading...