gh
No long description provided.
Installation
dagger install github.com/adore-me/daggerverse/gh@c36b53a47b8f7b3e501c43d749ec0bce80cc98d3Entrypoint
Return Type
Gh !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repoPath | Directory ! | - | RepoDir of the GitHub repo |
| baseBranch | String | "master" | The base branch of the repository (ex: main, master) |
| token | Secret ! | - | The token to authenticate with GitHub |
Example
dagger -m github.com/adore-me/daggerverse/gh@c36b53a47b8f7b3e501c43d749ec0bce80cc98d3 call \
--repo-path DIR_PATH --token env:MYSECRETfunc (m *MyModule) Example(repoPath *dagger.Directory, token *dagger.Secret) *dagger.Gh {
return dag.
Gh(repoPath, token)
}@function
def example(repo_path: dagger.Directory, token: dagger.Secret) -> dagger.Gh:
return (
dag.gh(repo_path, token)
)@func()
example(repoPath: Directory, token: Secret): Gh {
return dag
.gh(repoPath, token)
}Types
Gh 🔗
repoPath() 🔗
RepoDir of the GitHub repo
Return Type
Directory ! Example
dagger -m github.com/adore-me/daggerverse/gh@c36b53a47b8f7b3e501c43d749ec0bce80cc98d3 call \
--repo-path DIR_PATH --token env:MYSECRET repo-pathfunc (m *MyModule) Example(repoPath *dagger.Directory, token *dagger.Secret) *dagger.Directory {
return dag.
Gh(repoPath, token).
RepoPath()
}@function
def example(repo_path: dagger.Directory, token: dagger.Secret) -> dagger.Directory:
return (
dag.gh(repo_path, token)
.repo_path()
)@func()
example(repoPath: Directory, token: Secret): Directory {
return dag
.gh(repoPath, token)
.repoPath()
}runGit() 🔗
RunGit runs a command using the git CLI.
Example usage: dagger call –token=env:TOKEN –repo-path=“/workspace/repo” run-git –cmd=status
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| cmd | String ! | - | command to run |
| version | String | "2.43.0" | version of the Github CLI |
| userEmail | String | "action@github.com" | user email |
| userName | String | "GitHub Action" | user name |
Example
dagger -m github.com/adore-me/daggerverse/gh@c36b53a47b8f7b3e501c43d749ec0bce80cc98d3 call \
--repo-path DIR_PATH --token env:MYSECRET run-git --cmd stringfunc (m *MyModule) Example(repoPath *dagger.Directory, token *dagger.Secret, cmd string) *dagger.Container {
return dag.
Gh(repoPath, token).
RunGit(cmd)
}@function
def example(repo_path: dagger.Directory, token: dagger.Secret, cmd: str) -> dagger.Container:
return (
dag.gh(repo_path, token)
.run_git(cmd)
)@func()
example(repoPath: Directory, token: Secret, cmd: string): Container {
return dag
.gh(repoPath, token)
.runGit(cmd)
}runGh() 🔗
RunGh runs a command using the git CLI.
Example usage: dagger call –token=env:TOKEN –base-branch=main run-gh –cmd=“status” –repo-path=“/workspace/repo”
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repoPath | Directory ! | - | RepoDir of the GitHub repo |
| cmd | String ! | - | command to run |
| version | String | "2.47.0" | version of the Github CLI |
Example
dagger -m github.com/adore-me/daggerverse/gh@c36b53a47b8f7b3e501c43d749ec0bce80cc98d3 call \
--repo-path DIR_PATH --token env:MYSECRET run-gh --repo-path DIR_PATH --cmd stringfunc (m *MyModule) Example(ctx context.Context, repoPath *dagger.Directory, token *dagger.Secret, repoPath1 *dagger.Directory, cmd string) string {
return dag.
Gh(repoPath, token).
RunGh(ctx, repoPath1, cmd)
}@function
async def example(repo_path: dagger.Directory, token: dagger.Secret, repo_path1: dagger.Directory, cmd: str) -> str:
return await (
dag.gh(repo_path, token)
.run_gh(repo_path1, cmd)
)@func()
async example(repoPath: Directory, token: Secret, repoPath1: Directory, cmd: string): Promise<string> {
return dag
.gh(repoPath, token)
.runGh(repoPath1, cmd)
}