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

x/kd_clients/mod.ts>ProjectClient

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

Gets or saves data related to GitHub organization V2 projects.

Constructors

new
ProjectClient(
ownerName: string,
repoName: string,
token: string,
)

Initializes a new instance of the ProjectClient 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

addIssueToProject(issueNumber: number, projectName: string): Promise<void>

Adds an issue with the given issueNumber to a project with the given projectName.

addPullRequestToProject(prNumber: number, projectName: string): Promise<void>

Adds a pull request with the given prNumber to a project with the given projectName.

exists(projectName: string): Promise<boolean>

Returns a value indicating whether or not the project exists with the given projectName.

getIssueProjects(issueNumber: number): Promise<ProjectModel[]>

Gets a list of the organizational projects for an issue that has the given issueNumber, in a repository with a name that matches the ProjectClient.repoName.

getOrgProjects(): Promise<ProjectModel[]>

Gets a list of the GitHub organization projects.

getPullRequestProjects(prNumber: number): Promise<ProjectModel[]>

Gets a list of the organizational projects for a pull request that has the given prNumber, in a repository with a name that matches the given repoName.