@@ -103,17 +103,12 @@ var (
103103// \/ \/ \/ \/
104104
105105type CreatePayload struct {
106- Secret string `json:"secret"`
107106 Ref string `json:"ref"`
108107 RefType string `json:"ref_type"`
109108 Repo * Repository `json:"repository"`
110109 Sender * User `json:"sender"`
111110}
112111
113- func (p * CreatePayload ) SetSecret (secret string ) {
114- p .Secret = secret
115- }
116-
117112func (p * CreatePayload ) JSONPayload () ([]byte , error ) {
118113 return json .MarshalIndent (p , "" , " " )
119114}
@@ -147,7 +142,6 @@ func ParseCreateHook(raw []byte) (*CreatePayload, error) {
147142
148143// PushPayload represents a payload information of push event.
149144type PushPayload struct {
150- Secret string `json:"secret"`
151145 Ref string `json:"ref"`
152146 Before string `json:"before"`
153147 After string `json:"after"`
@@ -158,10 +152,6 @@ type PushPayload struct {
158152 Sender * User `json:"sender"`
159153}
160154
161- func (p * PushPayload ) SetSecret (secret string ) {
162- p .Secret = secret
163- }
164-
165155func (p * PushPayload ) JSONPayload () ([]byte , error ) {
166156 return json .MarshalIndent (p , "" , " " )
167157}
@@ -226,7 +216,6 @@ type ChangesPayload struct {
226216
227217// PullRequestPayload represents a payload information of pull request event.
228218type PullRequestPayload struct {
229- Secret string `json:"secret"`
230219 Action HookIssueAction `json:"action"`
231220 Index int64 `json:"number"`
232221 Changes * ChangesPayload `json:"changes,omitempty"`
@@ -235,10 +224,6 @@ type PullRequestPayload struct {
235224 Sender * User `json:"sender"`
236225}
237226
238- func (p * PullRequestPayload ) SetSecret (secret string ) {
239- p .Secret = secret
240- }
241-
242227func (p * PullRequestPayload ) JSONPayload () ([]byte , error ) {
243228 return json .MarshalIndent (p , "" , " " )
244229}
0 commit comments