gitter
including setting repository details and performing actions like checkout and inspect.Installation
dagger install github.com/dictybase-docker/dagger-of-dcr/gitter@c345521a07590bc77a0680c988607d1fe93cf24a
Entrypoint
Return Type
Gitter
Example
func (m *myModule) example() *dagger.Gitter {
return dag.
Gitter()
}
Types
Gitter 🔗
repository() 🔗
Repository name
Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string {
return dag.
Gitter().
Repository(ctx)
}
ref() 🔗
Git reference
Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string {
return dag.
Gitter().
Ref(ctx)
}
path() 🔗
Repository path
Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string {
return dag.
Gitter().
Path(ctx)
}
withRef() 🔗
WithRef sets the Git reference (branch, tag, or SHA)
Return Type
Gitter !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ref | String ! | - | the branch, tag or sha to checkout, Required. |
Example
func (m *myModule) example(ref string) *dagger.Gitter {
return dag.
Gitter().
WithRef(ref)
}
withRepository() 🔗
WithRepository sets the GitHub repository name
Return Type
Gitter !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
repository | String ! | - | github repository name with owner, for example tora/bora, Required |
Example
func (m *myModule) example(repository string) *dagger.Gitter {
return dag.
Gitter().
WithRepository(repository)
}
checkout() 🔗
Checkout clones the repository and checks out the specific ref
Return Type
Directory !
Example
func (m *myModule) example() *dagger.Directory {
return dag.
Gitter().
Checkout()
}
commitHash() 🔗
CommitHash retrieves the short commit hash of the HEAD from the specified Git repository.
Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string {
return dag.
Gitter().
CommitHash(ctx)
}
inspect() 🔗
Inspect clones the given repository and returns a Terminal instance for inspection
Return Type
Terminal !
Example
func (m *myModule) example() *dagger.Terminal {
return dag.
Gitter().
Inspect()
}
parseRef() 🔗
ParseRef extracts the branch name from a Git reference string or returns the original reference if no match is found.
Return Type
String !
Example
func (m *myModule) example(ctx context.Context) string {
return dag.
Gitter().
ParseRef(ctx)
}