-
Notifications
You must be signed in to change notification settings - Fork 157
Open
Description
Feature Request: Add Bitbucket Server webhook compatibility
Problem
Currently, Lagoon’s Bitbucket webhook handler expects payload fields like:
repository.links.html.hrefrepository.full_name
However, these fields are not present in Bitbucket Server (formerly known as Stash) webhook payloads. Instead, Bitbucket Server provides SSH and HTTP(S) clone URLs under:
"repository": {
"links": {
"clone": [
{ "href": "ssh://[email protected]:7999/project/repo.git", "name": "ssh" },
{ "href": "https://bitbucket.mycompany.com/scm/project/repo.git", "name": "http" }
]
}
}This causes Lagoon’s webhook handler to throw an error:
Cannot read properties of undefined (reading 'href')Proposed Solution
Enhance the Bitbucket webhook handler to:
- Check for
repository.links.clone - Prefer the
sshclone link if available - Fallback to current behavior (
html.href + full_name) for backward compability with Bitbucket Cloud
Reference
📄 Bitbucket Server webhook documentation:
https://confluence.atlassian.com/bitbucketserver064/event-payload-974388877.html#Eventpayload-repositoryevents
Benefit
This change would allow teams using Bitbucket Server or Data Center editions to integrate with Lagoon natively via webhooks, without custom patches or middleware.
Metadata
Metadata
Assignees
Labels
No labels