Skip to main content

Module commits

Module commits 

Source
Expand description

Commits API with correct anyOf union handling for file operations.

The OpenAPI code generator flattens anyOf request variants into a single struct with every field required, which produces an incorrect request body (openapi-generator#9497).

This module provides a hand-written CommitFile enum that correctly serializes each file operation variant (upsert, delete, LFS) and a create_commit wrapper that builds the request manually.

The GET endpoints (list / get commit) in crate::low_level::apis::commits_api work correctly and are not wrapped here.

Structs§

CommitResponse
Successful response from create_commit.

Enums§

CommitFile
A file operation within a commit.
CreateCommitError
Typed errors returned by create_commit. struct for typed errors of method post_by_org_by_repo_commits
Encoding
Encoding for upsert file content.

Functions§

create_commit
Programmatically create a commit with file operations.

Type Aliases§

CommitAuthor
Commit author / committer identity.