Dagger
Search

ghcontrib

This module provides functions to check that pull requests conform to
project standards. It uses the GitHub CLI (gh) to inspect PR metadata
and validates titles, labels, and other properties.

Installation

dagger install github.com/papercomputeco/daggerverse/ghcontrib@14eb2e28ca4d383239f9917e363a628a4a748f6b

Entrypoint

Return Type
Ghcontrib !
Arguments
NameTypeDefault ValueDescription
tokenSecret !-GitHub token.
repoString !-GitHub repository (e.g. "owner/repo").
Example
dagger -m github.com/papercomputeco/daggerverse/ghcontrib@14eb2e28ca4d383239f9917e363a628a4a748f6b call \
 --token env:MYSECRET --repo string
func (m *MyModule) Example(token *dagger.Secret, repo string) *dagger.Ghcontrib  {
	return dag.
			Ghcontrib(token, repo)
}
@function
def example(token: dagger.Secret, repo: str) -> dagger.Ghcontrib:
	return (
		dag.ghcontrib(token, repo)
	)
@func()
example(token: Secret, repo: string): Ghcontrib {
	return dag
		.ghcontrib(token, repo)
}

Types

Ghcontrib 🔗

checkPullRequest() 🔗

CheckPullRequest validates that a pull request conforms to project standards. It checks that the PR title starts with one of the required prefixes.

This is intended to be called from a GitHub Actions workflow where the GitHub token and PR metadata are available.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
numberInteger !-The pull request number to check
Example
dagger -m github.com/papercomputeco/daggerverse/ghcontrib@14eb2e28ca4d383239f9917e363a628a4a748f6b call \
 --token env:MYSECRET --repo string check-pull-request --number integer
func (m *MyModule) Example(ctx context.Context, token *dagger.Secret, repo string, number int) string  {
	return dag.
			Ghcontrib(token, repo).
			CheckPullRequest(ctx, number)
}
@function
async def example(token: dagger.Secret, repo: str, number: int) -> str:
	return await (
		dag.ghcontrib(token, repo)
		.check_pull_request(number)
	)
@func()
async example(token: Secret, repo: string, number: number): Promise<string> {
	return dag
		.ghcontrib(token, repo)
		.checkPullRequest(number)
}