gh
No long description provided.
Installation
dagger install github.com/adore-me/daggerverse/gh@229f9a193662e7ba71c0d4faa57e6a3ede2cd658Entrypoint
Return Type
Gh !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| 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@229f9a193662e7ba71c0d4faa57e6a3ede2cd658 call \
 --token env:MYSECRETfunc (m *MyModule) Example(token *dagger.Secret) *dagger.Gh  {
	return dag.
			Gh(token)
}@function
def example(token: dagger.Secret) -> dagger.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
| 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@229f9a193662e7ba71c0d4faa57e6a3ede2cd658 call \
 --token env:MYSECRET run-git --repo-path DIR_PATH --cmd stringfunc (m *MyModule) Example(token *dagger.Secret, repoPath *dagger.Directory, cmd string) *dagger.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
| 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@229f9a193662e7ba71c0d4faa57e6a3ede2cd658 call \
 --token env:MYSECRET run-gh --repo-path DIR_PATH --cmd stringfunc (m *MyModule) Example(ctx context.Context, token *dagger.Secret, repoPath *dagger.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)
}