Add an extended_trailers field to the commits API
What does this MR do and why?
Adds a new field to the commits API that returns correctly-parsed commit trailers. The existing field only returns the last value for each key, which is certainly unintentional, but has been the case for a long time and so this could be considered a breaking change. For now we'll introduce this as a new field and then start to deprecate the old implementation.
Related #387555 (closed)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Push a commit with trailers in the message, ideally multiple, e.g. "Cc: John Doe", "Changelog: added" etc
- Call the commits API endpoint with the
trailers
param set totrue
-
trailers
andextended_trailers
should both exist in the response, and for instances where multiples of the same trailer key exist,trailers
will only show the last value andextended_trailers
will show them all
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Robert May