Skip to content

Commit

Permalink
feat: bitbucket pullrequest:approved event support
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaMiggo committed Apr 5, 2024
1 parent 116705e commit ac83ab1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/git_provider/bitbucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (b BitbucketClientImpl) SetWebhook(ctx *context.Context, repo *string) (*Ho
Description: "Piper",
Url: b.cfg.GitProviderConfig.WebhookURL,
Active: true,
Events: []string{"repo:push", "pullrequest:created", "pullrequest:updated", "pullrequest:fulfilled"},
Events: []string{"repo:push", "pullrequest:created", "pullrequest:updated", "pullrequest:fulfilled", "pullrequest:approved"},
}

hook, exists := b.isRepoWebhookExists(*repo)
Expand Down Expand Up @@ -189,7 +189,7 @@ func (b BitbucketClientImpl) HandlePayload(ctx *context.Context, request *http.R
}
}

case "pullrequest:created", "pullrequest:updated":
case "pullrequest:created", "pullrequest:updated", "pullrequest:approved":
webhookPayload = &WebhookPayload{
Event: "pull_request",
Repo: utils.SanitizeString(gjson.GetBytes(buf.Bytes(), "repository.name").Value().(string)),
Expand Down

0 comments on commit ac83ab1

Please sign in to comment.