I wrote a Bitbucket plugin that listens for the PullRequestOpenedEvent. It works great. But I only want to enable it at the repository level, not the whole system.
I have other plugins that show up under Pull Requests > Merge checks and Workflow > Hooks. They're great. I can enable them at the repository level with a dropdown.
That's all I need for my PullRequestOpenedEvent plugin. How can I achieve this in the easiest way possible? Thanks.
PullRequestOpenedEvent is not a repository event of any sort that you can write a hook for. It's a simple event. Pull requests are glorified diffs that you can interact with through the webui.
For this event handler to be configurable you don't have the convenience of the configurable hook system. You would need to add your own repo-settings to control how the event listener acts for each repository. When a PR is created, you can determine which repo it is for and check the plugin configuration to derive what should happen.
Hope that helps - BTW, another good place to post developer questions is https://community.developer.atlassian.com/
Thanks. I didn't know there was another community for development.
It is 8 years old. I was surprised it still compiled with Bitbucket 7.14. I am currently trying to strip it down and apply it to my plugin.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.