File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,12 @@ func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request) {
127
127
log .Errorf ("process check run request event: %v" , err )
128
128
}
129
129
}()
130
+ case * github.CheckSuiteEvent :
131
+ go func () {
132
+ if err := s .processCheckSuiteEvent (ctx , event ); err != nil {
133
+ log .Errorf ("process check run request event: %v" , err )
134
+ }
135
+ }()
130
136
default :
131
137
log .Debugf ("skipping event type %s\n " , github .WebHookType (r ))
132
138
}
@@ -153,6 +159,18 @@ func (s *Server) processCheckRunRequestEvent(ctx context.Context, event *github.
153
159
return s .handle (ctx , & pevent )
154
160
}
155
161
162
+ func (s * Server ) processCheckSuiteEvent (ctx context.Context , event * github.CheckSuiteEvent ) error {
163
+ if event .GetAction () != "rerequested" {
164
+ log .Debugf ("skipping action %s\n " , event .GetAction ())
165
+ return nil
166
+ }
167
+ pevent := github.PullRequestEvent {}
168
+ pevent .Repo = event .GetRepo ()
169
+ pevent .PullRequest = event .GetCheckSuite ().PullRequests [0 ]
170
+ pevent .Installation = event .GetInstallation ()
171
+ return s .handle (ctx , & pevent )
172
+ }
173
+
156
174
func (s * Server ) handle (ctx context.Context , event * github.PullRequestEvent ) error {
157
175
var (
158
176
num = event .GetPullRequest ().GetNumber ()
You can’t perform that action at this time.
0 commit comments