Code Storage now has a first-class API for fetching commit metadata without computing a diff.
Pass a full SHA, short SHA, or branch name to resolve a commit and get the same metadata shape
returned by listCommits: SHA, message, author, committer, and commit date.
const { commit } = await repo.getCommit({
sha: 'main',
});commit = await repo.get_commit(
sha="main",
)commit, err := repo.GetCommit(ctx, storage.GetCommitOptions{
SHA: "main",
})This is useful when you already have a ref or SHA and need to hydrate a commit detail view, verify the resolved commit, or read author and committer metadata without pulling commit history or diff contents.
TypeScript, Python, and Go SDKs all support getCommit.