Package-level declarations

Types

Link copied to clipboard
object CiCheck

Finds the failing run of the checkout and a passing run of the same workflow, reads the runner environment of the same job in both through the provider's tool, and diagnoses the pair with the same ranking, plan and case that drift diagnose --case writes.

Link copied to clipboard
data class CiJobInfo(val id: String, val name: String, val failed: Boolean)
Link copied to clipboard
sealed interface CiOutcome
Link copied to clipboard
Link copied to clipboard
interface CiProvider

Reads runs, jobs and logs through a provider's own command line tool, so its login does the authentication. Every method throws CiStop when the tool cannot answer.

Link copied to clipboard
Link copied to clipboard
data class CiRepo(val root: String, val host: String, val path: String, val remote: String, val branch: String?, val head: String)

The checkout root, the remote's host and path (owner/name, or group/sub/name).

Link copied to clipboard
class CiReport(val repo: CiRepo, val provider: CiProviderKind, val failing: CiRunInfo, val passing: CiRunInfo, val job: String, val failingStep: String?, val otherFailedJobs: List<String>, val errors: List<String>, val passingCapsule: Capsule, val failingCapsule: Capsule, val ranking: Ranking, val plan: Plan, val dir: String, val shownDir: String, val ignoreLine: String?)

What drift ci compared and found; dir is where the case and the capsules were written.

Link copied to clipboard
object CiRepos
Link copied to clipboard
data class CiRequest(val remote: String = "origin", val provider: CiProviderKind? = null, val commit: String? = null, val good: String? = null, val run: String? = null, val job: String? = null, val out: String? = null)

Every field is optional: with none set, the failing run of the current branch is used.

Link copied to clipboard
data class CiRunInfo(val id: String, val title: String, val workflow: String, val workflowKey: String, val sha: String, val branch: String, val url: String, val createdAt: String)

One CI run: a GitHub Actions run or a GitLab pipeline. title names it for the user, workflow says what kind of run it is and workflowKey is what two runs of one workflow share.

Link copied to clipboard
class CiRuns(val repo: CiRepo, val provider: CiProviderKind, val failing: CiRunInfo, val passing: CiRunInfo?, val job: CiJobInfo, val jobs: List<CiJobInfo>, val red: Run, val green: Run?, val failingLabel: String, val passingLabel: String?)

What CiCheck.fetch read: the failing run, a passing run if any, and their job logs.

Link copied to clipboard
class CiStop(val kind: CiProblemKind, message: String) : Exception

Why drift ci stopped; message holds fixed text and never a service response.

Link copied to clipboard
class GithubCi(host: Host, site: String) : CiProvider

GitHub Actions through gh; GH_HOST and gh auth login decide the server and the login.

Link copied to clipboard
class GitlabCi(host: Host, site: String) : CiProvider

GitLab pipelines through glab api; GITLAB_HOST and glab auth login decide the server.