gitlab_comment.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package model
  2. const (
  3. //HookCommentTypeMR ...
  4. HookCommentTypeMR = "MergeRequest"
  5. )
  6. const (
  7. // CommentTypeStandard iota
  8. CommentTypeStandard = iota
  9. // CommentTypeMisaka ...
  10. CommentTypeMisaka
  11. // CommentTypeMmerge ...
  12. CommentTypeMmerge
  13. // CommentTypeMerge ...
  14. CommentTypeMerge
  15. // CommentTypeRider ...
  16. CommentTypeRider
  17. // CommentTypeDeploy ...
  18. CommentTypeDeploy
  19. // CommentTypeAddOne ...
  20. CommentTypeAddOne
  21. )
  22. // HookComment struct
  23. type HookComment struct {
  24. ObjectKind string `json:"object_kind"`
  25. User *User `json:"user"`
  26. ProjectID int64 `json:"project_id"`
  27. Project *Project `json:"project"`
  28. Repository *Repository `json:"repository"`
  29. ObjectAttributes *Comment `json:"object_attributes"`
  30. MergeRequest *MergeRequest `json:"merge_request"`
  31. Commit *Commit `json:"commit"`
  32. }
  33. // Comment struct
  34. type Comment struct {
  35. ID int64 `json:"id"`
  36. Note string `json:"note"`
  37. NoteableType string `json:"noteable_type"`
  38. AuthorID int64 `json:"author_id"`
  39. CreatedAt string `json:"created_at"`
  40. UpdatedAt string `json:"updated_at"`
  41. ProjectID int64 `json:"project_id"`
  42. Attachment string `json:"attachment"`
  43. LineCode string `json:"line_code"`
  44. CommitID string `json:"commit_id"`
  45. NoteableID int64 `json:"noteable_id"`
  46. System bool `json:"system"`
  47. STDiff string `json:"st_diff"`
  48. URL string `json:"url"`
  49. }