freeStyleJob('test-job') {
triggers{
bitbucketPush()
}
}
freeStyleJob('test-job') {
triggers{
bitbucketPullRequest()
}
}
In addition I thought to introduce two new
BitBucketPullRequestTrigger and
BitBucketPushTrigger. Both of them will implement interface with methods like:
getTriggerRule() - "repo:push" for BitBucketPushTrigger and "pullrequest:created, pullrequest:updated" for BitBucketPullRequestTrigger. Those rules will be used in
BitbucketPayloadProcessor#processPayload method instead of current if statement for only "repo:push".
getDisplayName() - returns display name.
getShortDescription() - returns short description on how this build was triggered.
This is my initial idea, I thought it's a good to first share it with you. I'm open to any suggestions.
Thank you for your time.