MCPcopy Index your code
hub / github.com/cli/cli / totalApprovals

Function totalApprovals

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

Source from the content-addressed store, hash-verified

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

Callers 1

printPrsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected