gh
No long description provided.
Installation
dagger install github.com/adore-me/daggerverse/gh@f81faa47d17aec6572a74359b82f2b4904534d93
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 |
repoPath | Directory ! | RepoDir of the GitHub repo. Usually the root directory of the workdir. |
Example
dagger -m github.com/adore-me/daggerverse/gh@f81faa47d17aec6572a74359b82f2b4904534d93 call \
--token env:MYSECRET --repo-path DIR_PATH
func (m *myModule) example(token *Secret, repoPath *Directory) *Gh {
return dag.
Gh(token, repoPath)
}
@function
def example(token: dagger.Secret, repo_path: dagger.Directory) -> dag.Gh:
return (
dag.gh(token, repo_path)
)
@func()
example(token: Secret, repoPath: Directory): Gh {
return dag
.gh(token, repoPath)
}
Types
Gh 🔗
runGit() 🔗
RunGit runs a command using the git CLI.
Example usage: dagger call –token=env:TOKEN –cmd=“status’ –base=main –head=test-daggerverse” –version=“2.43.0”
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
cmd | String ! | - | command to run |
version | String | "2.43.0" | version of the Github CLI |
Example
dagger -m github.com/adore-me/daggerverse/gh@f81faa47d17aec6572a74359b82f2b4904534d93 call \
--token env:MYSECRET --repo-path DIR_PATH run-git --cmd string
func (m *myModule) example(ctx context.Context, token *Secret, repoPath *Directory, cmd string) string {
return dag.
Gh(token, repoPath).
RunGit(ctx, cmd)
}
@function
async def example(token: dagger.Secret, repo_path: dagger.Directory, cmd: str) -> str:
return await (
dag.gh(token, repo_path)
.run_git(cmd)
)
@func()
async example(token: Secret, repoPath: Directory, cmd: string): Promise<string> {
return dag
.gh(token, repoPath)
.runGit(cmd)
}
runGh() 🔗
RunGh runs a command using the git CLI.
Example usage: dagger call –token=env:TOKEN –cmd=“status’ –base=main –head=test-daggerverse” –version=“2.43.0”
Return Type
String !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
cmd | String ! | - | command to run |
version | String | "2.47.0" | version of the Github CLI |
Example
dagger -m github.com/adore-me/daggerverse/gh@f81faa47d17aec6572a74359b82f2b4904534d93 call \
--token env:MYSECRET --repo-path DIR_PATH run-gh --cmd string
func (m *myModule) example(ctx context.Context, token *Secret, repoPath *Directory, cmd string) string {
return dag.
Gh(token, repoPath).
RunGh(ctx, cmd)
}
@function
async def example(token: dagger.Secret, repo_path: dagger.Directory, cmd: str) -> str:
return await (
dag.gh(token, repo_path)
.run_gh(cmd)
)
@func()
async example(token: Secret, repoPath: Directory, cmd: string): Promise<string> {
return dag
.gh(token, repoPath)
.runGh(cmd)
}