POTD: GitHub API for Java


My project of the day (or “POTD”) is GitHub API for Java — a library for accessing GitHub programmatically.

As the Hudson community is embracing plugins developed in Git more and more, I needed to interact with GitHub as a part of the community infrastructure automation. I did a quick Google search to locate existing implementations, but unfortunately I couldn’t find anything good. So I decided to just write my own. Thanks to a reasonable API design of GitHub and a good documentation, it was very easy to do so. The trick is to use the right library, which handles most of the JSON/Java databinding.

The library so far only covers the part of the GitHub API that I care about, which is a small subset of the entire GitHub API. But hopefully this library is easy enough to extend so that other people can add the remaining APIs. The source code is available in GitHub.

7 Comments Add yours

  1. kohsuke says:

    It looks like java.net Maven repository sync hasn’t kicked in yet. But it should be there soon.

  2. How is different from the previous GitHub plug-in for Hudson ?

  3. kohsuke says:

    This is not a plugin for Hudson. It’s just a Java library to interface with GitHub.

  4. HeadLess says:

    Do You tinker in Hudson Deploy plugin still?
    There’s a lot cool stuff in released Cargo..
    Also: deploy to remote Glassfish would be cool 🙂

  5. kohsuke says:

    Haven’t touched it lately, but I agree that there’s a lot more that can be done in that space.

Leave a Reply

Your email address will not be published. Required fields are marked *