import { Issue, Label } from '../../entities/Issue'; import { FieldOption, Project } from '../../entities/Project'; import { IssueSummary } from '../../entities/IssueSummary'; import { Member } from '../../entities/Member'; import { SearchedIssue } from '../../entities/SearchedIssue'; import { StoryObjectMap } from '../../entities/StoryObjectMap'; import { ProjectFieldWriteOutcome } from '../../entities/ProjectFieldWriteOutcome'; export type RelatedPullRequest = { url: string; branchName: string | null; createdAt: Date; isDraft: boolean; isConflicted: boolean; mergeable: string | null; isPassedAllCiJob: boolean; isCiStateSuccess: boolean; isCiFailing?: boolean; isResolvedAllReviewComments: boolean; isBranchOutOfDate: boolean; missingRequiredCheckNames: string[]; reviewDecision: string | null; }; export type OpenPullRequestCiStatus = { url: string; branchName: string | null; createdAt: string | null; isDraft: boolean; isConflicted: boolean; mergeable: string | null; isPassedAllCiJob: boolean; isCiStateSuccess: boolean; isBranchOutOfDate: boolean; missingRequiredCheckNames: string[]; }; export type IssueComment = { id: number; author: string; body: string; createdAt: Date; }; export type PullRequestFile = { filename: string; status: string; additions: number; deletions: number; patch: string | null; rawUrl: string | null; }; export type PullRequestDetail = { title: string; state: string; merged: boolean; isDraft: boolean; additions: number; deletions: number; changedFiles: number; headRefName: string; baseRefName: string; author: string; files: PullRequestFile[]; }; export type PullRequestCommit = { sha: string; message: string; author: string; authoredAt: Date; }; export type PullRequestReviewCommentSide = 'LEFT' | 'RIGHT'; export type PullRequestReviewInlineLocation = { line: number; side: PullRequestReviewCommentSide; }; export interface IssueRepository { getAllIssues: (projectId: Project['id']) => Promise<{ issues: Issue[]; project: Project; cacheUsed: boolean; }>; appendIssueToProjectCache: (projectId: Project['id'], issue: Issue) => Promise; removeIssueFromProjectCache: (projectId: Project['id'], issue: Issue) => Promise; getIssueByUrl: (url: string, options?: { bypassCache?: boolean; }) => Promise; getIssueBodyByUrl: (url: string) => Promise; createNewIssue: (org: string, repo: string, title: string, body: string, assignees: Member['name'][], labels: Label[], projectId?: Project['id'], storyOptionName?: string) => Promise; searchIssue: (query: { owner: string; repositoryName: string; type?: 'issue' | 'pr'; state?: 'open' | 'closed' | 'all'; title?: string; createdFrom?: string; assignee?: string; }) => Promise<{ url: string; title: string; number: string; }[]>; updateIssue: (issue: Issue) => Promise; updateIssueBody: (issue: Pick, body: string) => Promise; updateIssueCommentBody: (comment: Pick & { commentId: number; }, body: string) => Promise; updateNextActionDate: (issueUrl: string, project: Project, date: Date, projectItemId?: string) => Promise; updateNextActionHour: (project: Project & { nextActionHour: NonNullable; }, issue: Issue, hour: number) => Promise; updateProjectTextField: (project: Project, fieldId: string, issue: Issue, text: string) => Promise; updateStory: (project: Project & { story: NonNullable; }, issue: Issue, storyId: FieldOption['id']) => Promise; updateStoryOptionColor: (project: Project & { story: NonNullable; }, storyOptionId: string, newColor: FieldOption['color']) => Promise; updateStatus: (project: Project, issue: Issue, statusId: string) => Promise; clearProjectField: (project: Project, fieldId: string, issue: Issue) => Promise; createComment: (issue: Issue, commentBody: string) => Promise; updateLabels: (issue: Issue, labels: Issue['labels']) => Promise; removeLabel: (issue: Issue, label: Label) => Promise; getOrCreateLabel: (org: string, repo: string, labelName: string) => Promise; updateAssigneeList: (issue: Pick, assigneeList: Member['name'][]) => Promise; searchIssues: (query: string) => Promise; getIssueSummariesByLabelAndState: (params: { owner: string; repositoryName: string; label: string; state: 'open' | 'closed'; }) => Promise; get: (issueUrl: string, project: Project) => Promise; update: (issue: Issue, project: Project) => Promise; findRelatedOpenPRs: (issueUrl: string, options?: { bypassCache?: boolean; }) => Promise; findRelatedOpenPrUrls: (issueUrls: string[]) => Promise>; getOpenPullRequest: (prUrl: string) => Promise; getOpenPullRequestCiStatus: (prUrl: string) => Promise; getOpenPullRequests: (prUrls: string[]) => Promise>; getPullRequestChangedFilePaths: (prUrl: string) => Promise; getAuthenticatedUserLogin: () => Promise; approvePullRequest: (prUrl: string) => Promise; mergePullRequest: (prUrl: string) => Promise; requestChangesWithInlineComment: (prUrl: string, changedFilePath: string | null, commentBody: string, inlineCommentLocation?: PullRequestReviewInlineLocation | null) => Promise; createPullRequestReviewComment: (prUrl: string, path: string, line: number, side: PullRequestReviewCommentSide, commentBody: string) => Promise; closePullRequest: (prUrl: string) => Promise; closeIssueByUrl: (issueUrl: string, stateReason: 'completed' | 'not_planned') => Promise; reopenIssueByUrl: (issueUrl: string) => Promise; getLatestReopenedEventAt: (issue: Issue) => Promise; deletePullRequestBranch: (prUrl: string, branchName: string) => Promise; createCommentByUrl: (issueOrPrUrl: string, commentBody: string) => Promise; getAllOpened: (project: Project) => Promise; getStoryObjectMap: (project: Project) => Promise; addIssueToProject: (project: Project, issueUrl: string) => Promise; removeIssueFromProject: (project: Project, issueUrl: string) => Promise; updateStoryByProjectItemId: (project: Project & { story: NonNullable; }, projectItemId: string, storyOptionId: string) => Promise; setDependedIssueUrl: (prUrl: string, project: Project, issueUrl: string) => Promise; setIssueAgentField: (issueUrl: string, project: Project, agentOptionId: string) => Promise; getIssueOrPullRequestBody: (url: string) => Promise; getIssueOrPullRequestComments: (url: string, options?: { issueUpdatedAt?: Date; }) => Promise; getPullRequestDetail: (prUrl: string) => Promise; getPullRequestCommits: (prUrl: string) => Promise; getIssueOrPullRequestState: (url: string) => Promise<{ state: string; merged: boolean; isPullRequest: boolean; title: string; stateReason: string; }>; getPullRequestSummary: (prUrl: string) => Promise<{ title: string; body: string; additions: number; deletions: number; changedFiles: number; } | null>; updateBranch: (prUrl: string) => Promise; deleteAllCommentsByUrl: (issueOrPrUrl: string) => Promise; } //# sourceMappingURL=IssueRepository.d.ts.map