The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

TAGS
AUG Leaders

Atlassian Community Events