Skip to content

Commit 4c26752

Browse files
committed
pkg/kepval: clarify prr required check
Make it more obvious that PRR is only getting checked when status is implementable. Don't return early, so that missing data warnings start to show through
1 parent 9dc4f04 commit 4c26752

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

pkg/kepval/approval.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,10 @@ func ValidatePRR(kep *api.Proposal, h *api.PRRHandler, prrDir string) error {
100100
func isPRRRequired(kep *api.Proposal) (required, missingMilestone, missingStage bool, err error) {
101101
logrus.Debug("checking if PRR is required")
102102

103-
required = true
103+
required = kep.Status == api.ImplementableStatus
104104
missingMilestone = kep.IsMissingMilestone()
105105
missingStage = kep.IsMissingStage()
106106

107-
if kep.Status != api.ImplementableStatus {
108-
required = false
109-
return required, missingMilestone, missingStage, nil
110-
}
111-
112107
if missingMilestone {
113108
logrus.Warnf("Missing the latest milestone field: %s", kep.Filename)
114109
return required, missingMilestone, missingStage, nil

0 commit comments

Comments
 (0)