Options
Commit SHA to fetch metadata for. Any revision Git can resolve is accepted (full SHA, short SHA, branch name, tag).
Response
Commit metadata. Extends the shape returned by
listCommits() with two
signature fields that are only populated on this single-commit endpoint:shamessageauthorName,authorEmailcommitterName,committerEmaildate(parsedDatein TypeScript,datetimein Python,time.Timein Go)rawDate(RFC 3339 string as returned by the server)signature— the armored signature taken from the commit’s signature header. Omitted for unsigned commits.payload— the exact bytes the signature is computed over. Omitted for unsigned commits.
signature/payload pair mirrors GitHub’s commit verification object, so you can verify a signature yourself by checking signature against payload:
TypeScript
Notes
- This endpoint does not compute or return the commit diff. Use
getCommitDiff()when you need file changes as well. - For listing many commits at once, prefer
listCommits()— the per-commit shape is identical except thatsignatureandpayloadare only returned bygetCommit(). signatureandpayloadlet clients verify commit signatures independently. The server enforces signatures at push time through theverify-sigbranch-protection policy.