Allow diff generation to specify extra_data for a review request.

Review Request #12253 — Created April 22, 2022 and submitted

Information

RBTools
release-3.x

Reviewers

SCMClient.diff() can now return a review_request_extra_data
dictionary containing state to store on the review request's
extra_data.

If posting a brand-new review request, this will be stored directly on
the review request. If updating an existing one, this will be stored on
the draft.

This can be useful for storing metadata that should show up in fields on
a review request, or for providing metadata that can be used for
enhanced matching of review requests when using rbt post -u (a
feature coming for RBTools 3.1 in an upcoming change).

The data will be sent to Review Board through a JSON Merge Patch.

Unit tests pass for all supported versions of Python.

Modified the Git diff output to include some nested metadata and posted
locally. Verified the results in the posted review request, and then in the
draft.

Tested an earlier version of this with the SOS work, verifying that the data
got into the review request and was displayed in the custom fields.

Summary ID
Allow diff generation to specify extra_data for a review request.
`SCMClient.diff()` can now return a `review_request_extra_data` dictionary containing state to store on the review request's ``extra_data``. If posting a brand-new review request, this will be stored directly on the review request. If updating an existing one, this will be stored on the draft. This can be useful for storing metadata that should show up in fields on a review request, or for providing metadata that can be used for enhanced matching of review requests when using `rbt post -u` (a feature coming for RBTools 3.1 in an upcoming change). The data will be sent to Review Board through a JSON Merge Patch.
2d14cb2c946112491af8c936da2aa9074ee2c371
Description From Last Updated

F401 'json' imported but unused

reviewbotreviewbot

E501 line too long (80 > 79 characters)

reviewbotreviewbot

This is big. Can we reformat with one parameter per line?

daviddavid

Can we reformat with one parameter per line?

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

flake8

chipx86
david
  1. 
      
  2. rbtools/commands/tests/test_post.py (Diff revision 2)
     
     
     
     
    Show all issues

    This is big. Can we reformat with one parameter per line?

  3. rbtools/commands/tests/test_post.py (Diff revision 2)
     
     
     
     
     
     
    Show all issues

    Can we reformat with one parameter per line?

  4. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to release-3.x (e688ce0)