Adding upstream version 3.10.8.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
37e9b6d587
commit
03bfe4079e
356 changed files with 28857 additions and 0 deletions
48
f3/review.go
Normal file
48
f3/review.go
Normal file
|
@ -0,0 +1,48 @@
|
|||
// Copyright Earl Warren <contact@earl-warren.org>
|
||||
// Copyright Loïc Dachary <loic@dachary.org>
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package f3
|
||||
|
||||
import "time"
|
||||
|
||||
const (
|
||||
ReviewStatePending = "PENDING"
|
||||
ReviewStateApproved = "APPROVED"
|
||||
ReviewStateChangesRequested = "CHANGES_REQUESTED"
|
||||
ReviewStateCommented = "COMMENTED"
|
||||
ReviewStateRequestReview = "REQUEST_REVIEW"
|
||||
ReviewStateUnknown = ""
|
||||
)
|
||||
|
||||
type Review struct {
|
||||
Common
|
||||
ReviewerID *Reference `json:"reviewer_id"`
|
||||
Official bool `json:"official"`
|
||||
CommitID string `json:"commit_id"`
|
||||
Content string `json:"content"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
State string `json:"state"`
|
||||
}
|
||||
|
||||
func (o Review) Equal(other Review) bool {
|
||||
return o.Common.Equal(other.Common) &&
|
||||
nilOrEqual(o.ReviewerID, other.ReviewerID) &&
|
||||
o.CommitID == other.CommitID &&
|
||||
o.Content == other.Content &&
|
||||
o.State == other.State
|
||||
}
|
||||
|
||||
func (o *Review) GetReferences() References {
|
||||
references := o.Common.GetReferences()
|
||||
if !o.ReviewerID.IsNil() {
|
||||
references = append(references, o.ReviewerID)
|
||||
}
|
||||
return references
|
||||
}
|
||||
|
||||
func (o *Review) Clone() Interface {
|
||||
clone := &Review{}
|
||||
*clone = *o
|
||||
return clone
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue