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

x/kd_clients/GitHubClients/mod.ts>IssueClient

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

Provides a client for interacting with issues.

Constructors

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

Initializes a new instance of the IssueClient class.

Properties

private
readonly
isInitialized: boolean
private
readonly
labelClient: LabelClient
writeonly
ownerName: string

Sets the name of the owner of the repository.

writeonly
repoName: string

Sets the name of the repository.

Methods

private
getIssuesInternal(
page?,
qtyPerPage?,
state?: IssueOrPRState,
labels?: string[] | null,
milestoneNumber?: number | null,
): Promise<[IssueModel[], Response]>

Gets the given page of issues where the page quantity matches the given qtyPerPage, in a repository with a name that matches the given IssueClient.repoName, with the given issue state, labels, and in a milestone with a number that matches the given milestoneNumber.

private
openOrClosedIssueExists(issueNumber: number, state: IssueOrPRState): Promise<boolean>

Checks if an issue with the given issueNumber exists with the given state in a repository with a name that matches the given IssueClient.repoName.

addLabel(issueNumber: number, label: string): Promise<void>

Adds the given label to an issue that matches the given issueNumber in a repository with a name that matches the given IssueClient.repoName.

closedExists(issueNumber: number): Promise<boolean>

Returns a value indicating whether or not a closed issue with the given issueNumber exists in a repository with a name that matches the given IssueClient.repoName.

exists(issueNumber: number): Promise<boolean>

Returns a value indicating whether or not an issue with the given issueNumber exists regardless of its state, in a repository with a name that matches the given IssueClient.repoName.

getAllClosedIssues(): Promise<IssueModel[]>

Gets all of the closed issues in a repository with a name that matches the given IssueClient.repoName.

getAllOpenIssues(): Promise<IssueModel[]>

Gets all of the open issues in a repository with a name that matches the given IssueClient.repoName.

getIssue(issueNumber: number): Promise<IssueModel>

Gets an issue with the given issueNumber from a repository with a name that matches given IssueClient.repoName.

getIssues(
page?,
qtyPerPage?,
state?: IssueOrPRState,
labels?: string[] | null,
milestoneNumber?: number | null,
): Promise<IssueModel[]>

Gets the given page of issues where the page quantity matches the given qtyPerPage, in a repository with a name that matches the given IssueClient.repoName, with the given issue state, labels, and in a milestone with a number that matches the given milestoneNumber.

getLabels(issueNumber: number): Promise<string[]>

Gets all of the labels for an issue that matches the given issueNumber in a repository with a name that matches the given IssueClient.repoName.

openExists(issueNumber: number): Promise<boolean>

Returns a value indicating whether or not an open issue with the given issueNumber exists in a repository with a name that matches the given IssueClient.repoName.

updateIssue(issueNumber: number, issueData: IssueOrPRRequestData): Promise<void>

Updates an issue with the given issueNumber and issueData, in a repository with a name that matches the given IssueClient.repoName.