github.com/agrison/harpoon@v0.0.0-20180819075247-a667a15fd0eb/structs_push.go (about)

     1  package main
     2  
     3  import "time"
     4  
     5  // HookPush represents a push message sent by Github
     6  type HookPush struct {
     7  	Ref     string      `json:"ref"`
     8  	Before  string      `json:"before"`
     9  	After   string      `json:"after"`
    10  	Created bool        `json:"created"`
    11  	Deleted bool        `json:"deleted"`
    12  	Forced  bool        `json:"forced"`
    13  	BaseRef interface{} `json:"base_ref"`
    14  	Compare string      `json:"compare"`
    15  	Commits []struct {
    16  		ID        string    `json:"id"`
    17  		Distinct  bool      `json:"distinct"`
    18  		Message   string    `json:"message"`
    19  		Timestamp time.Time `json:"timestamp"`
    20  		URL       string    `json:"url"`
    21  		Author    struct {
    22  			Name     string `json:"name"`
    23  			Email    string `json:"email"`
    24  			Username string `json:"username"`
    25  		} `json:"author"`
    26  		Committer struct {
    27  			Name     string `json:"name"`
    28  			Email    string `json:"email"`
    29  			Username string `json:"username"`
    30  		} `json:"committer"`
    31  		Added    []interface{} `json:"added"`
    32  		Removed  []interface{} `json:"removed"`
    33  		Modified []string      `json:"modified"`
    34  	} `json:"commits"`
    35  	HeadCommit struct {
    36  		ID        string    `json:"id"`
    37  		Distinct  bool      `json:"distinct"`
    38  		Message   string    `json:"message"`
    39  		Timestamp time.Time `json:"timestamp"`
    40  		URL       string    `json:"url"`
    41  		Author    struct {
    42  			Name     string `json:"name"`
    43  			Email    string `json:"email"`
    44  			Username string `json:"username"`
    45  		} `json:"author"`
    46  		Committer struct {
    47  			Name     string `json:"name"`
    48  			Email    string `json:"email"`
    49  			Username string `json:"username"`
    50  		} `json:"committer"`
    51  		Added    []interface{} `json:"added"`
    52  		Removed  []interface{} `json:"removed"`
    53  		Modified []string      `json:"modified"`
    54  	} `json:"head_commit"`
    55  	Project struct {
    56  		ID                int    `json:"id"`
    57  		Name              string `json:"name"`
    58  		Namespace         string `json:"namespace"`
    59  		PathWithNamespace string `json:"path_with_namespace"`
    60  	}
    61  	Repository struct {
    62  		ID       int    `json:"id"`
    63  		Name     string `json:"name"`
    64  		FullName string `json:"full_name"`
    65  		Owner    struct {
    66  			Name  string `json:"name"`
    67  			Email string `json:"email"`
    68  		} `json:"owner"`
    69  		Private          bool        `json:"private"`
    70  		HTMLURL          string      `json:"html_url"`
    71  		Description      string      `json:"description"`
    72  		Fork             bool        `json:"fork"`
    73  		URL              string      `json:"url"`
    74  		ForksURL         string      `json:"forks_url"`
    75  		KeysURL          string      `json:"keys_url"`
    76  		CollaboratorsURL string      `json:"collaborators_url"`
    77  		TeamsURL         string      `json:"teams_url"`
    78  		HooksURL         string      `json:"hooks_url"`
    79  		IssueEventsURL   string      `json:"issue_events_url"`
    80  		EventsURL        string      `json:"events_url"`
    81  		AssigneesURL     string      `json:"assignees_url"`
    82  		BranchesURL      string      `json:"branches_url"`
    83  		TagsURL          string      `json:"tags_url"`
    84  		BlobsURL         string      `json:"blobs_url"`
    85  		GitTagsURL       string      `json:"git_tags_url"`
    86  		GitRefsURL       string      `json:"git_refs_url"`
    87  		TreesURL         string      `json:"trees_url"`
    88  		StatusesURL      string      `json:"statuses_url"`
    89  		LanguagesURL     string      `json:"languages_url"`
    90  		StargazersURL    string      `json:"stargazers_url"`
    91  		ContributorsURL  string      `json:"contributors_url"`
    92  		SubscribersURL   string      `json:"subscribers_url"`
    93  		SubscriptionURL  string      `json:"subscription_url"`
    94  		CommitsURL       string      `json:"commits_url"`
    95  		GitCommitsURL    string      `json:"git_commits_url"`
    96  		CommentsURL      string      `json:"comments_url"`
    97  		IssueCommentURL  string      `json:"issue_comment_url"`
    98  		ContentsURL      string      `json:"contents_url"`
    99  		CompareURL       string      `json:"compare_url"`
   100  		MergesURL        string      `json:"merges_url"`
   101  		ArchiveURL       string      `json:"archive_url"`
   102  		DownloadsURL     string      `json:"downloads_url"`
   103  		IssuesURL        string      `json:"issues_url"`
   104  		PullsURL         string      `json:"pulls_url"`
   105  		MilestonesURL    string      `json:"milestones_url"`
   106  		NotificationsURL string      `json:"notifications_url"`
   107  		LabelsURL        string      `json:"labels_url"`
   108  		ReleasesURL      string      `json:"releases_url"`
   109  		DeploymentsURL   string      `json:"deployments_url"`
   110  		CreatedAt        int         `json:"created_at"`
   111  		UpdatedAt        time.Time   `json:"updated_at"`
   112  		PushedAt         int         `json:"pushed_at"`
   113  		GitURL           string      `json:"git_url"`
   114  		SSHURL           string      `json:"ssh_url"`
   115  		CloneURL         string      `json:"clone_url"`
   116  		SvnURL           string      `json:"svn_url"`
   117  		Homepage         interface{} `json:"homepage"`
   118  		Size             int         `json:"size"`
   119  		StargazersCount  int         `json:"stargazers_count"`
   120  		WatchersCount    int         `json:"watchers_count"`
   121  		Language         string      `json:"language"`
   122  		HasIssues        bool        `json:"has_issues"`
   123  		HasDownloads     bool        `json:"has_downloads"`
   124  		HasWiki          bool        `json:"has_wiki"`
   125  		HasPages         bool        `json:"has_pages"`
   126  		ForksCount       int         `json:"forks_count"`
   127  		MirrorURL        interface{} `json:"mirror_url"`
   128  		OpenIssuesCount  int         `json:"open_issues_count"`
   129  		Forks            int         `json:"forks"`
   130  		OpenIssues       int         `json:"open_issues"`
   131  		Watchers         int         `json:"watchers"`
   132  		DefaultBranch    string      `json:"default_branch"`
   133  		Stargazers       int         `json:"stargazers"`
   134  		MasterBranch     string      `json:"master_branch"`
   135  	} `json:"repository"`
   136  	Pusher struct {
   137  		Name  string `json:"name"`
   138  		Email string `json:"email"`
   139  	} `json:"pusher"`
   140  	Sender struct {
   141  		Login             string `json:"login"`
   142  		ID                int    `json:"id"`
   143  		AvatarURL         string `json:"avatar_url"`
   144  		GravatarID        string `json:"gravatar_id"`
   145  		URL               string `json:"url"`
   146  		HTMLURL           string `json:"html_url"`
   147  		FollowersURL      string `json:"followers_url"`
   148  		FollowingURL      string `json:"following_url"`
   149  		GistsURL          string `json:"gists_url"`
   150  		StarredURL        string `json:"starred_url"`
   151  		SubscriptionsURL  string `json:"subscriptions_url"`
   152  		OrganizationsURL  string `json:"organizations_url"`
   153  		ReposURL          string `json:"repos_url"`
   154  		EventsURL         string `json:"events_url"`
   155  		ReceivedEventsURL string `json:"received_events_url"`
   156  		Type              string `json:"type"`
   157  		SiteAdmin         bool   `json:"site_admin"`
   158  	} `json:"sender"`
   159  }