Skip to content

Commit

Permalink
fix: add support for server event pr:from_ref_updated. fixes #308 (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mattias authored Jul 16, 2020
1 parent 1e2360c commit e35b6c9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ public enum HookEventType {
*/
SERVER_PULL_REQUEST_REVIEWER_UPDATED("pr:reviewer:updated", NativeServerPullRequestHookProcessor.class),

/**
* @see <a href="https://confluence.atlassian.com/bitbucketserver070/event-payload-996644369.html#Eventpayload-Sourcebranchupdated">Eventpayload-Sourcebranchupdated</a>
* @since Bitbucket Server 7.0
*/
SERVER_PULL_REQUEST_FROM_REF_UPDATED("pr:from_ref_updated", NativeServerPullRequestHookProcessor.class),

/**
* Sent when hitting the {@literal "Test connection"} button in Bitbucket Server. Apparently undocumented.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ public void process(HookEventType hookEvent, String payload, BitbucketType insta
break;
case SERVER_PULL_REQUEST_MODIFIED:
case SERVER_PULL_REQUEST_REVIEWER_UPDATED:
case SERVER_PULL_REQUEST_FROM_REF_UPDATED:
eventType = SCMEvent.Type.UPDATED;
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ public class WebhookConfiguration {
HookEventType.SERVER_PULL_REQUEST_DECLINED.getKey(),
HookEventType.SERVER_PULL_REQUEST_DELETED.getKey(),
HookEventType.SERVER_PULL_REQUEST_MODIFIED.getKey(),
HookEventType.SERVER_PULL_REQUEST_REVIEWER_UPDATED.getKey()
HookEventType.SERVER_PULL_REQUEST_REVIEWER_UPDATED.getKey(),
HookEventType.SERVER_PULL_REQUEST_FROM_REF_UPDATED.getKey()
));

/**
Expand Down

0 comments on commit e35b6c9

Please sign in to comment.