🌐 AI搜索 & 代理 主页
Skip to content

Commit f12fbac

Browse files
committed
repo_hook: update Payloader implementations
1 parent ccf992c commit f12fbac

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

repo_hook.go

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,12 @@ var (
103103
// \/ \/ \/ \/
104104

105105
type 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-
117112
func (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.
149144
type 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-
165155
func (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.
228218
type 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-
242227
func (p *PullRequestPayload) JSONPayload() ([]byte, error) {
243228
return json.MarshalIndent(p, "", " ")
244229
}

0 commit comments

Comments
 (0)