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/samalba/agents/feature-branch@2bde48946e1b2c6308a81121d7d63a93984dfdf2

Entrypoint

Return Type
FeatureBranch !
Arguments
NameTypeDefault ValueDescription
githubTokenSecret !-No description provided
repoUrlString !-No description provided
branchNameString !-No description provided
Example
dagger -m github.com/samalba/agents/feature-branch@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string
func (m *myModule) example(githubToken *Secret, repoUrl string, branchName string) *FeatureBranch  {
	return dag.
			FeatureBranch(githubToken, repoUrl, branchName)
}
@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str) -> dag.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@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string ctr
func (m *myModule) example(githubToken *Secret, repoUrl string, branchName string) *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@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string branch-name
func (m *myModule) example(ctx context.Context, githubToken *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@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string changes
func (m *myModule) example(githubToken *Secret, repoUrl string, branchName string) *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@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string with-new-unique-branch-name
func (m *myModule) example(githubToken *Secret, repoUrl string, branchName string) *FeatureBranch  {
	return dag.
			FeatureBranch(githubToken, repoUrl, branchName).
			WithNewUniqueBranchName()
}
@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str) -> dag.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
NameTypeDefault ValueDescription
changesDirectory !-No description provided
Example
dagger -m github.com/samalba/agents/feature-branch@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string with-changes --changes DIR_PATH
func (m *myModule) example(githubToken *Secret, repoUrl string, branchName string, changes *Directory) *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) -> dag.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
NameTypeDefault ValueDescription
namesOnlyBoolean !-No description provided
Example
dagger -m github.com/samalba/agents/feature-branch@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string diff --names-only boolean
func (m *myModule) example(ctx context.Context, githubToken *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
NameTypeDefault ValueDescription
messageString !-No description provided
Example
dagger -m github.com/samalba/agents/feature-branch@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string commit --message string
func (m *myModule) example(githubToken *Secret, repoUrl string, branchName string, message string) *FeatureBranch  {
	return dag.
			FeatureBranch(githubToken, repoUrl, branchName).
			Commit(message)
}
@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str, message: str) -> dag.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@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string push
func (m *myModule) example(githubToken *Secret, repoUrl string, branchName string) *FeatureBranch  {
	return dag.
			FeatureBranch(githubToken, repoUrl, branchName).
			Push()
}
@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str) -> dag.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
NameTypeDefault ValueDescription
titleString !-No description provided
bodyString !-No description provided
draftBoolean !-No description provided
Example
dagger -m github.com/samalba/agents/feature-branch@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string create-pull-request --title string --body string --draft boolean
func (m *myModule) example(ctx context.Context, githubToken *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
NameTypeDefault ValueDescription
additionalContextString !-No description provided
Example
dagger -m github.com/samalba/agents/feature-branch@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string create-pull-request-with-llm --additional-context string
func (m *myModule) example(ctx context.Context, githubToken *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
NameTypeDefault ValueDescription
queryString !-No description provided
Example
dagger -m github.com/samalba/agents/feature-branch@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string checkout-pull-request --query string
func (m *myModule) example(githubToken *Secret, repoUrl string, branchName string, query string) *FeatureBranch  {
	return dag.
			FeatureBranch(githubToken, repoUrl, branchName).
			CheckoutPullRequest(query)
}
@function
def example(github_token: dagger.Secret, repo_url: str, branch_name: str, query: str) -> dag.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@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string get-pull-request-body-title
func (m *myModule) example(ctx context.Context, githubToken *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
NameTypeDefault ValueDescription
queryString !-No description provided
Example
dagger -m github.com/samalba/agents/feature-branch@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string get-pull-request-diff --query string
func (m *myModule) example(ctx context.Context, githubToken *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
NameTypeDefault ValueDescription
commentString !-No description provided
editLastBoolean !-No description provided
Example
dagger -m github.com/samalba/agents/feature-branch@2bde48946e1b2c6308a81121d7d63a93984dfdf2 call \
 --github-token env:MYSECRET --repo-url string --branch-name string add-pull-request-comment --comment string --edit-last boolean
func (m *myModule) example(ctx context.Context, githubToken *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)
}