Dagger
Search

github-status-monitor

status contexts and exit when they all reach a terminal state.

Installation

dagger install github.com/typesafe-ai/daggerverse/github-status-monitor@ca270c29612ad5499813902f33cff23f39d1d20a

Entrypoint

Return Type
GithubStatusMonitor !
Arguments
NameTypeDefault ValueDescription
githubApiString !"https://api.github.com"Base URL of the GitHub REST API.
Example
dagger -m github.com/typesafe-ai/daggerverse/github-status-monitor@ca270c29612ad5499813902f33cff23f39d1d20a call \
 --github-api string
func (m *MyModule) Example(githubApi string) *dagger.GithubStatusMonitor  {
	return dag.
			GithubStatusMonitor(githubApi)
}
@function
def example(github_api: str) -> dagger.GithubStatusMonitor:
	return (
		dag.github_status_monitor(github_api)
	)
@func()
example(githubApi: string): GithubStatusMonitor {
	return dag
		.githubStatusMonitor(githubApi)
}

Types

GithubStatusMonitor 🔗

githubApi() 🔗

Base URL of the GitHub REST API.

Return Type
String !
Example
dagger -m github.com/typesafe-ai/daggerverse/github-status-monitor@ca270c29612ad5499813902f33cff23f39d1d20a call \
 --github-api string github-api
func (m *MyModule) Example(ctx context.Context, githubApi string) string  {
	return dag.
			GithubStatusMonitor(githubApi).
			GithubApi(ctx)
}
@function
async def example(github_api: str) -> str:
	return await (
		dag.github_status_monitor(github_api)
		.github_api()
	)
@func()
async example(githubApi: string): Promise<string> {
	return dag
		.githubStatusMonitor(githubApi)
		.githubApi()
}

waitForDaggerChecks() 🔗

Wait for every Dagger check in the current workspace to succeed.

The expected status set is enumerated via dag.current_workspace().checks() — Dagger check names are assumed to match the GitHub status context strings published by Dagger Cloud.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
repoString !-GitHub repo as 'owner/name'
refString !-Commit SHA to poll
tokenSecret !-GitHub token with read access
pollIntervalInteger !3Seconds between GitHub polls
progressIntervalInteger !30Seconds between routine progress lines (terminal transitions are still printed live).
timeoutInteger !1800Total wall-clock budget, seconds
discoveryTimeoutInteger !300How long expected statuses may take to first appear, seconds
failFastBoolean !falseIf True, raise as soon as any check fails. If False (default), wait for every check to reach a terminal state and then raise at the end if any failed.
Example
dagger -m github.com/typesafe-ai/daggerverse/github-status-monitor@ca270c29612ad5499813902f33cff23f39d1d20a call \
 --github-api string wait-for-dagger-checks --repo string --ref string --token env:MYSECRET --poll-interval integer --progress-interval integer --timeout integer --discovery-timeout integer --fail-fast boolean
func (m *MyModule) Example(ctx context.Context, githubApi string, repo string, ref string, token *dagger.Secret, pollInterval int, progressInterval int, timeout int, discoveryTimeout int, failFast bool) string  {
	return dag.
			GithubStatusMonitor(githubApi).
			WaitForDaggerChecks(ctx, repo, ref, token, pollInterval, progressInterval, timeout, discoveryTimeout, failFast)
}
@function
async def example(github_api: str, repo: str, ref: str, token: dagger.Secret, poll_interval: int, progress_interval: int, timeout: int, discovery_timeout: int, fail_fast: bool) -> str:
	return await (
		dag.github_status_monitor(github_api)
		.wait_for_dagger_checks(repo, ref, token, poll_interval, progress_interval, timeout, discovery_timeout, fail_fast)
	)
@func()
async example(githubApi: string, repo: string, ref: string, token: Secret, pollInterval: number, progressInterval: number, timeout: number, discoveryTimeout: number, failFast: boolean): Promise<string> {
	return dag
		.githubStatusMonitor(githubApi)
		.waitForDaggerChecks(repo, ref, token, pollInterval, progressInterval, timeout, discoveryTimeout, failFast)
}

waitForStatuses() 🔗

Wait until every status context in checks and every check-run in check_runs succeeds on ref.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
repoString !-GitHub repo as 'owner/name'
refString !-Commit SHA to poll
tokenSecret !-GitHub token with read access
checks[String ! ] nullGitHub commit-status context names to wait for.
checkRuns[String ! ] nullGitHub Actions check-run names to wait for (emitted by jobs).
pollIntervalInteger !3Seconds between GitHub polls
progressIntervalInteger !30Seconds between routine progress lines (terminal transitions are still printed live).
timeoutInteger !1800Total wall-clock budget, seconds
discoveryTimeoutInteger !300How long expected statuses may take to first appear, seconds
failFastBoolean !falseIf True, raise as soon as any check fails. If False (default), wait for every check to reach a terminal state and then raise at the end if any failed.
Example
dagger -m github.com/typesafe-ai/daggerverse/github-status-monitor@ca270c29612ad5499813902f33cff23f39d1d20a call \
 --github-api string wait-for-statuses --repo string --ref string --token env:MYSECRET --poll-interval integer --progress-interval integer --timeout integer --discovery-timeout integer --fail-fast boolean
func (m *MyModule) Example(ctx context.Context, githubApi string, repo string, ref string, token *dagger.Secret, pollInterval int, progressInterval int, timeout int, discoveryTimeout int, failFast bool) string  {
	return dag.
			GithubStatusMonitor(githubApi).
			WaitForStatuses(ctx, repo, ref, token, pollInterval, progressInterval, timeout, discoveryTimeout, failFast)
}
@function
async def example(github_api: str, repo: str, ref: str, token: dagger.Secret, poll_interval: int, progress_interval: int, timeout: int, discovery_timeout: int, fail_fast: bool) -> str:
	return await (
		dag.github_status_monitor(github_api)
		.wait_for_statuses(repo, ref, token, poll_interval, progress_interval, timeout, discovery_timeout, fail_fast)
	)
@func()
async example(githubApi: string, repo: string, ref: string, token: Secret, pollInterval: number, progressInterval: number, timeout: number, discoveryTimeout: number, failFast: boolean): Promise<string> {
	return dag
		.githubStatusMonitor(githubApi)
		.waitForStatuses(repo, ref, token, pollInterval, progressInterval, timeout, discoveryTimeout, failFast)
}