-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jc/verbose num of approvers needed #36
Conversation
policy/approval/approve.go
Outdated
@@ -207,7 +207,7 @@ func (r *Rule) IsApproved(ctx context.Context, prctx pull.Context) (bool, string | |||
return false, msg, nil | |||
} | |||
|
|||
msg := fmt.Sprintf("%s needed", numberOfApprovals(remaining)) | |||
msg := fmt.Sprintf("%s needed (of required %d)", numberOfApprovals(remaining), r.Requires.Count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about formatting this as 1/n approvals required
? I supposed we'd have to change how numberOfApprovals
works, but it might be more natural to read than the parenthetical suffix.
Related, should we update the message on L204 as well?
using "current/required approvals needed" messaging |
numberOfApprovals(len(candidates))) | ||
return false, msg, nil | ||
} | ||
|
||
msg := fmt.Sprintf("%s needed", numberOfApprovals(remaining)) | ||
msg := fmt.Sprintf("%d/%d approvals required", len(approvers), r.Requires.Count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: required
vs. needed
in the other message. I have a slight preference for "required", but mostly want them to match.
Display in the policy UI how many approvals are required in total for a rule to pass.