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/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3dEntrypoint
Return Type
FeatureBranch !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| githubToken | Secret ! | - | No description provided |
| repoUrl | String ! | - | No description provided |
| branchName | String ! | - | No description provided |
Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name stringfunc (m *MyModule) Example(githubToken *dagger.Secret, repoUrl string, branchName string) *dagger.FeatureBranch {
return dag.
FeatureBranch(githubToken, repoUrl, branchName)
}@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str) -> dagger.FeatureBranch:
return (
dag.feature_branch(github_token, repo_url, branch_name)
)@func()
example(githubToken: Secret, repoUrl: string, branchName: string): FeatureBranch {
return dag
.featureBranch(githubToken, repoUrl, branchName)
}Types
FeatureBranch 🔗
ctr() 🔗
Return Type
Container ! Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string ctrfunc (m *MyModule) Example(githubToken *dagger.Secret, repoUrl string, branchName string) *dagger.Container {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
Ctr()
}@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str) -> dagger.Container:
return (
dag.feature_branch(github_token, repo_url, branch_name)
.ctr()
)@func()
example(githubToken: Secret, repoUrl: string, branchName: string): Container {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.ctr()
}branchName() 🔗
Return Type
String ! Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string branch-namefunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repoUrl string, branchName string) string {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
BranchName(ctx)
}@function
async def example(github_token: dagger.Secret, repo_url: str, branch_name: str) -> str:
return await (
dag.feature_branch(github_token, repo_url, branch_name)
.branch_name()
)@func()
async example(githubToken: Secret, repoUrl: string, branchName: string): Promise<string> {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.branchName()
}changes() 🔗
Return Type
Directory ! Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string changesfunc (m *MyModule) Example(githubToken *dagger.Secret, repoUrl string, branchName string) *dagger.Directory {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
Changes()
}@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str) -> dagger.Directory:
return (
dag.feature_branch(github_token, repo_url, branch_name)
.changes()
)@func()
example(githubToken: Secret, repoUrl: string, branchName: string): Directory {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.changes()
}withNewUniqueBranchName() 🔗
Set the branch name to a new unique name
Return Type
FeatureBranch ! Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string with-new-unique-branch-namefunc (m *MyModule) Example(githubToken *dagger.Secret, repoUrl string, branchName string) *dagger.FeatureBranch {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
WithNewUniqueBranchName()
}@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str) -> dagger.FeatureBranch:
return (
dag.feature_branch(github_token, repo_url, branch_name)
.with_new_unique_branch_name()
)@func()
example(githubToken: Secret, repoUrl: string, branchName: string): FeatureBranch {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.withNewUniqueBranchName()
}withChanges() 🔗
Set changeset of the feature branch
Return Type
FeatureBranch !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| changes | Directory ! | - | No description provided |
Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string with-changes --changes DIR_PATHfunc (m *MyModule) Example(githubToken *dagger.Secret, repoUrl string, branchName string, changes *dagger.Directory) *dagger.FeatureBranch {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
WithChanges(changes)
}@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str, changes: dagger.Directory) -> dagger.FeatureBranch:
return (
dag.feature_branch(github_token, repo_url, branch_name)
.with_changes(changes)
)@func()
example(githubToken: Secret, repoUrl: string, branchName: string, changes: Directory): FeatureBranch {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.withChanges(changes)
}diff() 🔗
Diff the changeset of the feature branch
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| namesOnly | Boolean ! | - | No description provided |
Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string diff --names-only booleanfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repoUrl string, branchName string, namesOnly bool) string {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
Diff(ctx, namesOnly)
}@function
async def example(github_token: dagger.Secret, repo_url: str, branch_name: str, names_only: bool) -> str:
return await (
dag.feature_branch(github_token, repo_url, branch_name)
.diff(names_only)
)@func()
async example(githubToken: Secret, repoUrl: string, branchName: string, namesOnly: boolean): Promise<string> {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.diff(namesOnly)
}commit() 🔗
Commit the changes
Return Type
FeatureBranch !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| message | String ! | - | No description provided |
Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string commit --message stringfunc (m *MyModule) Example(githubToken *dagger.Secret, repoUrl string, branchName string, message string) *dagger.FeatureBranch {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
Commit(message)
}@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str, message: str) -> dagger.FeatureBranch:
return (
dag.feature_branch(github_token, repo_url, branch_name)
.commit(message)
)@func()
example(githubToken: Secret, repoUrl: string, branchName: string, message: string): FeatureBranch {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.commit(message)
}push() 🔗
Push the changes to the remote branch
Return Type
FeatureBranch ! Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string pushfunc (m *MyModule) Example(githubToken *dagger.Secret, repoUrl string, branchName string) *dagger.FeatureBranch {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
Push()
}@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str) -> dagger.FeatureBranch:
return (
dag.feature_branch(github_token, repo_url, branch_name)
.push()
)@func()
example(githubToken: Secret, repoUrl: string, branchName: string): FeatureBranch {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.push()
}createPullRequest() 🔗
Opens a Pull Request on GitHub
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| title | String ! | - | No description provided |
| body | String ! | - | No description provided |
| draft | Boolean ! | - | No description provided |
Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string create-pull-request --title string --body string --draft booleanfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repoUrl string, branchName string, title string, body string, draft bool) string {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
CreatePullRequest(ctx, title, body, draft)
}@function
async def example(github_token: dagger.Secret, repo_url: str, branch_name: str, title: str, body: str, draft: bool) -> str:
return await (
dag.feature_branch(github_token, repo_url, branch_name)
.create_pull_request(title, body, draft)
)@func()
async example(githubToken: Secret, repoUrl: string, branchName: string, title: string, body: string, draft: boolean): Promise<string> {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.createPullRequest(title, body, draft)
}createPullRequestWithLlm() 🔗
Opens a Pull Request on GitHub, with the help of an LLM
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| additionalContext | String ! | - | No description provided |
Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string create-pull-request-with-llm --additional-context stringfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repoUrl string, branchName string, additionalContext string) string {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
CreatePullRequestWithLlm(ctx, additionalContext)
}@function
async def example(github_token: dagger.Secret, repo_url: str, branch_name: str, additional_context: str) -> str:
return await (
dag.feature_branch(github_token, repo_url, branch_name)
.create_pull_request_with_llm(additional_context)
)@func()
async example(githubToken: Secret, repoUrl: string, branchName: string, additionalContext: string): Promise<string> {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.createPullRequestWithLlm(additionalContext)
}checkoutPullRequest() 🔗
Checkout a Pull Request code Query is any argument supported by the gh cli (gh pr checkout [ | | ])
Return Type
FeatureBranch !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| query | String ! | - | No description provided |
Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string checkout-pull-request --query stringfunc (m *MyModule) Example(githubToken *dagger.Secret, repoUrl string, branchName string, query string) *dagger.FeatureBranch {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
CheckoutPullRequest(query)
}@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str, query: str) -> dagger.FeatureBranch:
return (
dag.feature_branch(github_token, repo_url, branch_name)
.checkout_pull_request(query)
)@func()
example(githubToken: Secret, repoUrl: string, branchName: string, query: string): FeatureBranch {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.checkoutPullRequest(query)
}getPullRequestBodyTitle() 🔗
Get the body of a Pull Request, returns title, body in a slice
Return Type
[String ! ] ! Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string get-pull-request-body-titlefunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repoUrl string, branchName string) []string {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
GetPullRequestBodyTitle(ctx)
}@function
async def example(github_token: dagger.Secret, repo_url: str, branch_name: str) -> List[str]:
return await (
dag.feature_branch(github_token, repo_url, branch_name)
.get_pull_request_body_title()
)@func()
async example(githubToken: Secret, repoUrl: string, branchName: string): Promise<string[]> {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.getPullRequestBodyTitle()
}getPullRequestDiff() 🔗
Get the diff of a Pull Request
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| query | String ! | - | No description provided |
Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string get-pull-request-diff --query stringfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repoUrl string, branchName string, query string) string {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
GetPullRequestDiff(ctx, query)
}@function
async def example(github_token: dagger.Secret, repo_url: str, branch_name: str, query: str) -> str:
return await (
dag.feature_branch(github_token, repo_url, branch_name)
.get_pull_request_diff(query)
)@func()
async example(githubToken: Secret, repoUrl: string, branchName: string, query: string): Promise<string> {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.getPullRequestDiff(query)
}addPullRequestComment() 🔗
Add a comment on the PullRequest, set editLast to true to edit the last comment
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| comment | String ! | - | No description provided |
| editLast | Boolean ! | - | No description provided |
Example
dagger -m github.com/samalba/agents/feature-branch@d128343dc6623253dcff12f2b2689e0d8dbaea3d call \
--github-token env:MYSECRET --repo-url string --branch-name string add-pull-request-comment --comment string --edit-last booleanfunc (m *MyModule) Example(ctx context.Context, githubToken *dagger.Secret, repoUrl string, branchName string, comment string, editLast bool) string {
return dag.
FeatureBranch(githubToken, repoUrl, branchName).
AddPullRequestComment(ctx, comment, editLast)
}@function
async def example(github_token: dagger.Secret, repo_url: str, branch_name: str, comment: str, edit_last: bool) -> str:
return await (
dag.feature_branch(github_token, repo_url, branch_name)
.add_pull_request_comment(comment, edit_last)
)@func()
async example(githubToken: Secret, repoUrl: string, branchName: string, comment: string, editLast: boolean): Promise<string> {
return dag
.featureBranch(githubToken, repoUrl, branchName)
.addPullRequestComment(comment, editLast)
}