Add more QoL and high prio features
This commit is contained in:
120
types.go
120
types.go
@@ -15,6 +15,8 @@ type PullRequest struct {
|
||||
UpdatedAt time.Time
|
||||
ReviewCount int
|
||||
ViewerAuthored bool
|
||||
FromCache bool
|
||||
CachedAt time.Time
|
||||
}
|
||||
|
||||
type PRDetails struct {
|
||||
@@ -34,10 +36,107 @@ type PRDetails struct {
|
||||
ChangedFiles int
|
||||
CommitCount int
|
||||
CommentCount int
|
||||
HeadOID string
|
||||
CheckState string
|
||||
Checks []Check
|
||||
ReviewDecision string
|
||||
Conversation []PRComment
|
||||
Reviews []ReviewSummary
|
||||
Permissions ViewerPermissions
|
||||
Requirements MergeRequirements
|
||||
Threads []ReviewThread
|
||||
ThreadsTruncated bool
|
||||
Timeline []TimelineEvent
|
||||
Rulesets []Ruleset
|
||||
MergeQueue *MergeQueue
|
||||
FromCache bool
|
||||
CachedAt time.Time
|
||||
}
|
||||
|
||||
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
|
||||
CanResolveAny bool
|
||||
CanUnresolveAny bool
|
||||
CanReplyAny bool
|
||||
CanReact bool
|
||||
CanSubscribe bool
|
||||
CanEnableMerge 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 {
|
||||
@@ -46,15 +145,18 @@ type Reviewer struct {
|
||||
}
|
||||
|
||||
type ReviewThread struct {
|
||||
ID string
|
||||
Path string
|
||||
Line int
|
||||
StartLine int
|
||||
DiffSide string
|
||||
IsResolved bool
|
||||
IsOutdated bool
|
||||
IsTruncated bool
|
||||
Comments []ReviewComment
|
||||
ID string
|
||||
Path string
|
||||
Line int
|
||||
StartLine int
|
||||
DiffSide string
|
||||
IsResolved bool
|
||||
IsOutdated bool
|
||||
IsTruncated bool
|
||||
ViewerCanResolve bool
|
||||
ViewerCanUnresolve bool
|
||||
ViewerCanReply bool
|
||||
Comments []ReviewComment
|
||||
}
|
||||
|
||||
type ReviewComment struct {
|
||||
|
||||
Reference in New Issue
Block a user