74 lines
1.4 KiB
Go
74 lines
1.4 KiB
Go
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
|
|
}
|
|
|
|
type PRDetails struct {
|
|
PullRequest
|
|
Body string
|
|
CreatedAt time.Time
|
|
BaseRef string
|
|
HeadRef string
|
|
Mergeable string
|
|
MergeState string
|
|
Assignees []string
|
|
Reviewers []Reviewer
|
|
Labels []string
|
|
Milestone string
|
|
Additions int
|
|
Deletions int
|
|
ChangedFiles int
|
|
CommitCount int
|
|
CommentCount int
|
|
CheckState string
|
|
ReviewDecision string
|
|
Threads []ReviewThread
|
|
ThreadsTruncated 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
|
|
Comments []ReviewComment
|
|
}
|
|
|
|
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
|
|
}
|