Merge pull request #3351 from cristiand391/fix-pr-reopen

Fix detecting PR status when passing branch as arg
This commit is contained in:
Nate Smith 2021-04-20 11:41:16 -05:00 committed by GitHub
commit d09896468d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 55 additions and 14 deletions

View file

@ -34,7 +34,6 @@ type PullRequest struct {
Number int
Title string
State string
Closed bool
URL string
BaseRefName string
HeadRefName string
@ -165,6 +164,10 @@ func (pr PullRequest) Identifier() string {
return pr.ID
}
func (pr PullRequest) IsOpen() bool {
return pr.State == "OPEN"
}
type PullRequestReviewStatus struct {
ChangesRequested bool
Approved bool