How to listen a git push event in a plugin


I'm working for a shcool charitable project ,now I need to execute some code after  a git push event,

but I find that has been deleted. So what to do ? Please.



Yes, there's no such API available anymore.
Could you clarify the use case? There might be another suitable workaround.



I am developing a plugin for intellij and i want to get a listener or an event after the user press the push button in github. Is a class to use for this purpose ? I found this class but it doesnt exists anymore . I want something similar


Thanks very much..So after the user press the push button from the dialog then handle method execute and then the push taking place is that right? Do you have a snipet of code to understand how i can implement this ?


Thanks very much.Unfortunately PrePushHandler doesn't work in my case because I want an event after a successful push. Is possible to listen to successful messages of git? So in prePushHandler get the push details object and then after the successful message run my logic.


There's general notification listener, but it'll be unreliable for this purpose.

No, no explicit api to listen for the end of the push.


Thanks .. I tried to implement the notificaiton listener but it doesn work am i doing something wrong ? 

I created a class Test and i implement the Notication interface and inside the notify method i add a message.

public class test implements Notifications {
public void notify(@NotNull Notification notification) {
System.out.println("my notification");

And then in the plugin xml i declare the listener 

<listener  class="network.radicle.jetbrains.radiclejetbrainsplugin.config.test" topic="com.intellij.notification.Notifications"/>

I see the notification from intellij in the right cornet but i cant see the message that i print 

package com.intellij.sample

import com.intellij.notification.Notification
import com.intellij.notification.NotificationType
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.project.DumbAwareAction

class MyListener : com.intellij.notification.Notifications {
override fun notify(notification: Notification) {

class SendTestMessageAction : DumbAwareAction("Send Test Message") {
override fun actionPerformed(e: AnActionEvent) {
Notification("group", "Some title", "Some message", NotificationType.INFORMATION).notify(e.project)


<listener class="com.intellij.sample.MyListener"

works for me.

You might want to check "Project vs Application" for listener/notification and whether test initialize IJ platform properly (and EP class is actually loaded).


Please sign in to leave a comment.