• 
      

    Add POST support to the DiffFileAttachmentResource.

    Review Request #13544 — Created Feb. 16, 2024 and submitted

    Information

    Review Board
    release-7.x

    Reviewers

    This change adds the ability to upload files to attach to diffs via the
    DiffFileAttachmentResource. This was previously read-only in the API.

    • Ran unit tests.
    • Used this from RBTools.
    Summary ID
    Add POST support to the DiffFileAttachmentResource.
    This change adds the ability to upload files to attach to diffs via the `DiffFileAttachmentResource`. This was previously read-only in the API. Testing Done: - Ran unit tests. - Used this from RBTools.
    e2e06b2801fe4bc071f1f9e6addd7a3773114c5f
    Description From Last Updated

    continuation line unaligned for hanging indent Column: 33 Error code: E131

    reviewbotreviewbot

    'typing.Any' imported but unused Column: 1 Error code: F401

    reviewbotreviewbot

    'typing.Optional' imported but unused Column: 1 Error code: F401

    reviewbotreviewbot

    'typing.Tuple' imported but unused Column: 1 Error code: F401

    reviewbotreviewbot

    Should we put a "Version Changed" saying that we have POST support now?

    maubinmaubin

    Missing the rest of the docs (Version Added, Args, Returns).

    maubinmaubin

    Leftover debug code.

    maubinmaubin

    The code seems structured as: if not filediff: ... if filediff: ... It'd be some code movement, but can this …

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

    flake8

    david
    maubin
    1. 
        
    2. reviewboard/webapi/resources/diff_file_attachment.py (Diff revision 2)
       
       
       
       
       
       
       
       
       
       
       
       
      Show all issues

      Should we put a "Version Changed" saying that we have POST support now?

    3. Show all issues

      Missing the rest of the docs (Version Added, Args, Returns).

      1. We don't actually use those sections for API method (get/post/etc) docstrings because those get turned into our public-facing docs for the API. That said, I probably should flesh this out a bit :)

    4. Show all issues

      Leftover debug code.

    5. 
        
    david
    maubin
    1. Ship It!
    2. 
        
    chipx86
    1. 
        
    2. reviewboard/attachments/forms.py (Diff revision 3)
       
       
      Show all issues

      The code seems structured as:

      if not filediff:
          ...
      
      if filediff:
          ...
      

      It'd be some code movement, but can this just be an if/else?

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