Trouble back-porting a merge plugin hook to bitbucket server 4.14.3?

Deleted user April 4, 2018

I have tried both interfaces, 

RepositoryMergeRequestCheck and MergeRequestCheck
 without any success in triggering, it however loads fine.  I am able to get RepositoryMergeRequestCheck to trigger in 5.x but not in 4.x so I moved my code back to the prior interface.
How can I tell why it doesn't fire in 4.x? Attached is my code snippet..
public class mergeTriggerCheck implements MergeRequestCheck {



public mergeTriggerCheck() {
System.out.println("initialized mergeTriggerCheck");
}

@Override
public void check(@Nonnull MergeRequest request) {
System.out.println(String.format("MergeRequest check called: repo name = %s", request.getPullRequest().getToRef().getRepository()));
}
}

atlassian-plugin.xml
<?xml version="1.0" encoding="UTF-8"?>
<atlassian-plugin key="${atlassian.plugin.key}" name="${project.name}" plugins-version="2">
<plugin-info>
<description>${project.description}</description>
<version>${project.version}</version>
<vendor name="${project.organization.name}" url="${project.organization.url}"/>
<param name="plugin-icon">images/pluginIcon.png</param>
<param name="plugin-logo">images/pluginLogo.png</param>
</plugin-info>
-->
<merge-check key="${project.artifactId}" name="Merge Trigger Check" class="${project.groupId}.hook.mergeTriggerCheck">
<description key="${project.artifactId}.description">Enforce Merge Check that builds and smokes</description>
<icon>images/pluginIcon.png</icon>
</merge-check>
</atlassian-plugin>

plugin-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:atlassian-scanner="http://www.atlassian.com/schema/atlassian-scanner"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.atlassian.com/schema/atlassian-scanner
http://www.atlassian.com/schema/atlassian-scanner/atlassian-scanner.xsd">
<atlassian-scanner:scan-indexes/>
</beans>

pom.xml available on request. <limited to 2000 chars

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events