-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(bitbucket): add webhook secret on each repository creation #84311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔍 Existing Issues For ReviewYour pull request is modifying functions with the following pre-existing issues: 📄 File: src/sentry/integrations/bitbucket/integration.py
Did you find this useful? React with a 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we planning on backfilling secrets for existing bitbucket integrations? we can do that by listing the repositories, deleting hooks for those without secrets + creating new ones with secrets
sentry/src/sentry/integrations/bitbucket/client.py
Lines 120 to 125 in e28e4b6
def get_hooks(self, repo): | |
return self.get(path=BitbucketAPIPath.repository_hooks.format(repo=repo)) | |
def delete_hook(self, repo, hook_id): | |
return self.delete(path=BitbucketAPIPath.repository_hook.format(repo=repo, uid=hook_id)) | |
https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-hooks-get
…is defined (#84309) Preparing [Bitbucket webhook secret validation](https://support.atlassian.com/bitbucket-cloud/docs/manage-webhooks/#Validating-webhook-deliveries). This is actual signature header validation, but no integrations/repos have the associated secret yet. Follow-up PRs: - backend endpoint to modify `webhook_secret`: #84311 Previous attempt (#82541) had repository-level secrets but we decided to go with integration-level secret to align with other integrations (GitLab, GitHub).
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
Related:
Bitbucket API doc: