I’m working on a plugin that uses the atlassian event listener to trigger actions on the various com.atlassian.bitbucket.event.pull.* events (such as PullRequestOpenedEvent or PullRequestDeclinedEvent). I want to include the PullRequestDeletedEvent introduced in Bitbucket Server 5.1.0 but setting up an eventlistener causes java.lang.ClassNotFoundException: com.atlassian.bitbucket.event.pull.PullRequestDeletedEvent for earlier versions of Bitbucket Server 5. Is there a way to service PR Deletion events without breaking backwards compatibility, at least for Bitbucket 5.0.X?
My code is located at GitHub - ParameterizedBuilds/parameterized-builds and the class that handles PR events is com.kylenicholls.stash.parameterizedbuilds.PullRequestHook if that helps get a sense of what I’m trying to accomplish.