Feature Request: Add Bitbucket Server webhook compatibility
Problem
Currently, Lagoon’s Bitbucket webhook handler expects payload fields like:
repository.links.html.href
repository.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://git@bitbucket.mycompany.com: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.
Feature Request: Add Bitbucket Server webhook compatibility
Problem
Currently, Lagoon’s Bitbucket webhook handler expects payload fields like:
repository.links.html.hrefrepository.full_nameHowever, 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:
This causes Lagoon’s webhook handler to throw an error:
Proposed Solution
Enhance the Bitbucket webhook handler to:
repository.links.clonesshclone link if availablehtml.href + full_name) for backward compability with Bitbucket CloudReference
📄 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.