feature-branch
This module has been generated via dagger init and serves as a reference tobasic 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@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4Entrypoint
Return Type
FeatureBranch !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| githubToken | Secret | null | No description provided |
| branchName | String | - | No description provided |
| isFork | Boolean ! | false | No description provided |
| branch | Directory | - | No description provided |
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
--is-fork booleanfunc (m *MyModule) Example(isFork bool) *dagger.FeatureBranch {
return dag.
FeatureBranch(isFork)
}@function
def example(is_fork: bool, ) -> dagger.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-tokenfunc (m *MyModule) Example(isFork bool) *dagger.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 branchfunc (m *MyModule) Example(isFork bool) *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| upstream | String ! | - | No description provided |
| branchName | String ! | - | No description provided |
| forkName | String | - | No description provided |
| fork | Boolean ! | false | No description provided |
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
--is-fork boolean create --upstream string --branch-name string --fork booleanfunc (m *MyModule) Example(isFork bool, upstream string, branchName string, fork bool) *dagger.FeatureBranch {
return dag.
FeatureBranch(isFork).
Create(upstream, branchName, fork)
}@function
def example(is_fork: bool, upstream: str, branch_name: str, fork: bool) -> dagger.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 envfunc (m *MyModule) Example(isFork bool) *dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| upstream | String ! | - | No description provided |
| forkName | String | - | No description provided |
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
--is-fork boolean fork --upstream stringfunc (m *MyModule) Example(isFork bool, upstream string) *dagger.FeatureBranch {
return dag.
FeatureBranch(isFork).
Fork(upstream)
}@function
def example(is_fork: bool, upstream: str) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| remote | String ! | - | No description provided |
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
--is-fork boolean get-remote-url --remote stringfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| title | String ! | - | No description provided |
| body | String ! | - | No description provided |
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
--is-fork boolean pull-request --title string --body stringfunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| changes | Directory ! | - | A directory. |
Example
dagger -m github.com/kpenfound/feature-branch@71d63322bf9979eb97b9e5d1457a3dcba4ef0ec4 call \
--is-fork boolean with-changes --changes DIR_PATHfunc (m *MyModule) Example(isFork bool, changes *dagger.Directory) *dagger.FeatureBranch {
return dag.
FeatureBranch(isFork).
WithChanges(changes)
}@function
def example(is_fork: bool, changes: dagger.Directory) -> dagger.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
| Name | Type | Default Value | Description |
|---|---|---|---|
| token | Secret ! | - | 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:MYSECRETfunc (m *MyModule) Example(isFork bool, token *dagger.Secret) *dagger.FeatureBranch {
return dag.
FeatureBranch(isFork).
WithGithubToken(token)
}@function
def example(is_fork: bool, token: dagger.Secret) -> dagger.FeatureBranch:
return (
dag.feature_branch(is_fork)
.with_github_token(token)
)@func()
example(isFork: boolean, token: Secret): FeatureBranch {
return dag
.featureBranch(isFork)
.withGithubToken(token)
}