Skip to content

ChangeFileOperation

Import from pyfj or pyfj.models as ChangeFileOperation.

ChangeFileOperation

ChangeFileOperation for creating, updating or deleting a file

content

content: str | None = Field(default=None, description='new or updated file content, must be base64 encoded')

from_path

from_path: str | None = Field(default=None, description='old path of the file to move')

operation

operation: ChangeFileOperationOperation = Field(description='indicates what to do with the file')

path

path: str = Field(description='path to the existing or new file')

sha

sha: str | None = Field(
    default=None, description="sha is the SHA for the file that already exists, required for update or delete"
)

ChangeFileOperationOperation

indicates what to do with the file

CREATE

CREATE = 'create'

DELETE

DELETE = 'delete'

UPDATE

UPDATE = 'update'

Used by

Namespace Operations
repos.contents change_files