I am new to stash (and to java ) plugin development. Tried the most simplest, used a logger to log out some details when a pull request operation happens.
the relevant part is here:
@EventListener
public void testPullReqListener(PullRequestEvent event) {
LOGGER.debug("@@pullreq: " + event.getAction().name());
}
What I don't understand is that this is triggered multiple times (From the ide in the debugger it fires twice, and in the log output I see three @@pullreq entries when for example, I create a new pull request. Could someone tell me why is this the case and how can I handle a pull request event only once?
The PullRequestEvent has e few derived classes for different pull request actions. You get one for each action happening. Check the Atlassian API docs for details.
thank you, PullRequestActivityEvent subclass is the one I was looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.