PayloadCommitDto

com.worxbend.codeberg4s.repositories.wire.PayloadCommitDto
See thePayloadCommitDto companion object
final case class PayloadCommitDto(id: Option[String], message: Option[String], url: Option[String], author: Option[GitIdentityDto], committer: Option[GitIdentityDto], verification: Option[VerificationDto], timestamp: Option[String], added: Vector[String], removed: Vector[String], modified: Vector[String])

Forgejo's PayloadCommit — the commit object a branch carries.

Not the same model as CommitDto, however similar it reads: this one identifies the commit as id, its author and committer are Git identities rather than accounts, and it carries added, removed and modified file lists instead of files and stats. Those three arrive as JSON null on both branch captures, which is exactly the shape com.worxbend.codeberg4s.codec.JsonFields exists to absorb — a derived codec would abort on them.

Value parameters

added

the added key; empty when the instance sends null, which it does on both captures

author

the author key

committer

the committer key

id

the id key: the commit's object id

message

the message key

modified

the modified key, same caveat

removed

the removed key, same caveat

timestamp

the timestamp key as a raw string

url

the url key

verification

the verification key

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

Converts to the domain, reporting failure paths relative to at.

Converts to the domain, reporting failure paths relative to at.

Fails only on id, which is both the commit's identity and a value com.worxbend.codeberg4s.repositories.CommitSha.from validates as hexadecimal. The three file lists have no domain counterpart: they describe a webhook payload's diff and are always null on the branch endpoints, so carrying them into com.worxbend.codeberg4s.repositories.CommitSummary would promise data that never arrives.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product