Skip to main content

Module github

Module github 

Source
Expand description

The GitHub REST API as the scheduler and the history need it: queued jobs, a job’s steps, just-in-time runner configs, repository runners and cancelling a run. Owns the token, conditional requests and rate-limit backoff. It must never put the token in a log line, a Debug output or an error, and it decides nothing about scheduling.

Structs§

Github
A GitHub API client for one token. Requests on one URL are conditional on its last ETag, so an unchanged answer costs no rate limit.
JobDetails
A job as GET /repos/{owner}/{repo}/actions/jobs/{id} describes it: its progress and steps.
JobStep
A step of JobDetails.
PullRequest
A pull request, as GET /repos/{owner}/{repo}/pulls/{number} says.
QueuedJob
A job waiting for a runner.
RunTrigger
What started a workflow run, as GET /repos/{owner}/{repo}/actions/runs/{id} says.
Runner
A runner registered on a repository.
Token
A GitHub token. Its Debug output never shows the value.

Enums§

Deleted
What deleting a runner did.
Error
What a GitHub request can fail with. No variant holds the token.

Constants§

API_URL
The public API’s address.

Traits§

GithubApi
The GitHub calls the scheduler makes. Github is the real client; the engine’s tests use a fake.

Functions§

gh_token
The gh CLI’s token for github.com (gh auth token).
install_crypto_provider
Makes ring the process’s TLS crypto provider, which every reqwest::Client needs: reqwest is built without one. Calling it again does nothing.

Type Aliases§

TokenSource
Where the client gets a token: at start and again when GitHub answers 401.