HomePhabricator

Add commit metadata to api response and flag for onlymetadata

Description

Add commit metadata to api response and flag for onlymetadata

  • The blocks were already passing metadata back but it became unused at some point in time. Added this metadata to POST api responses as the committed top level key.
  • Adds a new flag, onlymetadata, to skip returning the bulk of the api response for bots that dont care. Unsure how to properly document this for discoverability.
  • Updated the commit metadata returned by the blocks. Everything was prefixed with new-, so stripped that. It would have been nice to return revision-id from everything, but some blocks like topic need to return multiple revision ids. For consistency everything is now in the form of: post-revision-id, topic-revision-id, header-revision-id, etc.

Fixes T78746

Bug: T78746
Change-Id: I175587314ad0db01f32a522b3d7c58fe17c8b82d