Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (#35418)

This commit is contained in:
Lunny Xiao
2025-09-06 09:52:41 -07:00
committed by GitHub
parent b8f1c9f048
commit c290682521
51 changed files with 1928 additions and 656 deletions

View File

@@ -6,20 +6,32 @@ package structs
import "time"
type Activity struct {
ID int64 `json:"id"`
// The unique identifier of the activity
ID int64 `json:"id"`
// The ID of the user who receives/sees this activity
UserID int64 `json:"user_id"` // Receiver user
// the type of action
//
// 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
OpType string `json:"op_type"`
ActUserID int64 `json:"act_user_id"`
ActUser *User `json:"act_user"`
RepoID int64 `json:"repo_id"`
Repo *Repository `json:"repo"`
CommentID int64 `json:"comment_id"`
Comment *Comment `json:"comment"`
RefName string `json:"ref_name"`
IsPrivate bool `json:"is_private"`
Content string `json:"content"`
Created time.Time `json:"created"`
OpType string `json:"op_type"`
// The ID of the user who performed the action
ActUserID int64 `json:"act_user_id"`
// The user who performed the action
ActUser *User `json:"act_user"`
// The ID of the repository associated with the activity
RepoID int64 `json:"repo_id"`
// The repository associated with the activity
Repo *Repository `json:"repo"`
// The ID of the comment associated with the activity (if applicable)
CommentID int64 `json:"comment_id"`
// The comment associated with the activity (if applicable)
Comment *Comment `json:"comment"`
// The name of the git reference (branch/tag) associated with the activity
RefName string `json:"ref_name"`
// Whether this activity is from a private repository
IsPrivate bool `json:"is_private"`
// Additional content or details about the activity
Content string `json:"content"`
// The date and time when the activity occurred
Created time.Time `json:"created"`
}