Skip to content

Commit ee59e28

Browse files
author
Shivam Mukhade
committed
Bitbucket Server: adds support for /test <pipelinerun-name> comment
Signed-off-by: Shivam Mukhade <[email protected]>
1 parent fb677f6 commit ee59e28

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/provider/bitbucketserver/events.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ func (v *Provider) ParsePayload(_ context.Context, _ *params.Run, request *http.
5858
} else if provider.IsOkToTestComment(e.Comment.Text) {
5959
processedEvent.TriggerTarget = "pull_request"
6060
processedEvent.EventType = "ok-to-test-comment"
61+
} else if provider.IsTestComment(e.Comment.Text) {
62+
processedEvent.TriggerTarget = "pull_request"
63+
processedEvent.EventType = "test-comment"
64+
processedEvent.TargetTestPipelineRun = provider.GetPipelineRunFromComment(e.Comment.Text)
6165
}
6266
}
6367
// TODO: It's Really not an OWNER but a PROJECT
@@ -181,6 +185,9 @@ func (v *Provider) Detect(reqHeader *http.Header, payload string, logger *zap.Su
181185
if provider.IsOkToTestComment(e.Comment.Text) {
182186
return setLoggerAndProceed(true, "", nil)
183187
}
188+
if provider.IsTestComment(e.Comment.Text) {
189+
return setLoggerAndProceed(true, "", nil)
190+
}
184191
}
185192
return setLoggerAndProceed(false, fmt.Sprintf("not a recognized bitbucket event: \"%s\"", event), nil)
186193

0 commit comments

Comments
 (0)