gitea源码

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. # type Comment struct {
  2. # ID int64 `xorm:"pk autoincr"`
  3. # Type int `xorm:"INDEX"`
  4. # IssueID int64 `xorm:"INDEX"`
  5. # LabelID int64
  6. # }
  7. #
  8. # we are only interested in type 7
  9. #
  10. -
  11. id: 1 # Should remain
  12. type: 6
  13. issue_id: 1
  14. label_id: 0
  15. should_remain: true
  16. -
  17. id: 2 # Should remain
  18. type: 7
  19. issue_id: 1 # repo_id: 1
  20. label_id: 1 # repo_id: 1
  21. should_remain: true
  22. -
  23. id: 3 # Should remain
  24. type: 7
  25. issue_id: 2 # repo_id: 2 owner_id: 1
  26. label_id: 2 # org_id: 1
  27. should_remain: true
  28. -
  29. id: 4 # Should be DELETED
  30. type: 7
  31. issue_id: 1 # repo_id: 1
  32. label_id: 3 # repo_id: 2
  33. should_remain: false
  34. -
  35. id: 5 # Should remain
  36. type: 7
  37. issue_id: 3 # repo_id: 1
  38. label_id: 1 # repo_id: 1
  39. should_remain: true
  40. -
  41. id: 6 # Should be DELETED
  42. type: 7
  43. issue_id: 3 # repo_id: 1 owner_id: 2
  44. label_id: 2 # org_id: 1
  45. should_remain: false
  46. -
  47. id: 7 # Should be DELETED
  48. type: 7
  49. issue_id: 3 # repo_id: 1 owner_id: 2
  50. label_id: 5 # repo_id: 3
  51. should_remain: false