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

     1  package main
     2  
     3  // HookWithRepository represents an event message sent by Github that contains a "repository" field.
     4  type HookWithRepository struct {
     5  	EventName  string `json:"event_name"`
     6  	Ref        string `json:"ref"`
     7  	Repository struct {
     8  		ID       int    `json:"id"`
     9  		Name     string `json:"name"`
    10  		FullName string `json:"full_name"`
    11  		Owner    struct {
    12  			Name  string `json:"name"`
    13  			Email string `json:"email"`
    14  		} `json:"owner"`
    15  		Private     bool   `json:"private"`
    16  		HTMLURL     string `json:"html_url"`
    17  		Description string `json:"description"`
    18  	} `json:"repository"`
    19  	Project struct {
    20  		ID                int    `json:"id"`
    21  		Name              string `json:"name"`
    22  		Namespace         string `json:"namespace"`
    23  		PathWithNamespace string `json:"path_with_namespace"`
    24  	}
    25  }