You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

review.go 1.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package base
  5. import "time"
  6. // enumerate all review states
  7. const (
  8. ReviewStatePending = "PENDING"
  9. ReviewStateApproved = "APPROVED"
  10. ReviewStateChangesRequested = "CHANGES_REQUESTED"
  11. ReviewStateCommented = "COMMENTED"
  12. )
  13. // Review is a standard review information
  14. type Review struct {
  15. ID int64
  16. IssueIndex int64
  17. ReviewerID int64
  18. ReviewerName string
  19. Official bool
  20. CommitID string
  21. Content string
  22. CreatedAt time.Time
  23. State string // PENDING, APPROVED, REQUEST_CHANGES, or COMMENT
  24. Comments []*ReviewComment
  25. }
  26. // ReviewComment represents a review comment
  27. type ReviewComment struct {
  28. ID int64
  29. InReplyTo int64
  30. Content string
  31. TreePath string
  32. DiffHunk string
  33. Position int
  34. CommitID string
  35. PosterID int64
  36. Reactions []*Reaction
  37. CreatedAt time.Time
  38. UpdatedAt time.Time
  39. }