MCPcopy Create free account
hub / github.com/cli/cli / totalApprovals

Function totalApprovals

pkg/cmd/pr/status/status.go:220–228  ·  view source on GitHub ↗
(pr *api.PullRequest)

Source from the content-addressed store, hash-verified

218}
219
220func totalApprovals(pr *api.PullRequest) int {
221 approvals := 0
222 for _, review := range pr.LatestReviews.Nodes {
223 if review.State == "APPROVED" {
224 approvals++
225 }
226 }
227 return approvals
228}
229
230func printPrs(io *iostreams.IOStreams, totalCount int, prs ...api.PullRequest) {
231 w := io.Out

Callers 1

printPrsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected