BranchName

com.worxbend.codeberg4s.repositories.BranchName$package.BranchName
object BranchName

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
BranchName.type

Members list

Value members

Concrete methods

def from(value: String): Either[ValidationError, BranchName]

Parses a branch name.

Parses a branch name.

Trims surrounding whitespace. Rejects a blank name, a control character, a leading or trailing /, an empty segment (a//b), and a . or .. segment. Git rejects all of those as ref names too, so nothing valid is lost.

Attributes

Returns

the trimmed name, or a ValidationError on the "branch" field

Extensions

Extensions

extension (branch: BranchName)
def segments: List[String]

The name split on /, for appending to a request path one segment at a time.

The name split on /, for appending to a request path one segment at a time.

A slashed branch name must not be percent-encoded into a single segment — see the type's own note.

Attributes

def value: String

The name as Forgejo spells it, slashes included.

The name as Forgejo spells it, slashes included.

Attributes