package main import "time" type PullRequest struct { ID string Owner string Repository string RepoWithOwner string Number int Title string URL string Author string IsDraft bool UpdatedAt time.Time ReviewCount int ViewerAuthored bool FromCache bool CachedAt time.Time } type PRDetails struct { PullRequest ViewerLogin string Body string CreatedAt time.Time BaseRef string HeadRef string Mergeable string MergeState string State string Merged bool MergedAt time.Time AutoMerge *AutoMergeRequest AllowedMergeMethods []string ConflictFiles []string ConflictFileError string Assignees []string Reviewers []Reviewer RequestedReviewers []string Labels []string Milestone string Additions int Deletions int ChangedFiles int CommitCount int CommentCount int HeadOID string BaseOID string RepositoryURL string CheckState string Checks []Check ReviewDecision string Conversation []PRComment Reviews []ReviewSummary Permissions ViewerPermissions Requirements MergeRequirements Threads []ReviewThread ThreadsTruncated bool Timeline []TimelineEvent DataIssues []DataIssue Rulesets []Ruleset MergeQueue *MergeQueue FromCache bool CachedAt time.Time } type DataIssue struct { Component string Message string } type PRDetailsEnrichment struct { Owner string Repository string Number int HeadOID string CheckAnnotations map[string][]CheckAnnotation ConflictFiles []string Issues []DataIssue } type PullRequestMetadata struct { Title string Body string BaseRef string Reviewers []string Assignees []string Mergeable string MergeState string UpdatedAt time.Time } type AutoMergeRequest struct { MergeMethod string EnabledBy string EnabledAt time.Time } type PullRequestMergeResult struct { Merged bool MergedAt time.Time } type RepositoryBranch struct { Name string UpdatedAt time.Time IsDefault bool } type RepositoryUser struct { ID string Login string Name string CanReview bool CanAssign bool RecentCommits int RecentAdditions int LastContributionAt time.Time } type PullRequestPeopleUpdate struct { CurrentReviewers []string CurrentAssignees []string Reviewers []string Assignees []string } type PullRequestPeople struct { Reviewers []string Assignees []string } type Check struct { ID string Name string State string Conclusion string URL string Summary string Annotations []CheckAnnotation } type CheckAnnotation struct { Path string StartLine int EndLine int Level string Title string Message string } type TimelineEvent struct { Kind string OID string BeforeOID string AfterOID string Author string Title string CreatedAt time.Time } type Ruleset struct { Name string Enforcement string RuleTypes []string Applies bool } type MergeQueue struct { State string Position int EnqueuedAt time.Time EstimatedSeconds int } type PRComment struct { ID string Author string Body string URL string CreatedAt time.Time } type ReviewSummary struct { ID string Author string Body string State string URL string CommitOID string SubmittedAt time.Time } type ViewerPermissions struct { Repository string CanUpdatePR bool CanAssign bool CanResolveAny bool CanUnresolveAny bool CanReplyAny bool CanReact bool CanSubscribe bool CanEnableMerge bool CanDisableMerge bool } type MergeRequirements struct { ApprovalsRequired int RequiresApprovals bool RequiresStatusChecks bool RequiresConversation bool RequiresCodeOwnerReview bool RequiresDeployments bool RequiredDeployments []string RequiresStrictChecks bool RequiresLinearHistory bool RequiresSignatures bool RequiresMergeQueue bool } type Reviewer struct { Login string State string } type ReviewThread struct { ID string Path string Line int StartLine int DiffSide string IsResolved bool IsOutdated bool IsTruncated bool ViewerCanResolve bool ViewerCanUnresolve bool ViewerCanReply bool Comments []ReviewComment Origin string Provider string Model string HeadOID string Fingerprint string } type ReviewComment struct { ID string Author string Body string DiffHunk string Line int StartLine int OriginalLine int OriginalStartLine int OriginalCommitOID string Outdated bool CreatedAt time.Time URL string Reactions []ReactionSummary Origin string Provider string Model string } const ( reviewOriginLocalAI = "local-ai" reviewOriginLocalAIUser = "local-ai-user" ) type ReactionSummary struct { Content string Count int ViewerHasReacted bool }