Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/kd_clients/GitHubClients/WorkflowClient.ts>WorkflowClient

Various HTTP clients for miscellaneous use.
Latest
class WorkflowClient
extends GitHubClient
import { WorkflowClient } from "https://deno.land/x/kd_clients@v1.0.0-preview.14/GitHubClients/WorkflowClient.ts";

Provides a client for interacting with workflow runs.

Constructors

new
WorkflowClient(
ownerName: string,
repoName: string,
token?: string,
)

Initializes a new instance of the WorkflowClient class.

Properties

private
readonly
AnyBranch: AnyBranch

Methods

deleteWorkflow(workflowRun: WorkflowRunModel): Promise<void>

Deletes the given workflowRun in a repository with a name that matches the WorkflowClient.repoName.

executeWorkflow(
branchName: string,
workflowFileName: string,
inputs?: [string, string][],
): Promise<void>

Executes a workflow that matches the given workflowFileName, on a branch that matches the given branchName, for a repository with a name that matches the WorkflowClient.repoName.

Gets a list of all the workflow runs for a repository with a name that matches the WorkflowClient.repoName.

getAllWorkflowRunsByTitle(title: string): Promise<WorkflowRunModel[]>

Gets all workflow with the given title for a repository with a name that matches the WorkflowClient.repoName.

Gets all completed workflow runs that match the given event, for a repository with a name that matches the WorkflowClient.repoName.

Gets all completed workflow runs for the given branch, with the given event, for a repository with a name that matches the WorkflowClient.repoName.

Gets all failed workflow runs that match the given event, for a repository with a name that matches the WorkflowClient.repoName.

Gets all failed workflow runs for the given branch, with the given event, for a repository with a name that matches the WorkflowClient.repoName. that matches the given trigger event.

Gets all of the workflow runs for pull requests for a repository with a name that matches the WorkflowClient.repoName.

getWorkflowRunByTitle(title: string): Promise<WorkflowRunModel>

Gets the first workflow with the given title for a repository with a name that matches the WorkflowClient.repoName.

getWorkflowRuns(
branch: string | null | AnyBranch,
page?,
qtyPerPage?,
): Promise<WorkflowRunModel[]>

Gets all workflow runs for the given branch, with the given event and status, for a repository with a name that matches the WorkflowClient.repoName.

getWorkflowRunsBetweenDates(startDate: Date, endDate: Date): Promise<WorkflowRunModel[]>

Gets all workflow runs between the given startDate and endDate for a repository with a name that matches the WorkflowClient.repoName.

getWorkflowRunsForPR(prNumber: number): Promise<WorkflowRunModel[]>

Gets all workflow runs for a pull request with a number that matches the given prNumber, for a repository with a name that matches the WorkflowClient.repoName.

getWorkflowRunsInternal(
branch: string | null | AnyBranch,
page?,
qtyPerPage?,
): Promise<[WorkflowRunModel[], Response]>

Gets all workflow runs for the given branch, with the given event and status, for a repository with a name that matches the WorkflowClient.repoName.