gh
No long description provided.
Installation
dagger install github.com/adore-me/daggerverse/gh@ef40a23d6daf33322f16df232b4502bfc0ef67c9Entrypoint
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 | 
| repoPath | Directory ! | - | RepoDir of the GitHub repo. Usually the root directory of the workdir. | 
Example
dagger -m github.com/adore-me/daggerverse/gh@ef40a23d6daf33322f16df232b4502bfc0ef67c9 call \
 --token env:MYSECRET --repo-path DIR_PATHfunc (m *MyModule) Example(token *dagger.Secret, repoPath *dagger.Directory) *dagger.Gh  {
	return dag.
			Gh(token, repoPath)
}@function
def example(token: dagger.Secret, repo_path: dagger.Directory) -> dagger.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@ef40a23d6daf33322f16df232b4502bfc0ef67c9 call \
 --token env:MYSECRET --repo-path DIR_PATH run-git --cmd stringfunc (m *MyModule) Example(ctx context.Context, token *dagger.Secret, repoPath *dagger.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@ef40a23d6daf33322f16df232b4502bfc0ef67c9 call \
 --token env:MYSECRET --repo-path DIR_PATH run-gh --cmd stringfunc (m *MyModule) Example(ctx context.Context, token *dagger.Secret, repoPath *dagger.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)
}