2

I am experimenting with Webhooks for GitHub. As I understand, we can register URLs for Webhooks in Github settings. But I wanted to do this programmatically. I am using JGit for API driven Git management. I couldn't see any obvious support for Webhooks in JGit.

Does JGit support Webhook register, unregister, edit etc. APIs?

Rüdiger Herrmann
  • 20,512
  • 11
  • 62
  • 79
Omkar Shetkar
  • 3,488
  • 5
  • 35
  • 50
  • 2
    JGit is a pure Java library implementing the Git version control system. And git doesn't support webhooks. Webhooks are not features of git but features of a few major git hosting. You can try [tag:github-api] for working with webhooks programmatically. – phd Apr 07 '19 at 08:24

1 Answers1

2

JGit does not support Webhooks. JGit is a Git implementation in Java. Webhooks are a feature of GitHub, a hosting service for Git repositories.

The GitHub REST API allows to manage Webhooks, the documentation is here: https://developer.github.com/v3/repos/hooks/

A list of language bindings for the GitHub REST API can be found here: https://developer.github.com/v3/libraries/

Rüdiger Herrmann
  • 20,512
  • 11
  • 62
  • 79
  • 1
    Since I wanted to have generic (GitHub, BitBucket etc.) Git Webhook API support, I think GitHub REST API is the best option. Similarly we may have BitBucket Webhook API. So I will have to develop a common interface to manage Webhooks for different hosting services. Thanks. – Omkar Shetkar Apr 07 '19 at 08:42