@usine/core/repository
Type Aliases
Section titled “Type Aliases”CommitSha
Section titled “CommitSha”CommitSha = typeof
CommitSha.Type
An exact Git commit recorded for a checkout or produced by an Attempt, unchanged when branch names move.
RepositoryName
Section titled “RepositoryName”RepositoryName = typeof
RepositoryName.Type
Full owner/name of a GitHub repository, in the casing the operator wrote.
Compare through canonicalRepositoryName, since GitHub ignores case.
RepositoryRevision
Section titled “RepositoryRevision”RepositoryRevision = typeof
RepositoryRevision.Type
The branch, tag, commit, or HEAD a Worker fetches when preparing an Attempt; named refs resolve at preparation time.
Variables
Section titled “Variables”canonicalRepositoryName
Section titled “canonicalRepositoryName”
constcanonicalRepositoryName: (repository) =>string
Lowercases a repository name for comparison, since GitHub ignores case.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
repository |
RepositoryName |
Returns
Section titled “Returns”string
CommitSha
Section titled “CommitSha”
constCommitSha:Schema.brand<Schema.String,"CommitSha">
An exact Git commit recorded for a checkout or produced by an Attempt, unchanged when branch names move.
RepositoryName
Section titled “RepositoryName”
constRepositoryName:Schema.brand<Schema.String,"RepositoryName">
Full owner/name of a GitHub repository, in the casing the operator wrote.
Compare through canonicalRepositoryName, since GitHub ignores case.
RepositoryRevision
Section titled “RepositoryRevision”
constRepositoryRevision:Schema.brand<Schema.String,"RepositoryRevision">
The branch, tag, commit, or HEAD a Worker fetches when preparing an Attempt; named refs resolve at preparation time.
safeSegment
Section titled “safeSegment”
constsafeSegment: (value) =>string
Renders an identity as one path or ref segment: every character outside [A-Za-z0-9_.-] becomes _.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
value |
string |
Returns
Section titled “Returns”string
splitRepositoryName
Section titled “splitRepositoryName”
constsplitRepositoryName: (repository) =>object
Splits a repository name into its owner and name.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
repository |
RepositoryName |
Returns
Section titled “Returns”object
readonlyname:string
readonlyowner:string