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

x/kd_clients/GitHubClients/mod.ts>MilestoneClient

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

Provides a client for interacting with milestones.

Constructors

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

Initializes a new instance of the MilestoneClient class.

Properties

private
readonly
isInitialized: boolean
private
readonly
issueClient: IssueClient
private
readonly
prClient: PullRequestClient
writeonly
ownerName: string

Sets the name of the owner of the repository.

writeonly
repoName: string

Sets the name of the repository.

Methods

closeMilestone(milestoneName: string): Promise<void>

Closes a milestone with a name that matches the given milestoneName, where the repository has a name that matches the given MilestoneClient.repoName.

exists(milestoneName: string): Promise<boolean>

Checks if a milestone with a name that matches in the given milestoneName, exists in a repository with a name that matches the given MilestoneClient.repoName.

getIssues(milestoneName: string, labels?: string[]): Promise<IssueModel[]>

Gets all of the issues for a milestone with a name that matches the given milestoneName, where the repository has a name that matches the given MilestoneClient.repoName.

getIssuesAndPullRequests(milestoneName: string, labels?: string[]): Promise<IssueOrPR[]>

Gets all of the issues and pull requests for a milestone with a name that matches the given milestoneName, where the repository has a name that matches the given MilestoneClient.repoName.

getMilestoneByName(milestoneName: string): Promise<MilestoneModel>

Get a milestones with a name that matches the given milestoneName, where the repository has a name that matches the given MilestoneClient.repoName.

getMilestones(page: number, qtyPerPage: number): Promise<[MilestoneModel[], Response]>

Gets the given page of milestones with a quantity that the given qtyPerPage, where the repository has a name that matches the given MilestoneClient.repoName.

getPullRequests(milestoneName: string, labels?: string[]): Promise<PullRequestModel[]>

Gets all of the pull requests with the given labels, for a milestone with a name that matches the given milestoneName, where the repository has a name that matches the given MilestoneClient.repoName.