Listen for Git push event in a VSCode extension code

Viewed 42

I am trying to create a VSCode extension that listens to Git push events from a repository and fetches the commit ID, which is sent to an API (REST) and performs several other operations. I have tried two approaches till now: A FileSystemWatcher which watches for changes in the repo .git folder, and the other one being subscribing to RepositoryState's onDidChange event. Unfortunately, both approaches aren't working. Can anyone help me with a better solution for this requirement?

0 Answers
Related