Skip to content

Commit 57d39cc

Browse files
GoshaDoGoshaMiggo
andauthored
feat: bitbucket pullrequest:approved event support (#19)
Co-authored-by: Gosha <[email protected]>
1 parent 7d1116a commit 57d39cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/git_provider/bitbucket.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func (b BitbucketClientImpl) SetWebhook(ctx *context.Context, repo *string) (*Ho
102102
Description: "Piper",
103103
Url: b.cfg.GitProviderConfig.WebhookURL,
104104
Active: true,
105-
Events: []string{"repo:push", "pullrequest:created", "pullrequest:updated", "pullrequest:fulfilled"},
105+
Events: []string{"repo:push", "pullrequest:created", "pullrequest:updated", "pullrequest:fulfilled", "pullrequest:approved"},
106106
}
107107

108108
hook, exists := b.isRepoWebhookExists(*repo)
@@ -189,7 +189,7 @@ func (b BitbucketClientImpl) HandlePayload(ctx *context.Context, request *http.R
189189
}
190190
}
191191

192-
case "pullrequest:created", "pullrequest:updated":
192+
case "pullrequest:created", "pullrequest:updated", "pullrequest:approved":
193193
webhookPayload = &WebhookPayload{
194194
Event: "pull_request",
195195
Repo: utils.SanitizeString(gjson.GetBytes(buf.Bytes(), "repository.name").Value().(string)),

0 commit comments

Comments
 (0)