Dagger
Search

gh

No long description provided.

Installation

dagger install github.com/adore-me/daggerverse/gh@f81faa47d17aec6572a74359b82f2b4904534d93

Entrypoint

Return Type
Gh !
Arguments
NameTypeDescription
baseBranchString The base branch of the repository (ex: main, master)
tokenSecret !The token to authenticate with GitHub
repoPathDirectory !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
NameTypeDefault ValueDescription
cmdString !-command to run
versionString "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
NameTypeDefault ValueDescription
cmdString !-command to run
versionString "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)
}