dmitri.shuralyov.com/state/...

add Review type and values

This type will be used for representing possible states of a change
review across different code review systems (GitHub PRs, Gerrit CLs,
and other custom changes).

The possible values are largely based on the code review conventions
set up for the Go project. They are described at
https://groups.google.com/d/msg/golang-dev/YU56eKYiXJg/K1CkXo7Iy0gJ.

This is a starting point, the values may change if compelling reasons
to do so are discovered.
dmitshur committed 5 years ago commit 2cf192113e663d5cb0dd411ea77bac3b8619a8a1
Collapse all
state.go
@@ -17,5 +17,16 @@ type Change string
const (
	ChangeOpen   Change = "open"   // A change that is still open.
	ChangeClosed Change = "closed" // A change that has been closed without being merged.
	ChangeMerged Change = "merged" // A change that has been closed by being merged.
)

// Review represents the possible states of a change review.
type Review int8

const (
	ReviewPlus2   Review = +2 // Looks good to me, approved.
	ReviewPlus1   Review = +1 // Looks good to me, but someone else must approve.
	ReviewNoScore Review = 0  // No score, just a comment.
	ReviewMinus1  Review = -1 // I would prefer this is not merged as is, and here's why.
	ReviewMinus2  Review = -2 // This shall not be merged, and here's why.
)