diff --git a/gitee/payload.go b/gitee/payload.go index 9083238..4dd7310 100644 --- a/gitee/payload.go +++ b/gitee/payload.go @@ -5,285 +5,285 @@ import ( ) type CommentEventPayload struct { - Action *string `json:"action,omitempty"` - Comment *NoteHook `json:"comment,omitempty"` - Repository *ProjectHook `json:"repository,omitempty"` - Project *ProjectHook `json:"project,omitempty"` - Author *UserHook `json:"author,omitempty"` - Sender *UserHook `json:"sender,omitempty"` - URL *string `json:"url,omitempty"` - Note *string `json:"note,omitempty"` - NoteableType *string `json:"noteable_type,omitempty"` - NoteableID int64 `json:"noteable_id,omitempty"` - Title *string `json:"title,omitempty"` - PerIID *string `json:"per_iid,omitempty"` - ShortCommitID *string `json:"short_commit_id,omitempty"` - Enterprise *EnterpriseHook `json:"enterprise,omitempty"` - PullRequest *PullRequestHook `json:"pull_request,omitempty"` - Issue *IssueHook `json:"issue,omitempty"` - HookName *string `json:"hook_name,omitempty"` - Password *string `json:"password,omitempty"` + Action string `json:"action"` + Comment NoteHook `json:"comment"` + Repository ProjectHook `json:"repository"` + Project ProjectHook `json:"project"` + Author UserHook `json:"author"` + Sender UserHook `json:"sender"` + URL string `json:"url"` + Note string `json:"note"` + NoteableType string `json:"noteable_type"` + NoteableID int64 `json:"noteable_id"` + Title string `json:"title"` + PerIID string `json:"per_iid"` + ShortCommitID string `json:"short_commit_id"` + Enterprise EnterpriseHook `json:"enterprise"` + PullRequest PullRequestHook `json:"pull_request"` + Issue IssueHook `json:"issue"` + HookName string `json:"hook_name"` + Password string `json:"password"` } type PushEventPayload struct { - Ref *string `json:"ref,omitempty"` - Before *string `json:"before,omitempty"` - After *string `json:"after,omitempty"` - TotalCommitsCount int64 `json:"total_commits_count,omitempty"` - CommitsMoreThanTen *bool `json:"commits_more_than_ten,omitempty"` - Created *bool `json:"created,omitempty"` - Deleted *bool `json:"deleted,omitempty"` - Compare *string `json:"compare,omitempty"` - Commits []CommitHook `json:"commits,omitempty"` - HeadCommit *CommitHook `json:"head_commit,omitempty"` - Repository *ProjectHook `json:"repository,omitempty"` - Project *ProjectHook `json:"project,omitempty"` - UserID int64 `json:"user_id,omitempty"` - UserName *string `json:"user_name,omitempty"` - User *UserHook `json:"user,omitempty"` - Pusher *UserHook `json:"pusher,omitempty"` - Sender *UserHook `json:"sender,omitempty"` - Enterprise *EnterpriseHook `json:"enterprise,omitempty"` - HookName *string `json:"hook_name,omitempty"` - Password *string `json:"password,omitempty"` + Ref string `json:"ref"` + Before string `json:"before"` + After string `json:"after"` + TotalCommitsCount int64 `json:"total_commits_count"` + CommitsMoreThanTen bool `json:"commits_more_than_ten"` + Created bool `json:"created"` + Deleted bool `json:"deleted"` + Compare string `json:"compare"` + Commits []CommitHook `json:"commits"` + HeadCommit CommitHook `json:"head_commit"` + Repository ProjectHook `json:"repository"` + Project ProjectHook `json:"project"` + UserID int64 `json:"user_id"` + UserName string `json:"user_name"` + User UserHook `json:"user"` + Pusher UserHook `json:"pusher"` + Sender UserHook `json:"sender"` + Enterprise EnterpriseHook `json:"enterprise"` + HookName string `json:"hook_name"` + Password string `json:"password"` } type IssueEventPayload struct { - Action *string `json:"action,omitempty"` - Issue *IssueHook `json:"issue,omitempty"` - Repository *ProjectHook `json:"repository,omitempty"` - Project *ProjectHook `json:"project,omitempty"` - Sender *UserHook `json:"sender,omitempty"` - TargetUser *UserHook `json:"target_user,omitempty"` - User *UserHook `json:"user,omitempty"` - Assignee *UserHook `json:"assignee,omitempty"` - UpdatedBy *UserHook `json:"updated_by,omitempty"` - IID string `json:"iid,omitempty"` - Title *string `json:"title,omitempty"` - Description *string `json:"description,omitempty"` - State *string `json:"state,omitempty"` - Milestone *string `json:"milestone,omitempty"` - URL *string `json:"url,omitempty"` - Enterprise *EnterpriseHook `json:"enterprise,omitempty"` - HookName *string `json:"hook_name,omitempty"` - Password *string `json:"password,omitempty"` + Action string `json:"action"` + Issue IssueHook `json:"issue"` + Repository ProjectHook `json:"repository"` + Project ProjectHook `json:"project"` + Sender UserHook `json:"sender"` + TargetUser UserHook `json:"target_user"` + User UserHook `json:"user"` + Assignee UserHook `json:"assignee"` + UpdatedBy UserHook `json:"updated_by"` + IID string `json:"iid"` + Title string `json:"title"` + Description string `json:"description"` + State string `json:"state"` + Milestone string `json:"milestone"` + URL string `json:"url"` + Enterprise EnterpriseHook `json:"enterprise"` + HookName string `json:"hook_name"` + Password string `json:"password"` } type MergeRequestEventPayload struct { - Action *string `json:"action,omitempty"` - ActionDesc *string `json:"action_desc,omitempty"` - PullRequest *PullRequestHook `json:"pull_request,omitempty"` - Number int64 `json:"number,omitempty"` - IID int64 `json:"iid,omitempty"` - Title *string `json:"title,omitempty"` - Body *string `json:"body,omitempty"` - State *string `json:"state,omitempty"` - MergeStatus *string `json:"merge_status,omitempty"` - MergeCommitSha *string `json:"merge_commit_sha,omitempty"` - URL *string `json:"url,omitempty"` - SourceBranch *string `json:"source_branch,omitempty"` - SourceRepo *RepoInfo `json:"source_repo,omitempty"` - TargetBranch *string `json:"target_branch,omitempty"` - TargetRepo *RepoInfo `json:"target_repo,omitempty"` - Project *ProjectHook `json:"project,omitempty"` - Repository *ProjectHook `json:"repository,omitempty"` - Author *UserHook `json:"author,omitempty"` - UpdatedBy *UserHook `json:"updated_by,omitempty"` - Sender *UserHook `json:"sender,omitempty"` - TargetUser *UserHook `json:"target_user,omitempty"` - Enterprise *EnterpriseHook `json:"enterprise,omitempty"` - HookName *string `json:"hook_name,omitempty"` - Password *string `json:"password,omitempty"` + Action string `json:"action"` + ActionDesc string `json:"action_desc"` + PullRequest PullRequestHook `json:"pull_request"` + Number int64 `json:"number"` + IID int64 `json:"iid"` + Title string `json:"title"` + Body string `json:"body"` + State string `json:"state"` + MergeStatus string `json:"merge_status"` + MergeCommitSha string `json:"merge_commit_sha"` + URL string `json:"url"` + SourceBranch string `json:"source_branch"` + SourceRepo RepoInfo `json:"source_repo"` + TargetBranch string `json:"target_branch"` + TargetRepo RepoInfo `json:"target_repo"` + Project ProjectHook `json:"project"` + Repository ProjectHook `json:"repository"` + Author UserHook `json:"author"` + UpdatedBy UserHook `json:"updated_by"` + Sender UserHook `json:"sender"` + TargetUser UserHook `json:"target_user"` + Enterprise EnterpriseHook `json:"enterprise"` + HookName string `json:"hook_name"` + Password string `json:"password"` } type TagEventPayload struct { - Action *string `json:"action,omitempty"` + Action string `json:"action"` } // RepoInfo : Repository information type RepoInfo struct { - Project *ProjectHook `json:"project,omitempty"` - Repository *ProjectHook `json:"repository,omitempty"` + Project ProjectHook `json:"project"` + Repository ProjectHook `json:"repository"` } // LabelHook : Label, issue and pull request labels type LabelHook struct { - Id int32 `json:"id,omitempty"` - Name string `json:"name,omitempty"` - Color string `json:"color,omitempty"` + Id int64 `json:"id"` + Name string `json:"name"` + Color string `json:"color"` } // EnterpriseHook : Enterprise information type EnterpriseHook struct { - Name string `json:"name,omitempty"` - Url string `json:"url,omitempty"` + Name string `json:"name"` + Url string `json:"url"` } // NoteHook : comment information type NoteHook struct { - Id int32 `json:"id,omitempty"` - Body string `json:"body,omitempty"` - User *UserHook `json:"user,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - UpdatedAt string `json:"updated_at,omitempty"` - HtmlUrl string `json:"html_url,omitempty"` - Position string `json:"position,omitempty"` - CommitId string `json:"commit_id,omitempty"` + Id int64 `json:"id"` + Body string `json:"body"` + User UserHook `json:"user"` + CreatedAt string `json:"created_at"` + UpdatedAt string `json:"updated_at"` + HtmlUrl string `json:"html_url"` + Position string `json:"position"` + CommitId string `json:"commit_id"` } // UserHook : user information type UserHook struct { - Id int32 `json:"id,omitempty"` - Name string `json:"name,omitempty"` - Email string `json:"email,omitempty"` - Username string `json:"username,omitempty"` - UserName string `json:"user_name,omitempty"` - Url string `json:"url,omitempty"` - Login string `json:"login,omitempty"` - AvatarUrl string `json:"avatar_url,omitempty"` - HtmlUrl string `json:"html_url,omitempty"` - Type_ string `json:"type,omitempty"` - SiteAdmin bool `json:"site_admin,omitempty"` - Time time.Time `json:"time,omitempty"` - Remark string `json:"remark,omitempty"` + Id int64 `json:"id"` + Name string `json:"name"` + Email string `json:"email"` + Username string `json:"username"` + UserName string `json:"user_name"` + Url string `json:"url"` + Login string `json:"login"` + AvatarUrl string `json:"avatar_url"` + HtmlUrl string `json:"html_url"` + Type_ string `json:"type"` + SiteAdmin bool `json:"site_admin"` + Time time.Time `json:"time"` + Remark string `json:"remark"` } // CommitHook : git commit information type CommitHook struct { - Id string `json:"id,omitempty"` - TreeId string `json:"tree_id,omitempty"` - ParentIds []string `json:"parent_ids,omitempty"` - Message string `json:"message,omitempty"` - Timestamp time.Time `json:"timestamp,omitempty"` - Url string `json:"url,omitempty"` - Author *UserHook `json:"author,omitempty"` - Committer *UserHook `json:"committer,omitempty"` - Distinct bool `json:"distinct,omitempty"` - Added []string `json:"added,omitempty"` - Removed []string `json:"removed,omitempty"` - Modified []string `json:"modified,omitempty"` + Id string `json:"id"` + TreeId string `json:"tree_id"` + ParentIds []string `json:"parent_ids"` + Message string `json:"message"` + Timestamp time.Time `json:"timestamp"` + Url string `json:"url"` + Author UserHook `json:"author"` + Committer UserHook `json:"committer"` + Distinct bool `json:"distinct"` + Added []string `json:"added"` + Removed []string `json:"removed"` + Modified []string `json:"modified"` } // MilestoneHook : milestone information type MilestoneHook struct { - Id int32 `json:"id,omitempty"` - HtmlUrl string `json:"html_url,omitempty"` - Number int32 `json:"number,omitempty"` - Title string `json:"title,omitempty"` - Description string `json:"description,omitempty"` - OpenIssues int32 `json:"open_issues,omitempty"` - ClosedIssues int32 `json:"closed_issues,omitempty"` - State string `json:"state,omitempty"` - CreatedAt time.Time `json:"created_at,omitempty"` - UpdatedAt time.Time `json:"updated_at,omitempty"` - DueOn string `json:"due_on,omitempty"` + Id int64 `json:"id"` + HtmlUrl string `json:"html_url"` + Number int64 `json:"number"` + Title string `json:"title"` + Description string `json:"description"` + OpenIssues int64 `json:"open_issues"` + ClosedIssues int64 `json:"closed_issues"` + State string `json:"state"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + DueOn string `json:"due_on"` } // IssueHook : issue information type IssueHook struct { - Id int32 `json:"id,omitempty"` - HtmlUrl string `json:"html_url,omitempty"` - Number string `json:"number,omitempty"` - Title string `json:"title,omitempty"` - User *UserHook `json:"user,omitempty"` - Labels []LabelHook `json:"labels,omitempty"` - State string `json:"state,omitempty"` - StateName string `json:"state_name,omitempty"` - TypeName string `json:"type_name,omitempty"` - Assignee *UserHook `json:"assignee,omitempty"` - Collaborators []UserHook `json:"collaborators,omitempty"` - Milestone *MilestoneHook `json:"milestone,omitempty"` - Comments int32 `json:"comments,omitempty"` - CreatedAt time.Time `json:"created_at,omitempty"` - UpdatedAt time.Time `json:"updated_at,omitempty"` - Body string `json:"body,omitempty"` + Id int64 `json:"id"` + HtmlUrl string `json:"html_url"` + Number string `json:"number"` + Title string `json:"title"` + User UserHook `json:"user"` + Labels []LabelHook `json:"labels"` + State string `json:"state"` + StateName string `json:"state_name"` + TypeName string `json:"type_name"` + Assignee UserHook `json:"assignee"` + Collaborators []UserHook `json:"collaborators"` + Milestone MilestoneHook `json:"milestone"` + Comments int64 `json:"comments"` + CreatedAt time.Time `json:"created_at"` + UpdatedAt time.Time `json:"updated_at"` + Body string `json:"body"` } // ProjectHook : project information type ProjectHook struct { - Id int32 `json:"id,omitempty"` - Name string `json:"name,omitempty"` - Path string `json:"path,omitempty"` - FullName string `json:"full_name,omitempty"` - Owner *UserHook `json:"owner,omitempty"` - Private bool `json:"private,omitempty"` - HtmlUrl string `json:"html_url,omitempty"` - Url string `json:"url,omitempty"` - Description string `json:"description,omitempty"` - Fork bool `json:"fork,omitempty"` - PushedAt string `json:"pushed_at,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - UpdatedAt string `json:"updated_at,omitempty"` - SshUrl string `json:"ssh_url,omitempty"` - GitUrl string `json:"git_url,omitempty"` - CloneUrl string `json:"clone_url,omitempty"` - SvnUrl string `json:"svn_url,omitempty"` - GitHttpUrl string `json:"git_http_url,omitempty"` - GitSshUrl string `json:"git_ssh_url,omitempty"` - GitSvnUrl string `json:"git_svn_url,omitempty"` - Homepage string `json:"homepage,omitempty"` - StargazersCount int32 `json:"stargazers_count,omitempty"` - WatchersCount int32 `json:"watchers_count,omitempty"` - ForksCount int32 `json:"forks_count,omitempty"` - Language string `json:"language,omitempty"` + Id int64 `json:"id"` + Name string `json:"name"` + Path string `json:"path"` + FullName string `json:"full_name"` + Owner UserHook `json:"owner"` + Private bool `json:"private"` + HtmlUrl string `json:"html_url"` + Url string `json:"url"` + Description string `json:"description"` + Fork bool `json:"fork"` + PushedAt string `json:"pushed_at"` + CreatedAt string `json:"created_at"` + UpdatedAt string `json:"updated_at"` + SshUrl string `json:"ssh_url"` + GitUrl string `json:"git_url"` + CloneUrl string `json:"clone_url"` + SvnUrl string `json:"svn_url"` + GitHttpUrl string `json:"git_http_url"` + GitSshUrl string `json:"git_ssh_url"` + GitSvnUrl string `json:"git_svn_url"` + Homepage string `json:"homepage"` + StargazersCount int64 `json:"stargazers_count"` + WatchersCount int64 `json:"watchers_count"` + ForksCount int64 `json:"forks_count"` + Language string `json:"language"` - HasIssues bool `json:"has_issues,omitempty"` - HasWiki bool `json:"has_wiki,omitempty"` - HasPage bool `json:"has_pages,omitempty"` - License string `json:"license,omitempty"` + HasIssues bool `json:"has_issues"` + HasWiki bool `json:"has_wiki"` + HasPage bool `json:"has_pages"` + License string `json:"license"` - OpenIssuesCount int32 `json:"open_issues_count,omitempty"` - DefaultBranch string `json:"default_branch,omitempty"` - Namespace string `json:"namespace,omitempty"` + OpenIssuesCount int64 `json:"open_issues_count"` + DefaultBranch string `json:"default_branch"` + Namespace string `json:"namespace"` - NameWithNamespace string `json:"name_with_namespace,omitempty"` - PathWithNamespace string `json:"path_with_namespace,omitempty"` + NameWithNamespace string `json:"name_with_namespace"` + PathWithNamespace string `json:"path_with_namespace"` } // BranchHook : branch information type BranchHook struct { - Label string `json:"label,omitempty"` - Ref string `json:"ref,omitempty"` - Sha string `json:"sha,omitempty"` - User *UserHook `json:"user,omitempty"` - Repo *ProjectHook `json:"repo,omitempty"` + Label string `json:"label"` + Ref string `json:"ref"` + Sha string `json:"sha"` + User *UserHook `json:"user"` + Repo *ProjectHook `json:"repo"` } // PullRequestHook : PR information type PullRequestHook struct { - Id int32 `json:"id,omitempty"` - Number int32 `json:"number,omitempty"` - State string `json:"state,omitempty"` - HtmlUrl string `json:"html_url,omitempty"` - DiffUrl string `json:"diff_url,omitempty"` - PatchUrl string `json:"patch_url,omitempty"` - Title string `json:"title,omitempty"` - Body string `json:"body,omitempty"` - StaleLabels []LabelHook `json:"stale_labels,omitempty"` - Labels []LabelHook `json:"labels,omitempty"` - CreatedAt string `json:"created_at,omitempty"` - UpdatedAt string `json:"updated_at,omitempty"` - ClosedAt string `json:"closed_at,omitempty"` - MergedAt string `json:"merged_at,omitempty"` - MergeCommitSha string `json:"merge_commit_sha,omitempty"` - MergeReferenceName string `json:"merge_reference_name,omitempty"` - User *UserHook `json:"user,omitempty"` - Assignee *UserHook `json:"assignee,omitempty"` - Assignees []UserHook `json:"assignees,omitempty"` - Tester []UserHook `json:"tester,omitempty"` - Testers []UserHook `json:"testers,omitempty"` - NeedTest bool `json:"need_test,omitempty"` - NeedReview bool `json:"need_review,omitempty"` - Milestone *MilestoneHook `json:"milestone,omitempty"` - Head *BranchHook `json:"head,omitempty"` - Base *BranchHook `json:"base,omitempty"` - Merged bool `json:"merged,omitempty"` - Mergeable bool `json:"mergeable,omitempty"` - MergeStatus string `json:"merge_status,omitempty"` - UpdatedBy *UserHook `json:"updated_by,omitempty"` - Comments int32 `json:"comments,omitempty"` - Commits int32 `json:"commits,omitempty"` - Additions int32 `json:"additions,omitempty"` - Deletions int32 `json:"deletions,omitempty"` - ChangedFiles int32 `json:"changed_files,omitempty"` + Id int64 `json:"id"` + Number int64 `json:"number"` + State string `json:"state"` + HtmlUrl string `json:"html_url"` + DiffUrl string `json:"diff_url"` + PatchUrl string `json:"patch_url"` + Title string `json:"title"` + Body string `json:"body"` + StaleLabels []LabelHook `json:"stale_labels"` + Labels []LabelHook `json:"labels"` + CreatedAt string `json:"created_at"` + UpdatedAt string `json:"updated_at"` + ClosedAt string `json:"closed_at"` + MergedAt string `json:"merged_at"` + MergeCommitSha string `json:"merge_commit_sha"` + MergeReferenceName string `json:"merge_reference_name"` + User UserHook `json:"user"` + Assignee UserHook `json:"assignee"` + Assignees []UserHook `json:"assignees"` + Tester []UserHook `json:"tester"` + Testers []UserHook `json:"testers"` + NeedTest bool `json:"need_test"` + NeedReview bool `json:"need_review"` + Milestone MilestoneHook `json:"milestone"` + Head BranchHook `json:"head"` + Base BranchHook `json:"base"` + Merged bool `json:"merged"` + Mergeable bool `json:"mergeable"` + MergeStatus string `json:"merge_status"` + UpdatedBy UserHook `json:"updated_by"` + Comments int64 `json:"comments"` + Commits int64 `json:"commits"` + Additions int64 `json:"additions"` + Deletions int64 `json:"deletions"` + ChangedFiles int64 `json:"changed_files"` }