gh
No long description provided.
Installation
dagger install github.com/adore-me/daggerverse/gh@3cbd3a419da338c7750d601ca86c5d3aeba4eeda
Entrypoint
Return Type
Gh !
Arguments
Name | Type | Description |
---|---|---|
baseBranch | String | 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@3cbd3a419da338c7750d601ca86c5d3aeba4eeda call \
--token env:MYSECRET
func (m *myModule) example(token *Secret) *Gh {
return dag.
Gh(token)
}
@function
def example(token: dagger.Secret) -> dag.Gh:
return (
dag.gh(token)
)
@func()
example(token: Secret): Gh {
return dag
.gh(token)
}
Types
Gh 🔗
runGit() 🔗
RunGit runs a command using the git CLI.
Example usage: dagger call –token=env:TOKEN –base-branch=main run-git –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.43.0" | version of the Github CLI |
Example
dagger -m github.com/adore-me/daggerverse/gh@3cbd3a419da338c7750d601ca86c5d3aeba4eeda call \
--token env:MYSECRET run-git --repo-path DIR_PATH --cmd string
func (m *myModule) example(ctx context.Context, token *Secret, repoPath *Directory, cmd string) string {
return dag.
Gh(token).
RunGit(ctx, repoPath, cmd)
}
@function
async def example(token: dagger.Secret, repo_path: dagger.Directory, cmd: str) -> str:
return await (
dag.gh(token)
.run_git(repo_path, cmd)
)
@func()
async example(token: Secret, repoPath: Directory, cmd: string): Promise<string> {
return dag
.gh(token)
.runGit(repoPath, 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@3cbd3a419da338c7750d601ca86c5d3aeba4eeda call \
--token env:MYSECRET run-gh --repo-path DIR_PATH --cmd string
func (m *myModule) example(ctx context.Context, token *Secret, repoPath *Directory, cmd string) string {
return dag.
Gh(token).
RunGh(ctx, repoPath, cmd)
}
@function
async def example(token: dagger.Secret, repo_path: dagger.Directory, cmd: str) -> str:
return await (
dag.gh(token)
.run_gh(repo_path, cmd)
)
@func()
async example(token: Secret, repoPath: Directory, cmd: string): Promise<string> {
return dag
.gh(token)
.runGh(repoPath, cmd)
}