Skip to content

Add GetCommit API#20

Merged
unknwon merged 4 commits intomainfrom
jc/get-commit-api
May 1, 2026
Merged

Add GetCommit API#20
unknwon merged 4 commits intomainfrom
jc/get-commit-api

Conversation

@unknwon
Copy link
Copy Markdown
Contributor

@unknwon unknwon commented Apr 30, 2026

Description

SDK changes for the new API added in https://github.com/pierredotco/monorepo/pull/1216

Patch versions bumped for all 3 packages.

Test plan

Tested e2e locally for all 3 SDKs.

@unknwon
Copy link
Copy Markdown
Contributor Author

unknwon commented Apr 30, 2026

This change is part of the following stack:

Change managed by git-spice.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds client-side SDK support for the new GetCommit API across TypeScript, Python, and Go, and bumps patch versions for each package to ship the new endpoint.

Changes:

  • TypeScript SDK: add Repo.getCommit() types, schema validation, response transform, and README docs.
  • Python SDK: add Repo.get_commit() typing + implementation and README docs.
  • Go SDK: add Repo.GetCommit() types, response struct, implementation, and tests.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/code-storage-typescript/src/types.ts Adds GetCommitOptions/GetCommitResult and Repo.getCommit() to the TS public types.
packages/code-storage-typescript/src/schemas.ts Introduces getCommitResponseSchema and GetCommitResponseRaw type.
packages/code-storage-typescript/src/index.ts Implements RepoImpl.getCommit() and transforms the API response into CommitInfo.
packages/code-storage-typescript/package.json Bumps TS package version to 1.4.4.
packages/code-storage-typescript/README.md Documents repo.getCommit() usage and adds the new types to the README interface section.
packages/code-storage-python/uv.lock Bumps locked version to 1.5.4.
packages/code-storage-python/pyproject.toml Bumps Python package version to 1.5.4.
packages/code-storage-python/pierre_storage/version.py Updates PACKAGE_VERSION to 1.5.4.
packages/code-storage-python/pierre_storage/types.py Adds GetCommitResult and Repo.get_commit() to the typed interface.
packages/code-storage-python/pierre_storage/repo.py Implements Repo.get_commit() calling /repos/commit?sha=... and parsing commit metadata.
packages/code-storage-python/pierre_storage/init.py Exports GetCommitResult.
packages/code-storage-python/README.md Documents repo.get_commit() usage and adds the method to the README interface section.
packages/code-storage-go/version.go Bumps Go package version to 0.4.3.
packages/code-storage-go/types.go Adds GetCommitOptions and GetCommitResult.
packages/code-storage-go/responses.go Adds getCommitResponse response struct.
packages/code-storage-go/repo_test.go Adds tests for Repo.GetCommit() and missing SHA validation.
packages/code-storage-go/repo.go Implements Repo.GetCommit() calling repos/commit and mapping response into CommitInfo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/code-storage-typescript/src/index.ts
Comment thread packages/code-storage-python/pierre_storage/repo.py
@unknwon unknwon force-pushed the jc/get-commit-api branch from 5c5a98f to 11dbd10 Compare May 1, 2026 20:53
unknwon and others added 3 commits May 1, 2026 16:58
Cover sha trimming/required validation, request path and `sha` query
param, `git:read` scope, ttl override, and response parsing into
`CommitInfo`.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add the new GET /repos/commit row to the endpoint table and a dedicated
reference section so the skill stays in sync with the SDK surface.

Co-authored-by: Cursor <cursoragent@cursor.com>
Match the convention used by other GET endpoints (diff, file, branches/diff)
where the table lists the bare path and params live in the endpoint reference.

Co-authored-by: Cursor <cursoragent@cursor.com>
@unknwon unknwon marked this pull request as ready for review May 1, 2026 21:01
@unknwon unknwon requested review from cedricgc, fat and jcrosby May 1, 2026 21:01
@unknwon unknwon merged commit 2e6af42 into main May 1, 2026
3 checks passed
@unknwon unknwon deleted the jc/get-commit-api branch May 1, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants