dev.knotless.createCommit

Fails with 409 when a change touches a path that moved since `base`, or when the branch kept moving under the batch.

Details · procedure
Kindprocedure
Authorityknotless.dev
Indexed

Procedure

procedure · POST

Input

application/json
Reference

base

string

The hex object ID of the commit the changes were made against. Without it the changes apply to whatever the branch holds.

  • minLength: 40
  • maxLength: 64

branch

requiredstring

Without refs/heads/. Created when absent, from `base`, or else from the default branch's tip.

  • maxLength: 255

changes

requiredarray
itemsref
Reference

message

requiredstring
  • maxLength: 20000

name

requiredstring

The repository's name: its dev.knotless.repo record key.

  • maxLength: 100

repo

requiredstring · did

The repository's owner.

Output

application/json

batched

requiredinteger

How many commits went out in the write that carried this one.

  • minimum: 0

changed

requiredboolean

False when the changes left the tree as it was, and no commit was made.

parent

string

The hex object ID the commit was built on; absent for a branch's first commit.

  • minLength: 40
  • maxLength: 64

sha

requiredstring

The hex object ID of the commit, or of the branch tip when nothing changed.

  • minLength: 40
  • maxLength: 64

#author

object

Who the commit names as its author, when not the gateway's default.

Properties

email

requiredstring
  • maxLength: 1000

name

requiredstring
  • maxLength: 1000

#change

object

One path written, edited or deleted.

Properties

data

bytes

The file's new contents; absent, with no `edits`, to delete it.

edits

array

Replacements in the file as the commit's parent holds it, made in order, when `data` is absent. The file keeps its mode. Fails with 409 when one's `old` is not in the file exactly once.

itemsref
Reference

executable

boolean
  • default: false

path

requiredstring

Relative to the repository root.

  • maxLength: 4096

#edit

object

One replacement in a text file.

Properties

new

requiredstring

What takes its place.

  • maxLength: 20000

old

requiredstring

Text the file holds exactly once.

  • minLength: 1
  • maxLength: 20000

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.

  • Pushes to a repository through a gateway its owner has delegated writes to: the gateway checks the caller is the owner or a collaborator, then writes the pack and ref updates as the owner. Requires a service token from the caller's PDS, audience the gateway's DID, for this method.

  • Creates a branch of a repository.