MCPcopy
hub / github.com/1Password/for-open-source / Review

Method Review

script/reviewer.go:24–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22}
23
24func (r *Reviewer) Review() {
25 if err := r.gitHub.Init(); err != nil {
26 r.logErrorAndExit("could not initialize GitHub client", err)
27 }
28
29 if err := r.gitHub.InitIssue(); err != nil {
30 r.logErrorAndExit("could not initialize GitHub issue", err)
31 }
32
33 r.application.Parse(r.gitHub.Issue)
34
35 status := r.getStatus()
36 isClosed := *r.gitHub.Issue.State == "closed"
37 issueAuthor := *r.gitHub.Issue.User.Login
38
39 r.updateLabels(status, isClosed)
40 r.createComment(status, isClosed, issueAuthor)
41}
42
43func (r *Reviewer) getStatus() Status {
44 if r.gitHub.IssueHasLabel(LabelStatusApproved) {

Callers 1

mainFunction · 0.95

Calls 7

logErrorAndExitMethod · 0.95
getStatusMethod · 0.95
updateLabelsMethod · 0.95
createCommentMethod · 0.95
InitMethod · 0.80
InitIssueMethod · 0.80
ParseMethod · 0.80

Tested by

no test coverage detected