The Commits API does not return git trailers for individual commits
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
Summary
- The Commits API mentions support for git trailers
- Trailers are returned for the 'List repository commits' endpoint when
?trailers=true
, but they are not populated on the 'Get a single commit' endpoint (nor are they mentioned in the example output😅 )
Steps to reproduce
- Create a commit for a repository using
--trailer
- For example:
git commit -m "initial commit" --trailer "signed-off-by: testEmail@example.com"
- Request the commits for the repository with
?trailers=true
set. Example output:
{
"id": "d4a783e28b755b8873618d1091f4aa41ddf392f6",
"short_id": "d4a783e2",
"created_at": "2025-08-04T10:32:00.000+09:30",
"parent_ids": [
"cf66bfdef352225a96a4a1f3550a7cc4bd03f894"
],
"title": "initial commit",
"message": "initial commit\n\nsigned-off-by: testEmail@example.com\n",
....
"committer_email": "redacted@labgit",
"committed_date": "2025-08-04T10:32:00.000+09:30",
"trailers": {
"signed-off-by": "testEmail@example.com"
},
"extended_trailers": {
"signed-off-by": [
"testEmail@example.com"
]
},
....
]
- Note that
trailers
andextended_trailers
are populated. - Using the
id
for the commit, attempt to get a single commit (It does not appear to matter if?trailers=true
is appended):
{
"id": "d4a783e28b755b8873618d1091f4aa41ddf392f6",
"short_id": "d4a783e2",
"created_at": "2025-08-04T10:32:00.000+09:30",
"parent_ids": [
"cf66bfdef352225a96a4a1f3550a7cc4bd03f894"
],
"title": "initial commit",
"message": "initial commit\n\nsigned-off-by: testEmail@example.com\n",
....
"authored_date": "2025-08-04T10:32:00.000+09:30",
"committer_name": "Tom McAtee",
"committer_email": "redacted@labgit",
"committed_date": "2025-08-04T10:32:00.000+09:30",
"trailers": {
},
"extended_trailers": {
},
...
}
- Observe that
trailers
andextended_trailers
are not set
Example Project
- Internal-only: I have reproduced this behaviour in this sandbox project
What is the current bug behavior?
- The
trailers
/extended_trailers
attributes are not populated on single commit API responses, but are populated on responses from the 'List repository commits' endpoint
What is the expected correct behavior?
- The
trailers
/extended_trailers
attributes should be populated (when existent) on responses from both endpoints
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Possible fixes
Edited by 🤖 GitLab Bot 🤖