Dagger
Search

feature-branch

This module has been generated via dagger init and serves as a reference to
basic module structure as you get started with Dagger.

Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.

The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.

Installation

dagger install github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4

Entrypoint

Return Type
FeatureBranch !
Arguments
NameTypeDefault ValueDescription
githubTokenSecret nullNo description provided
branchNameString -No description provided
isForkBoolean !falseNo description provided
branchDirectory -No description provided
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
 --is-fork boolean
func (m *myModule) example(isFork bool) *FeatureBranch  {
	return dag.
			FeatureBranch(isFork)
}
@function
def example(is_fork: bool, ) -> dag.FeatureBranch:
	return (
		dag.feature_branch(is_fork)
	)
@func()
example(isFork: boolean, ): FeatureBranch {
	return dag
		.featureBranch(isFork)
}

Types

FeatureBranch 🔗

Feature Branch module for GitHub development

githubToken() 🔗

Return Type
Secret 
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
 --is-fork boolean github-token
func (m *myModule) example(isFork bool) *Secret  {
	return dag.
			FeatureBranch(isFork).
			GithubToken()
}
@function
def example(is_fork: bool, ) -> dagger.Secret:
	return (
		dag.feature_branch(is_fork)
		.github_token()
	)
@func()
example(isFork: boolean, ): Secret {
	return dag
		.featureBranch(isFork)
		.githubToken()
}

branch() 🔗

Return Type
Directory 
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
 --is-fork boolean branch
func (m *myModule) example(isFork bool) *Directory  {
	return dag.
			FeatureBranch(isFork).
			Branch()
}
@function
def example(is_fork: bool, ) -> dagger.Directory:
	return (
		dag.feature_branch(is_fork)
		.branch()
	)
@func()
example(isFork: boolean, ): Directory {
	return dag
		.featureBranch(isFork)
		.branch()
}

create() 🔗

Returns a container that echoes whatever string argument is provided

Return Type
FeatureBranch !
Arguments
NameTypeDefault ValueDescription
upstreamString !-No description provided
branchNameString !-No description provided
forkNameString -No description provided
forkBoolean !falseNo description provided
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
 --is-fork boolean create --upstream string --branch-name string --fork boolean
func (m *myModule) example(isFork bool, upstream string, branchName string, fork bool) *FeatureBranch  {
	return dag.
			FeatureBranch(isFork).
			Create(upstream, branchName, fork)
}
@function
def example(is_fork: bool, upstream: str, branch_name: str, fork: bool) -> dag.FeatureBranch:
	return (
		dag.feature_branch(is_fork)
		.create(upstream, branch_name, fork)
	)
@func()
example(isFork: boolean, upstream: string, branchName: string, fork: boolean): FeatureBranch {
	return dag
		.featureBranch(isFork)
		.create(upstream, branchName, fork)
}

env() 🔗

Return Type
Container !
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
 --is-fork boolean env
func (m *myModule) example(isFork bool) *Container  {
	return dag.
			FeatureBranch(isFork).
			Env()
}
@function
def example(is_fork: bool, ) -> dagger.Container:
	return (
		dag.feature_branch(is_fork)
		.env()
	)
@func()
example(isFork: boolean, ): Container {
	return dag
		.featureBranch(isFork)
		.env()
}

fork() 🔗

Forks a repository

Return Type
FeatureBranch !
Arguments
NameTypeDefault ValueDescription
upstreamString !-No description provided
forkNameString -No description provided
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
 --is-fork boolean fork --upstream string
func (m *myModule) example(isFork bool, upstream string) *FeatureBranch  {
	return dag.
			FeatureBranch(isFork).
			Fork(upstream)
}
@function
def example(is_fork: bool, upstream: str) -> dag.FeatureBranch:
	return (
		dag.feature_branch(is_fork)
		.fork(upstream)
	)
@func()
example(isFork: boolean, upstream: string): FeatureBranch {
	return dag
		.featureBranch(isFork)
		.fork(upstream)
}

getRemoteUrl() 🔗

Returns a remotes url

Return Type
String !
Arguments
NameTypeDefault ValueDescription
remoteString !-No description provided
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
 --is-fork boolean get-remote-url --remote string
func (m *myModule) example(ctx context.Context, isFork bool, remote string) string  {
	return dag.
			FeatureBranch(isFork).
			GetRemoteUrl(ctx, remote)
}
@function
async def example(is_fork: bool, remote: str) -> str:
	return await (
		dag.feature_branch(is_fork)
		.get_remote_url(remote)
	)
@func()
async example(isFork: boolean, remote: string): Promise<string> {
	return dag
		.featureBranch(isFork)
		.getRemoteUrl(remote)
}

pullRequest() 🔗

Creates a pull request on the branch with the provided title and body

Return Type
String !
Arguments
NameTypeDefault ValueDescription
titleString !-No description provided
bodyString !-No description provided
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
 --is-fork boolean pull-request --title string --body string
func (m *myModule) example(ctx context.Context, isFork bool, title string, body string) string  {
	return dag.
			FeatureBranch(isFork).
			PullRequest(ctx, title, body)
}
@function
async def example(is_fork: bool, title: str, body: str) -> str:
	return await (
		dag.feature_branch(is_fork)
		.pull_request(title, body)
	)
@func()
async example(isFork: boolean, title: string, body: string): Promise<string> {
	return dag
		.featureBranch(isFork)
		.pullRequest(title, body)
}

withChanges() 🔗

Apply a directory of changes to the branch

Return Type
FeatureBranch !
Arguments
NameTypeDefault ValueDescription
changesDirectory !-A directory.
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
 --is-fork boolean with-changes --changes DIR_PATH
func (m *myModule) example(isFork bool, changes *Directory) *FeatureBranch  {
	return dag.
			FeatureBranch(isFork).
			WithChanges(changes)
}
@function
def example(is_fork: bool, changes: dagger.Directory) -> dag.FeatureBranch:
	return (
		dag.feature_branch(is_fork)
		.with_changes(changes)
	)
@func()
example(isFork: boolean, changes: Directory): FeatureBranch {
	return dag
		.featureBranch(isFork)
		.withChanges(changes)
}

withGithubToken() 🔗

Sets the GitHub token

Return Type
FeatureBranch !
Arguments
NameTypeDefault ValueDescription
tokenSecret !-A reference to a secret value, which can be handled more safely than the value itself.
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
 --is-fork boolean with-github-token --token env:MYSECRET
func (m *myModule) example(isFork bool, token *Secret) *FeatureBranch  {
	return dag.
			FeatureBranch(isFork).
			WithGithubToken(token)
}
@function
def example(is_fork: bool, token: dagger.Secret) -> dag.FeatureBranch:
	return (
		dag.feature_branch(is_fork)
		.with_github_token(token)
	)
@func()
example(isFork: boolean, token: Secret): FeatureBranch {
	return dag
		.featureBranch(isFork)
		.withGithubToken(token)
}