jenkinsci / stashnotifier-plugin

A Jenkins Plugin to notify Atlassian Stash|Bitbucket of build results
https://plugins.jenkins.io/stashNotifier/
Other
166 stars 143 forks source link

Issue #290: Implement compatibility with new Bitbucket rest api #361

Closed BUGinator86 closed 1 month ago

BUGinator86 commented 9 months ago

and fix missing "parent" property in JSON for required builds.

This fixes Issue #290 without breaking compatibility with older versions of BitBucket/Stash. We support the old deprecated REST API and the new REST API.

Testing done

The test was done in our test environment with BitBucket 7.21 that supports both versions of the API, because we needed a slim plugin for our required builds. After both versions successfully worked in our test environment we now use it for about 3 Weeks in production without any problems.

### Submitter checklist
- [x] Make sure you are opening from a **topic/feature/bugfix branch** (right side) and not your main branch!
- [x] Ensure that the pull request title represents the desired changelog entry
- [x] Please describe what you did
- [x] Link to relevant issues in GitHub or Jira
- [x] Link to relevant pull requests, esp. upstream and downstream changes
- [x] Ensure you have provided tests - that demonstrates feature works or fixes the issue
sghill commented 3 months ago

Seconding @gruetter's request for more test coverage.

I think we should also consider whether this makes sense to add as a separate notifier rather than modifying the existing one. There is support within the plugin for changing the notifier by system property, which would mean any issues with the new notifier could be easily worked around. Would love to hear more feedback about this idea.