Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

When adding constructor to the class plugin disappears from the server

Liyakat Ali
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2019
package com.atlassian.qantas.stash.hook;

import com.atlassian.bitbucket.hook.*;
import com.atlassian.bitbucket.hook.repository.*;
import com.atlassian.bitbucket.repository.*;
import com.atlassian.bitbucket.server.ApplicationPropertiesService;
import com.atlassian.bitbucket.setting.*;


import java.util.Collection;
import java.util.stream.Stream;

public class StashScanner implements PreRepositoryHook<RepositoryHookRequest>
{


private ApplicationPropertiesService properties;

// public StashScanner(ApplicationPropertiesService properties)
// {
// this.properties = properties;
// }


@Override
public RepositoryHookResult preUpdate(PreRepositoryHookContext context, RepositoryHookRequest request) {
Repository repo = request.getRepository();
Settings settings = context.getSettings();

return RepositoryHookResult.rejected("test","test") ;
}

}

When I'm enabling the constructor I'm not able to see the hook on the local server.

Any help will be appreciated.


0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events