@@ -52,12 +52,17 @@ func (v *Provider) ParsePayload(_ context.Context, _ *params.Run, request *http.
5252 processedEvent .TriggerTarget = "pull_request"
5353 processedEvent .EventType = "pull_request"
5454 } else if provider .Valid (eventType , []string {"pr:comment:added" , "pr:comment:edited" }) {
55- if provider .IsRetestComment (e .Comment .Text ) {
55+ switch {
56+ case provider .IsRetestComment (e .Comment .Text ):
5657 processedEvent .TriggerTarget = "pull_request"
5758 processedEvent .EventType = "retest-comment"
58- } else if provider .IsOkToTestComment (e .Comment .Text ) {
59+ case provider .IsOkToTestComment (e .Comment .Text ):
5960 processedEvent .TriggerTarget = "pull_request"
6061 processedEvent .EventType = "ok-to-test-comment"
62+ case provider .IsTestComment (e .Comment .Text ):
63+ processedEvent .TriggerTarget = "pull_request"
64+ processedEvent .EventType = "test-comment"
65+ processedEvent .TargetTestPipelineRun = provider .GetPipelineRunFromComment (e .Comment .Text )
6166 }
6267 }
6368 // TODO: It's Really not an OWNER but a PROJECT
@@ -181,6 +186,9 @@ func (v *Provider) Detect(reqHeader *http.Header, payload string, logger *zap.Su
181186 if provider .IsOkToTestComment (e .Comment .Text ) {
182187 return setLoggerAndProceed (true , "" , nil )
183188 }
189+ if provider .IsTestComment (e .Comment .Text ) {
190+ return setLoggerAndProceed (true , "" , nil )
191+ }
184192 }
185193 return setLoggerAndProceed (false , fmt .Sprintf ("not a recognized bitbucket event: \" %s\" " , event ), nil )
186194
0 commit comments