gitea源码

activity.go 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright 2023 The Gitea Authors. All rights reserved.
  2. // SPDX-License-Identifier: MIT
  3. package structs
  4. import "time"
  5. type Activity struct {
  6. // The unique identifier of the activity
  7. ID int64 `json:"id"`
  8. // The ID of the user who receives/sees this activity
  9. UserID int64 `json:"user_id"` // Receiver user
  10. // the type of action
  11. //
  12. // enum: create_repo,rename_repo,star_repo,watch_repo,commit_repo,create_issue,create_pull_request,transfer_repo,push_tag,comment_issue,merge_pull_request,close_issue,reopen_issue,close_pull_request,reopen_pull_request,delete_tag,delete_branch,mirror_sync_push,mirror_sync_create,mirror_sync_delete,approve_pull_request,reject_pull_request,comment_pull,publish_release,pull_review_dismissed,pull_request_ready_for_review,auto_merge_pull_request
  13. OpType string `json:"op_type"`
  14. // The ID of the user who performed the action
  15. ActUserID int64 `json:"act_user_id"`
  16. // The user who performed the action
  17. ActUser *User `json:"act_user"`
  18. // The ID of the repository associated with the activity
  19. RepoID int64 `json:"repo_id"`
  20. // The repository associated with the activity
  21. Repo *Repository `json:"repo"`
  22. // The ID of the comment associated with the activity (if applicable)
  23. CommentID int64 `json:"comment_id"`
  24. // The comment associated with the activity (if applicable)
  25. Comment *Comment `json:"comment"`
  26. // The name of the git reference (branch/tag) associated with the activity
  27. RefName string `json:"ref_name"`
  28. // Whether this activity is from a private repository
  29. IsPrivate bool `json:"is_private"`
  30. // Additional content or details about the activity
  31. Content string `json:"content"`
  32. // The date and time when the activity occurred
  33. Created time.Time `json:"created"`
  34. }