Add separate type for PullRequest.Mergeable field

Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>
This commit is contained in:
Babak K. Shandiz 2024-07-16 15:28:27 +01:00
parent 1a6f59820e
commit feb5aa55b9
No known key found for this signature in database
GPG key ID: 44950AED81AD710F

View file

@ -16,6 +16,14 @@ type PullRequestAndTotalCount struct {
SearchCapped bool
}
type PullRequestMergeable string
const (
PullRequestMergeableConflicting PullRequestMergeable = "CONFLICTING"
PullRequestMergeableMergeable PullRequestMergeable = "MERGEABLE"
PullRequestMergeableUnknown PullRequestMergeable = "UNKNOWN"
)
type PullRequest struct {
ID string
Number int
@ -27,7 +35,7 @@ type PullRequest struct {
HeadRefName string
HeadRefOid string
Body string
Mergeable string
Mergeable PullRequestMergeable
Additions int
Deletions int
ChangedFiles int