Event filters
By default, Webhook To Jenkins for Bitbucket notifies Jenkins on git reference changes, pull requests creations, and reopenings. The Limit Events feature allows you to select which events can trigger Jenkins.
To limit which events trigger Jenkins:
From your Bitbucket repository, click the Repository Settings icon > Hooks and select Enabled or click the Edit icon to change the previously enabled Webhook to Jenkins configuration.
Click the Advanced Configuration tab and from the Limit Events options, select each event you want to enable. Each enabled event has a checkmark beside it.
Event | Description |
---|---|
Pull Request Opened | Triggers whenever a pull request is opened. |
Pull Request Reopened | Triggers whenever a declined pull request is re-opened again. |
Pull Request Approved | Triggers each time when reviewer(s) approves pull request and disabled by default. |
Pull Request Merged | Triggers after a pull request is merged. |
Open Pull Request Refs Changed | Triggers when a change occurs to any git reference, a base branch of at least one active Pull Request. This includes commits, pushes, edits, branch creations, and more. All reference deleted events are filtered out. Does not trigger when refs are modified in the forked repository in the back-merge Pull Request. |
Non-Pull Request Refs Changed | Similar to Open Pull Request Refs, but triggers for changes in references that do not participate in any active Pull Request. |
You can also hover on the event name on the configuration dialog to get a quick in-place event description.
Additional filters
Filter | Description |
---|---|
Trigger job if the branch is deleted | Trigger build on branch deletion. Useful for cleanup with multi-branch pipeline jobs. |
Trigger Pull Request only if mergeable | An additional filter that can be used together with event filters. |