Dagger
Search

gh

No long description provided.

Installation

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

Entrypoint

Return Type
Gh !
Arguments
NameTypeDescription
baseBranchString The base branch of the repository (ex: main, master)
tokenSecret !The token to authenticate with GitHub
Example
dagger -m github.com/adore-me/daggerverse/gh@9799811b4fd52ad7005973abc6f437871dc9ca7d 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
Container !
Arguments
NameTypeDefault ValueDescription
repoPathDirectory !-RepoDir of the GitHub repo
cmdString !-command to run
versionString "2.43.0"version of the Github CLI
userEmailString "action@github.com"user email
userNameString "GitHub Action"user name
Example
dagger -m github.com/adore-me/daggerverse/gh@9799811b4fd52ad7005973abc6f437871dc9ca7d call \
 --token env:MYSECRET run-git --repo-path DIR_PATH --cmd string
func (m *myModule) example(token *Secret, repoPath *Directory, cmd string) *Container  {
	return dag.
			Gh(token).
			RunGit(repoPath, cmd)
}
@function
def example(token: dagger.Secret, repo_path: dagger.Directory, cmd: str) -> dagger.Container:
	return (
		dag.gh(token)
		.run_git(repo_path, cmd)
	)
@func()
example(token: Secret, repoPath: Directory, cmd: string): Container {
	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
NameTypeDefault ValueDescription
repoPathDirectory !-RepoDir of the GitHub repo
cmdString !-command to run
versionString "2.47.0"version of the Github CLI
Example
dagger -m github.com/adore-me/daggerverse/gh@9799811b4fd52ad7005973abc6f437871dc9ca7d 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)
}