UNPKG

@ts-common/azure-js-dev-tools

Version:

Developer dependencies for TypeScript related projects

632 lines 32.9 kB
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. */ import { Octokit } from "@octokit/rest"; import { StringMap } from "./common"; /** * The name and optional organization that the repository belongs to. */ export interface Repository { /** * The entity that owns the repository. */ owner: string; /** * The name of the repository. */ name: string; } /** * Get a GitHubRepository object from the provided string or GitHubRepository object. * @param repository The repository name or object. */ export declare function getRepository(repository: string | Repository): Repository; export declare function getGithubRepositoryUrl(repository: Repository): string; /** * Get whether or not the two provided repositories are equal. */ export declare function repositoriesAreEqual(lhs: string | Repository, rhs: string | Repository): boolean; /** * A comment in a GitHub repository. */ export interface GitHubComment { id: number; node_id: string; url: string; /** * The URL to the html version of this comment. */ html_url: string; /** * The body/text of this comment. */ body: string; /** * The user that made this comment. */ user: GitHubUser; /** * The timestamp for when this comment was created. */ created_at: string; /** * The timestamp for the last time that this comment was updated. */ updated_at: string; } /** * Get the full name of the provided repository. * @param repository The repository to get the full name of. */ export declare function getRepositoryFullName(repository: string | Repository): string; /** * The type of the body that GitHub sends for a pull_request webhook request. */ export interface GitHubPullRequestWebhookBody { /** * The action that the Webhook request is being sent as a result of. */ action: "assigned" | "unassigned" | "review_requested" | "review_request_removed" | "labeled" | "unlabeled" | "opened" | "edited" | "closed" | "reopened"; /** * The pull request number. */ number: number; /** * The pull request that was changed. */ pull_request: GitHubPullRequest; } export interface GitHubLabel { id: number; node_id: string; url: string; name: string; color: string; default: boolean; } export declare type GitHubMilestoneState = "open" | "closed"; export interface GitHubMilestone { title: string; due_on: string; number: number; open_issues: number; closed_issues: number; state: GitHubMilestoneState; } export interface GitHubSprintLabel { sprint: number; unplannedColor?: string; plannedColor?: string; startedColor?: string; } export interface GitHubSprintMilestone { milestoneNumber?: number; sprint: number; endDate: string; openIssueCount: number; open: boolean; } export declare type GitHubPullRequestState = "open" | "closed"; export interface GitHubPullRequest { base: GitHubPullRequestCommit; head: GitHubPullRequestCommit; merge_commit_sha?: string; id: number; labels: GitHubLabel[]; number: number; state: GitHubPullRequestState; merged?: boolean; title: string; url: string; html_url: string; diff_url: string; milestone?: GitHubMilestone; assignees?: GitHubUser[]; /** * The description for the pull request. */ body?: string; } /** * The way that a pull request will be merged. */ export declare type GitHubMergeMethod = "merge" | "squash" | "rebase"; export interface GitHubUser { id: number; login: string; name?: string; url: string; node_id: string; site_admin: boolean; } export interface GitHubPullRequestCommit { label: string; ref: string; sha: string; } /** * Get the label in the provided GitHubPullRequest that has the provided name. If no label is found, * then undefined will be returned. * @param githubPullRequest The pull request to look for the label in. * @param labelName The name of the label to look for. */ export declare function gitHubPullRequestGetLabel(githubPullRequest: GitHubPullRequest, labelName: string): GitHubLabel | undefined; export declare function gitHubPullRequestGetLabels(githubPullRequest: GitHubPullRequest, labelNames: string | string[]): GitHubLabel[]; export declare function gitHubPullRequestGetAssignee(githubPullRequest: GitHubPullRequest, assignee: GitHubUser | string | number): GitHubUser | undefined; /** * Optional parameters that can be provided to the GitHub.getMilestones() function to restrict the * returned milestones. */ export interface GitHubGetMilestonesOptions { /** * Filter the results to the milestones that are either open (true) or closed (false). If this * value is undefined, then all milestones will be returned. */ open?: boolean; } export interface GitHubCreateMilestoneOptions { endDate?: string; } /** * Optional parameters that can be provided to the GitHub.getPullRequests() function to restrict the * returned pull requests. */ export interface GitHubGetPullRequestsOptions extends Partial<Octokit.PullsListParams> { /** * Filter the results to the pull requests that are either open (true) or closed (false). If this * value is undefined, then all pull requests will be returned. */ open?: boolean; } /** * Optional parameters that can be provided to the GitHub.createPullRequest function. */ export interface GitHubCreatePullRequestOptions { title: string; /** * The description that will appear in the created pull request. */ body?: string; /** * Whether or not the maintainer of the pull request can modify the head branch. Defaults to * false. */ maintainerCanModify?: boolean; } /** * A commit that exists in a GitHub repository. */ export interface GitHubCommit { /** * The unique identifier for this commit. */ sha: string; /** * The data of the GitHub commit. */ commit: GitHubCommitData; } /** * The data of a GitHub commit. */ export interface GitHubCommitData { /** * The message of the commit. */ message: string; } export interface GitHubContent { download_url: string | null; encoding?: string | undefined; content?: string | undefined; html_url: string; sha: string; url: string; } export interface GitHubContentItem { download_url: string | null; } /** * A reference to a branch in a repository. */ export interface RepositoryBranch { /** * The owner of the repository that the branch belongs to. */ owner: string; /** * The name of the branch in the repository. */ name: string; } /** * Parse a ForkedRepositoryBranch reference from the provided value. * @param repositoryBranch The string or ForkedRepositoryBranch to parse. */ export declare function getRepositoryBranch(repositoryBranch: string | RepositoryBranch): RepositoryBranch; export declare function getRepositoryBranchFullName(repositoryBranch: string | RepositoryBranch): string; /** * A generic reference from a GitHub repository. This can be either a branch, tag, note, or stash. */ export interface GitHubReference { /** * This reference's full name. */ readonly ref: string; readonly node_id: string; /** * The GitHub URL for this reference. */ readonly url: string; readonly object: { /** * The type of Git object that this reference points to. */ readonly type: string; /** * The SHA that this reference points to. */ readonly sha: string; /** * The URL of the Git object that this reference points to. */ readonly url: string; }; } /** * A branch reference from a GitHub repository. */ export interface GitHubBranch extends GitHubReference { /** * The simplified name of the branch. */ readonly name: string; } export interface GitHub { /** * Get the user that is currently authenticated. * @returns The user that is currently authenticated. */ getCurrentUser(): Promise<GitHubUser>; /** * Get all of the labels in the provided repository. */ getLabels(repository: string | Repository): Promise<GitHubLabel[]>; /** * Get all of the labels that contain "-Sprint-" in the provided repository. * @param repository The repository to look in. */ getSprintLabels(repository: string | Repository): Promise<GitHubSprintLabel[]>; /** * Create a label with the provided labelName and color in the provided repository. * @param repositoryName The name of the repository where the label will be created. * @param labelName The name of the created label. * @param color The color of the created label. */ createLabel(repository: string | Repository, labelName: string, color: string): Promise<GitHubLabel>; /** * Delete the provided label from the provided repository. * @param repository The repository to delete the label from. * @param label The label name, id, or details to delete. */ deleteLabel(repository: string | Repository, label: string | number | GitHubLabel): Promise<unknown>; /** * Update the color of the label with the provided name in the provided repository. * @param repository The repository that contains the label to update. * @param labelName The name of the label to update. * @param newColor The color to update the label to. */ updateLabelColor(repository: string | Repository, labelName: string, newColor: string): Promise<unknown>; /** * Get the milestone in the provided repository with either the provided milestone number or name. */ getMilestone(repository: string | Repository, milestone: number | string): Promise<GitHubMilestone>; /** * Get all of the milestones that exist in the provided repository. * @param repository The repository to get all of the milestones of. * @returns All of the milestones that exist in the provided repository. */ getMilestones(repository: string | Repository, options?: GitHubGetMilestonesOptions): Promise<GitHubMilestone[]>; /** * Get all of the sprint milestones (milestones that begin with "Sprint-") in the provided * repository. * @param repository The repository. * @returns All of the sprint milestones in the provided repository. */ getSprintMilestones(repository: string | Repository, options?: GitHubGetMilestonesOptions): Promise<GitHubSprintMilestone[]>; /** * Create a new milestone in the provided repository. * @param repository The repository to create a new milestone in. * @param milestoneName The name of the new milestone. * @param options The optional properties to set on the created milestone. */ createMilestone(repositoryName: string | Repository, milestoneName: string, options?: GitHubCreateMilestoneOptions): Promise<GitHubMilestone>; /** * Create a new sprint milestone in the provided repository. * @param repository The repository to create the new sprint milestone in. * @param sprintNumber The number of the sprint that the milestone will be associated with. * @param sprintEndDate The last day of the sprint. */ createSprintMilestone(repository: string | Repository, sprintNumber: number, sprintEndDate: string): Promise<GitHubSprintMilestone | undefined>; /** * Update the end date of an existing milestone in the provided repository. * @param repository The repository that contains the milestone to update. * @param milestoneNumber The number id of the milestone to update. * @param newSprintEndDate The new end date to update the existing milestone to. */ updateMilestoneEndDate(repository: string | Repository, milestoneNumber: number, newSprintEndDate: string): Promise<GitHubMilestone>; updateSprintMilestoneEndDate(repository: string | Repository, sprintMilestone: GitHubSprintMilestone, newSprintEndDate: string): Promise<GitHubSprintMilestone>; closeMilestone(repository: string | Repository, milestoneNumber: number): Promise<unknown>; closeSprintMilestone(repository: string | Repository, sprintMilestone: GitHubSprintMilestone): Promise<unknown>; /** * Get the pull request from the provided repository with the provided number. * @param repository The repository to get the pull request from. */ getPullRequest(repository: string | Repository, pullRequestNumber: number): Promise<GitHubPullRequest>; /** * Get the pull requests in the provided respository. * @param repository The name of the repository. */ getPullRequests(repository: string | Repository, options?: GitHubGetPullRequestsOptions): Promise<GitHubPullRequest[]>; /** * Create a new pull request in the provided repository. * @param repository The repository to create the pull request in. * @param baseBranch The base branch that the pull request will merge into. * @param headBranch The head branch that the pull request will merge from. * @param title The title of the pull request. * @param options The optional parameters for creating a pull request. */ createPullRequest(repository: string | Repository, baseBranch: string, headBranch: string | RepositoryBranch, options: GitHubCreatePullRequestOptions): Promise<GitHubPullRequest>; updatePullRequest(repository: string | Repository, pullRequest: number | GitHubPullRequest, options?: Partial<GitHubCreatePullRequestOptions>): Promise<unknown>; /** * Close the provided pull request without merging it. * @param repository The repository that the pull request exists in. * @param pullRequest The pull request number or the pull request object to close. */ closePullRequest(repository: string | Repository, pullRequest: number | GitHubPullRequest): Promise<unknown>; /** * Merge and close the provided pull request. * @param repository The repository that the pull request exists in. * @param pullRequest The pull request number or the pull request object to merge. * @param mergeMethod The way that the pull request will be merged. */ mergePullRequest(repository: string | Repository, pullRequest: number | GitHubPullRequest, mergeMethod?: GitHubMergeMethod): Promise<unknown>; addPullRequestAssignees(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, assignees: string | GitHubUser | (string | GitHubUser)[]): Promise<unknown>; /** * Add the provided labels to the provided GitHubPullRequest. * @param repository The repository where the pull request exists. * @param githubPullRequest The GitHubPullRequest that the labels will be added to. * @param labelNamesToAdd The name of the label or labels to add to the pull request. */ addPullRequestLabels(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, labelNames: string | string[]): Promise<string[]>; /** * Remove the provided labels from the provided pull request. * @param repository The repository where the pull request exists. * @param githubPullRequest The pull request that the labels will be removed from. * @param labelNames The names of the labels to remove from the pull request. * @returns The names of the labels that were removed. */ removePullRequestLabels(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, labelNames: string | string[]): Promise<string[]>; /** * Set the milestone that the provided pull request is assigned to. * @param repository The repository where the pull request exists. * @param githubPullRequest The pull request to assign. * @param milestone The milestone to assign to the pull request. */ setPullRequestMilestone(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, milestone: number | string | GitHubMilestone): Promise<unknown>; /** * Get the comments that have been made on the provided GitHubPullRequest. * @param repository The repository where the pull request exists. * @param githubPullRequest The GitHubPullRequest to get the comments of. */ getPullRequestComments(repository: string | Repository, githubPullRequest: GitHubPullRequest | number): Promise<GitHubComment[]>; /** * Create a new comment on the provided GitHubPullRequest. * @param repository The repository where the pull request exists. * @param githubPullRequest The GitHubPullReuqest to create the new comment on. * @param commentBody The text of the comment to make. */ createPullRequestComment(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, commentBody: string): Promise<GitHubComment>; /** * Update an existing comment on the provided GitHubPullRequest. * @param repository The repository where the pull request exists. * @param githubPullRequest The GitHubPullRequest to update an existing comment on. * @param comment The updated comment. */ updatePullRequestComment(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, comment: GitHubComment | number, commentBody: string): Promise<GitHubComment>; /** * Delete an existing comment from the provided GitHubPullRequest. * @param repository The repository where the pull request exists. * @param githubPullRequest The GitHubPUllRequest to delete an existing comment from. * @param comment The comment to delete. */ deletePullRequestComment(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, comment: GitHubComment | number): Promise<unknown>; /** * Get the details of the commit with the provided unique identifier or undefined if no commit * existed with the provided identifier. * @param repository The repository that the commit exists in. * @param commit A unique identifier for the commit. */ getCommit(repository: string | Repository, commit: string): Promise<GitHubCommit | undefined>; /** * Get one file contents from Git. If the content is encoded by base64, it will be decoded. * Support private repo. * @param repository The repository that the file exists in. * @param filepath A unique name for the file. */ getContents(repository: string | Repository, filepath: string): Promise<GitHubContent | undefined | Array<GitHubContentItem>>; /** * Get all of the references (branches, tags, notes, stashes, etc.) in the provided repository. * @param repository The repository to get all of the references for. * @returns All of the references (branches, tags, notes, stashes, etc.) in the provided * repository. */ getAllReferences(repository: string | Repository): Promise<GitHubReference[]>; /** * Get all of the branches in the provided repository. * @param repository The repository to get all of the branches for. * @returns All of the branches in the provided repository. */ getAllBranches(repository: string | Repository): Promise<GitHubBranch[]>; /** * Get more information about the provided branch in the provided repository. * @param repository The repository to get the branch from. * @param branchName The name of the branch to get. */ getBranch(repository: string | Repository, branchName: string): Promise<GitHubBranch>; /** * Delete the branch with the provided name in the provided repository. * @param repository The repository to delete the branch from. * @param branchName The name of the branch to delete. */ deleteBranch(repository: string | Repository, branchName: string): Promise<unknown>; /** * Create a branch with the provided name as the provided sha in the provided repository. * @param repository The repository to create the branch in. * @param branchName The name of the branch to create. * @param branchSha The SHA/commit ID that the branch will be created at. */ createBranch(repository: string | Repository, branchName: string, branchSha: string): Promise<GitHubBranch>; } export interface FakeGitHubPullRequest extends GitHubPullRequest { comments: GitHubComment[]; } declare type FakeContent = GitHubContent | GitHubContentItem[] | undefined; export declare class FakeRepository { readonly name: string; readonly forkOf?: FakeRepository | undefined; readonly labels: GitHubLabel[]; readonly milestones: GitHubMilestone[]; readonly pullRequests: FakeGitHubPullRequest[]; readonly commits: GitHubCommit[]; readonly branches: GitHubBranch[]; readonly forks: FakeRepository[]; readonly content: FakeContent[]; constructor(name: string, forkOf?: FakeRepository | undefined); /** * Get the fork of this repository that was created by the provided owner. * @param owner The name of the owner that created a fork of this repository. */ getFork(owner: string): FakeRepository | undefined; } export declare class FakeGitHub implements GitHub { private readonly users; private currentUser; private readonly repositories; getRepository(repository: string | Repository): FakeRepository; private createRepositoryInner; createRepository(repository: string | Repository): FakeRepository; forkRepository(repository: string | Repository, forkedRepositoryOwner: string): FakeRepository; deleteRepository(repository: string | Repository): Promise<void>; createUser(username: string): GitHubUser; getUser(username: string): GitHubUser; setCurrentUser(username: string): void; getLabel(repository: string | Repository, label: string): Promise<GitHubLabel>; getCurrentUser(): Promise<GitHubUser>; getLabels(repository: string | Repository): Promise<GitHubLabel[]>; getSprintLabels(repository: string | Repository): Promise<GitHubSprintLabel[]>; createLabel(repository: string | Repository, labelName: string, color: string): Promise<GitHubLabel>; deleteLabel(repository: string | Repository, label: string | GitHubLabel): Promise<void>; updateLabelColor(repository: string | Repository, labelName: string, newColor: string): Promise<unknown>; getMilestone(repository: string | Repository, milestone: string | number): Promise<GitHubMilestone>; getMilestones(repository: string | Repository, options?: GitHubGetMilestonesOptions): Promise<GitHubMilestone[]>; getSprintMilestones(repository: string | Repository, options?: GitHubGetMilestonesOptions): Promise<GitHubSprintMilestone[]>; createMilestone(repository: string | Repository, milestoneName: string, options?: GitHubCreateMilestoneOptions): Promise<GitHubMilestone>; createSprintMilestone(repository: string | Repository, sprintNumber: number, sprintEndDate: string): Promise<GitHubSprintMilestone | undefined>; updateMilestoneEndDate(repository: string | Repository, milestoneNumber: number, newSprintEndDate: string): Promise<GitHubMilestone>; updateSprintMilestoneEndDate(repository: string | Repository, sprintMilestone: GitHubSprintMilestone, newSprintEndDate: string): Promise<GitHubSprintMilestone>; closeMilestone(repository: string | Repository, milestoneNumber: number): Promise<void>; closeSprintMilestone(repository: string | Repository, sprintMilestone: GitHubSprintMilestone): Promise<void>; createFakePullRequest(repository: string | Repository, pullRequest: GitHubPullRequest): FakeGitHubPullRequest; createPullRequest(repository: string | Repository, baseBranch: string | RepositoryBranch, headBranch: string | RepositoryBranch, options: GitHubCreatePullRequestOptions): Promise<GitHubPullRequest>; updatePullRequest(repository: string | Repository, pullRequest: number | GitHubPullRequest, options?: Partial<GitHubCreatePullRequestOptions>): Promise<unknown>; closePullRequest(repository: string | Repository, pullRequestNumber: number | GitHubPullRequest): Promise<void>; mergePullRequest(repository: string | Repository, pullRequest: number | GitHubPullRequest, _mergeMethod: GitHubMergeMethod): Promise<void>; getPullRequest(repository: string | Repository, pullRequestNumber: number): Promise<FakeGitHubPullRequest>; getPullRequests(repository: string | Repository, options?: GitHubGetPullRequestsOptions): Promise<FakeGitHubPullRequest[]>; addPullRequestAssignees(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, assignees: string | GitHubUser | (string | GitHubUser)[]): Promise<void>; addPullRequestLabels(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, labelNames: string | string[]): Promise<string[]>; removePullRequestLabels(repository: string | Repository, githubPullRequest: number | GitHubPullRequest, labelNames: string | string[]): Promise<string[]>; setPullRequestMilestone(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, milestone: string | number | GitHubMilestone): Promise<unknown>; getPullRequestComments(repository: string | Repository, githubPullRequest: GitHubPullRequest | number): Promise<GitHubComment[]>; createPullRequestComment(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, commentBody: string): Promise<GitHubComment>; updatePullRequestComment(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, comment: number | GitHubComment, commentBody: string): Promise<GitHubComment>; deletePullRequestComment(repository: string | Repository, githubPullRequest: number | GitHubPullRequest, comment: number | GitHubComment): Promise<unknown>; getCommit(repository: string | Repository, commitId: string): Promise<GitHubCommit | undefined>; getContents(repository: string | Repository, filepath: string): Promise<GitHubContent | undefined | Array<GitHubContentItem>>; createCommit(repository: string | Repository, commitId: string, message: string): Promise<unknown>; getAllReferences(repository: string | Repository): Promise<GitHubReference[]>; getAllBranches(repository: string | Repository): Promise<GitHubBranch[]>; getBranch(repository: string | Repository, branchName: string): Promise<GitHubBranch>; deleteBranch(repository: string | Repository, branchName: string): Promise<unknown>; createBranch(repository: string | Repository, branchName: string, branchSha: string): Promise<GitHubBranch>; } export declare function getSprintLabels(labels: GitHubLabel[]): GitHubSprintLabel[]; /** * A class that wraps @octokit/rest to interact with github.com. */ export declare class RealGitHub implements GitHub { private readonly githubClients; private constructor(); static fromOctokit(github: Octokit | StringMap<Octokit> | ((scope: string) => Promise<Octokit>)): RealGitHub; static fromToken(authenticationToken: string): RealGitHub; static fromTokenFile(tokenFilePath: string): RealGitHub; getClient(repository: string | Repository): Promise<Octokit>; private getDefaultClient; getCurrentUser(): Promise<GitHubUser>; getContents(repository: string | Repository, filepath: string): Promise<GitHubContent | undefined | Array<GitHubContentItem>>; getLabels(repository: string | Repository): Promise<GitHubLabel[]>; getSprintLabels(repository: string | Repository): Promise<GitHubSprintLabel[]>; createLabel(repository: string | Repository, labelName: string, color: string): Promise<GitHubLabel>; deleteLabel(repository: string | Repository, label: string | GitHubLabel): Promise<unknown>; updateLabelColor(repository: string | Repository, labelName: string, newColor: string): Promise<unknown>; getMilestone(repository: string | Repository, milestone: number | string): Promise<GitHubMilestone>; /** * Get all of the milestones that exist in the repository with the provided name. * @param repositoryName The name of the repository to get all of the milestones of. * @returns All of the milestones that exist in the provided repository. */ getMilestones(repository: string | Repository, options?: GitHubGetMilestonesOptions): Promise<GitHubMilestone[]>; getSprintMilestones(repository: string | Repository, options?: GitHubGetMilestonesOptions): Promise<GitHubSprintMilestone[]>; createMilestone(repository: string | Repository, milestoneName: string, options?: GitHubCreateMilestoneOptions): Promise<GitHubMilestone>; createSprintMilestone(repository: string | Repository, sprintNumber: number, sprintEndDate: string): Promise<GitHubSprintMilestone | undefined>; updateMilestoneEndDate(repository: string | Repository, milestoneNumber: number, newSprintEndDate: string): Promise<GitHubMilestone>; updateSprintMilestoneEndDate(repository: string | Repository, sprintMilestone: GitHubSprintMilestone, newSprintEndDate: string): Promise<GitHubSprintMilestone>; closeMilestone(repository: string | Repository, milestoneNumber: number): Promise<unknown>; closeSprintMilestone(repository: string | Repository, sprintMilestone: GitHubSprintMilestone): Promise<unknown>; createPullRequest(repository: string | Repository, baseBranch: string, headBranch: string | RepositoryBranch, options: GitHubCreatePullRequestOptions): Promise<GitHubPullRequest>; updatePullRequest(repository: string | Repository, pullRequest: number | GitHubPullRequest, options?: Partial<GitHubCreatePullRequestOptions>): Promise<unknown>; closePullRequest(repository: string | Repository, pullRequest: number | GitHubPullRequest): Promise<unknown>; mergePullRequest(repository: string | Repository, pullRequest: number | GitHubPullRequest, mergeMethod?: GitHubMergeMethod): Promise<GitHubPullRequest>; getPullRequest(repository: string | Repository, pullRequestNumber: number): Promise<GitHubPullRequest>; getPullRequests(repository: string | Repository, options?: GitHubGetPullRequestsOptions): Promise<GitHubPullRequest[]>; addPullRequestAssignees(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, assignees: string | GitHubUser | (string | GitHubUser)[]): Promise<unknown>; addPullRequestLabels(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, labelNames: string | string[]): Promise<string[]>; removePullRequestLabels(repository: string | Repository, githubPullRequest: number | GitHubPullRequest, labelNames: string | string[]): Promise<string[]>; setPullRequestMilestone(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, milestone: number | string | GitHubMilestone): Promise<unknown>; /** * Get all of the pages associated with the provided pageResponse. * @param pageResponse One of the page responses in an overall response. */ private getAllPageData; getPullRequestComments(repository: string | Repository, githubPullRequest: GitHubPullRequest | number): Promise<GitHubComment[]>; createPullRequestComment(repository: string | Repository, githubPullRequest: GitHubPullRequest | number, commentBody: string): Promise<GitHubComment>; updatePullRequestComment(repository: string | Repository, _githubPullRequest: GitHubPullRequest | number, comment: GitHubComment | number, commentBody: string): Promise<GitHubComment>; deletePullRequestComment(repository: string | Repository, _githubPullRequest: number | GitHubPullRequest, comment: number | GitHubComment): Promise<unknown>; getCommit(repository: string | Repository, commit: string): Promise<GitHubCommit | undefined>; getAllReferences(repository: string | Repository): Promise<GitHubReference[]>; getAllBranches(repository: string | Repository): Promise<GitHubBranch[]>; getBranch(repository: string | Repository, branchName: string): Promise<GitHubBranch>; deleteBranch(repository: string | Repository, branchName: string): Promise<unknown>; createBranch(repository: string | Repository, branchName: string, branchSha: string): Promise<GitHubBranch>; } export declare function getSprintMilestoneName(sprintNumber: number): string; /** * Get the GitHubRepository object from the provided repository URL. * @param repositoryUrl The repository URL to get the GitHubRepository object from. */ export declare function getGitHubRepositoryFromUrl(repositoryUrl: string): Repository | undefined; export {}; //# sourceMappingURL=github.d.ts.map