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@8d0cc94dc303c191cf94d1bfe46f9edfd834c604Entrypoint
Return Type
GithubStatusMonitor !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| githubApi | String ! | "https://api.github.com" | Base URL of the GitHub REST API. |
Example
dagger -m github.com/typesafe-ai/daggerverse/github-status-monitor@8d0cc94dc303c191cf94d1bfe46f9edfd834c604 call \
--github-api stringfunc (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@8d0cc94dc303c191cf94d1bfe46f9edfd834c604 call \
--github-api string github-apifunc (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
| Name | Type | Default Value | Description |
|---|---|---|---|
| repo | String ! | - | GitHub repo as 'owner/name' |
| ref | String ! | - | Commit SHA to poll |
| token | Secret ! | - | GitHub token with read access |
| pollInterval | Integer ! | 3 | Seconds between GitHub polls |
| progressInterval | Integer ! | 30 | Seconds between routine progress lines (terminal transitions are still printed live). |
| timeout | Integer ! | 1800 | Total wall-clock budget, seconds |
| discoveryTimeout | Integer ! | 300 | How long expected statuses may take to first appear, seconds |
| failFast | Boolean ! | false | If 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@8d0cc94dc303c191cf94d1bfe46f9edfd834c604 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 booleanfunc (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 succeeds on ref.
Return Type
String !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| repo | String ! | - | GitHub repo as 'owner/name' |
| ref | String ! | - | Commit SHA to poll |
| token | Secret ! | - | GitHub token with read access |
| checks | [String ! ] ! | - | GitHub commit-status context names to wait for, exactly as they appear on the commit (no owner/repo prefix). |
| pollInterval | Integer ! | 3 | Seconds between GitHub polls |
| progressInterval | Integer ! | 30 | Seconds between routine progress lines (terminal transitions are still printed live). |
| timeout | Integer ! | 1800 | Total wall-clock budget, seconds |
| discoveryTimeout | Integer ! | 300 | How long expected statuses may take to first appear, seconds |
| failFast | Boolean ! | false | If 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@8d0cc94dc303c191cf94d1bfe46f9edfd834c604 call \
--github-api string wait-for-statuses --repo string --ref string --token env:MYSECRET --checks string1 --checks string2 --poll-interval integer --progress-interval integer --timeout integer --discovery-timeout integer --fail-fast booleanfunc (m *MyModule) Example(ctx context.Context, githubApi string, repo string, ref string, token *dagger.Secret, checks []string, pollInterval int, progressInterval int, timeout int, discoveryTimeout int, failFast bool) string {
return dag.
GithubStatusMonitor(githubApi).
WaitForStatuses(ctx, repo, ref, token, checks, pollInterval, progressInterval, timeout, discoveryTimeout, failFast)
}@function
async def example(github_api: str, repo: str, ref: str, token: dagger.Secret, checks: List[str], 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, checks, poll_interval, progress_interval, timeout, discovery_timeout, fail_fast)
)@func()
async example(githubApi: string, repo: string, ref: string, token: Secret, checks: string[], pollInterval: number, progressInterval: number, timeout: number, discoveryTimeout: number, failFast: boolean): Promise<string> {
return dag
.githubStatusMonitor(githubApi)
.waitForStatuses(repo, ref, token, checks, pollInterval, progressInterval, timeout, discoveryTimeout, failFast)
}