UNPKG

buddy-bot

Version:

Automated & optimized dependency updates for JavaScript & TypeScript projects. Like Renovate & Dependabot.

37 lines 2.61 kB
import type { FileChange, GitProvider, Issue, IssueOptions, PullRequest, PullRequestOptions } from '../types'; export declare class GitHubProvider implements GitProvider { readonly private apiUrl: any; private readonly token: string; private readonly owner: string; private readonly repo: string; private readonly hasWorkflowPermissions?: boolean; constructor(token: string, owner: string, repo: string, hasWorkflowPermissions?: boolean); createBranch(branchName: string, baseBranch: string): Promise<void>; commitChanges(branchName: string, message: string, files: FileChange[]): Promise<void>; private commitChangesWithGit(branchName: string, message: string, files: FileChange[]): Promise<void>; private commitChangesWithAPI(branchName: string, message: string, files: FileChange[]): Promise<void>; createPullRequest(options: PullRequestOptions): Promise<PullRequest>; private createPullRequestWithCLI(options: PullRequestOptions): Promise<PullRequest>; private createPullRequestWithAPI(options: PullRequestOptions): Promise<PullRequest>; runCommand(command: string, args: string[]): Promise<string>; getPullRequests(state?: 'open' | 'closed' | 'all'): Promise<PullRequest[]>; updatePullRequest(prNumber: number, options: Partial<PullRequestOptions>): Promise<PullRequest>; closePullRequest(prNumber: number): Promise<void>; createComment(prNumber: number, comment: string): Promise<void>; mergePullRequest(prNumber: number, strategy?: 'merge' | 'squash' | 'rebase'): Promise<void>; deleteBranch(branchName: string): Promise<void>; getBuddyBotBranches(): Promise<Array<{ name: string, sha: string, lastCommitDate: Date }>>; private getBuddyBotBranchesViaAPI(): Promise<Array<{ name: string, sha: string, lastCommitDate: Date }>>; getOrphanedBuddyBotBranches(): Promise<Array<{ name: string, sha: string, lastCommitDate: Date }>>; private isPROpen(prNumber: number): Promise<boolean>; private httpDetectionSuccessful: any; private getOpenPRBranchesViaGit(): Promise<Set<string>>; cleanupStaleBranches(olderThanDays?: any, dryRun?: any): Promise<{ deleted: string[], failed: string[] }>; private apiRequest(endpoint: string, data?: any): Promise<any>; private apiRequestWithRetry(endpoint: string, data?: any, maxRetries?: any): Promise<any>; createIssue(options: IssueOptions): Promise<Issue>; getIssues(state?: 'open' | 'closed' | 'all'): Promise<Issue[]>; updateIssue(issueNumber: number, options: Partial<IssueOptions>): Promise<Issue>; closeIssue(issueNumber: number): Promise<void>; unpinIssue(issueNumber: number): Promise<void>; }