Skip to content

PutContentsInput

Defined in: git/git.ts:120

The body of a putContents() request.

optional branch?: string

Defined in: git/git.ts:132

Defaults to the repo’s default branch.


content: string

Defined in: git/git.ts:124

The new file text (UTF-8); the client encodes it.


message: string

Defined in: git/git.ts:122

The commit message.


optional sha?: string

Defined in: git/git.ts:130

The blob sha of the file being replaced, from getContents. Required to update an existing file, and omitted to create one. This is what makes the write safe: if someone changed the file since it was read, GitHub refuses (409) instead of overwriting, so the caller can read again and retry.