Skip to content

feat: add Bitbucket support for shared repository webhooks (v2) - #4064

Open
alfespa17 wants to merge 2 commits into
mainfrom
feat/webhook-v2-bitbucket
Open

alfespa17 wants to merge 2 commits into
mainfrom
feat/webhook-v2-bitbucket

fix: handle multi-change Bitbucket pushes and new-branch diff fallback

8816190
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded Nov 30, 2026 in 50s

Annotations

Check warning on line 292 in api/src/test/java/io/terrakube/api/plugin/vcs/provider/bitbucket/BitBucketWebhookServiceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor the code of the lambda to have only one invocation possibly throwing a runtime exception.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIn6zztsnnA0eTijZr2&open=AaIn6zztsnnA0eTijZr2&pullRequest=4064

Check warning on line 41 in api/src/main/java/io/terrakube/api/rs/hooks/webhook/WebhookManageHook.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Remove this field injection and use constructor injection instead.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIn6zrSsnnA0eTijZr0&open=AaIn6zrSsnnA0eTijZr0&pullRequest=4064

Check failure on line 123 in api/src/main/java/io/terrakube/api/plugin/vcs/provider/bitbucket/BitBucketWebhookService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "target" 4 times.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIs7ZdxMeKbKy3IT2e7&open=AaIs7ZdxMeKbKy3IT2e7&pullRequest=4064

Check failure on line 552 in api/src/main/java/io/terrakube/api/plugin/vcs/provider/bitbucket/BitBucketWebhookService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 22 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIn6zyRsnnA0eTijZr1&open=AaIn6zyRsnnA0eTijZr1&pullRequest=4064

Check warning on line 2746 in api/src/test/java/io/terrakube/api/plugin/vcs/RepoWebhookServiceTest.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor the code of the lambda to have only one invocation possibly throwing a runtime exception.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIn6z0ysnnA0eTijZr3&open=AaIn6z0ysnnA0eTijZr3&pullRequest=4064

Check failure on line 182 in api/src/main/java/io/terrakube/api/plugin/vcs/provider/bitbucket/BitBucketWebhookService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "links" 5 times.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIs7ZdxMeKbKy3IT2e6&open=AaIs7ZdxMeKbKy3IT2e6&pullRequest=4064

Check failure on line 124 in api/src/main/java/io/terrakube/api/plugin/vcs/provider/bitbucket/BitBucketWebhookService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "commit" 3 times.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIs7ZdxMeKbKy3IT2e4&open=AaIs7ZdxMeKbKy3IT2e4&pullRequest=4064

Check warning on line 193 in api/src/main/java/io/terrakube/api/plugin/vcs/provider/bitbucket/BitBucketWebhookService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Simplify this regular expression to reduce its runtime, as it has super-linear performance due to backtracking.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIs7ZdxMeKbKy3IT2e9&open=AaIs7ZdxMeKbKy3IT2e9&pullRequest=4064

Check failure on line 124 in api/src/main/java/io/terrakube/api/plugin/vcs/provider/bitbucket/BitBucketWebhookService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "branch" 5 times.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIs7ZdxMeKbKy3IT2e5&open=AaIs7ZdxMeKbKy3IT2e5&pullRequest=4064

Check failure on line 108 in api/src/main/java/io/terrakube/api/plugin/vcs/provider/bitbucket/BitBucketWebhookService.java

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this method to reduce its Cognitive Complexity from 16 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=AzBuilder_azb-server&issues=AaIs7ZdxMeKbKy3IT2e8&open=AaIs7ZdxMeKbKy3IT2e8&pullRequest=4064