MCPcopy Create free account
hub / github.com/ejoffe/spr / Ready

Method Ready

github/pullrequest.go:79–93  ·  view source on GitHub ↗

Ready returns true if pull request is ready to merge

(config *config.Config)

Source from the content-addressed store, hash-verified

77
78// Ready returns true if pull request is ready to merge
79func (pr *PullRequest) Ready(config *config.Config) bool {
80 if pr.Commit.WIP {
81 return false
82 }
83 if !pr.MergeStatus.NoConflicts {
84 return false
85 }
86 if config.Repo.RequireChecks && pr.MergeStatus.ChecksPass != CheckStatusPass {
87 return false
88 }
89 if config.Repo.RequireApproval && !pr.MergeStatus.ReviewApproved {
90 return false
91 }
92 return true
93}
94
95const (
96 // Terminal escape codes for colors

Callers 2

TestReadyFunction · 0.80
GetInfoMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestReadyFunction · 0.64