Retrieves a specific commit by hash, tag, or "latest" for a repository.
func (
r *CommitService) Get(ctx context.Context,
owner string,
repo string,
commit string,
query CommitGetParams,
opts ...option.RequestOption) (res *CommitGetResponse,
err error
)Retrieves a specific commit by hash, tag, or "latest" for a repository. This endpoint supports both authenticated and unauthenticated access. Authenticated users can access private repos, while unauthenticated users can only access public repos. Commit resolution logic:
| Name | Type | Description |
|---|---|---|
ctx* | context.Context | |
owner* | string | |
repo* | string | |
commit* | string | |
query* | CommitGetParams | |
opts* | ...option.RequestOption |