Announcing Hubkit: A High Level Library for the GitHub API

At Revelry, we built our whole development and project management workflow on GitHub. We keep our code in GitHub. We put our user stories in GitHub Issues. We built Lintron and Slack Agile on top of GitHub.

Since we’ve built so many tools and processes using the GitHub API, we’ve built up a sizable internal code library for working with it. Now we’re making it public so you can use it too.

Meet Hubkit.

How’s Hubkit different from any of the other GitHub API libraries out there? We built Hubkit on top of the github_api┬áRuby gem, but it works at a higher level. If github_api is like your database driver, then Hubkit is like your ORM. You tell Hubkit what you want, not what to do. You can query GitHub declaratively, not imperatively. Let Hubkit worry about hitting the right endpoints in the right order.

For example, to get all closed issues on a given repo that were originally opened in the last 14 days, you could do something like:

repo.issues.opened_between(14.days.ago, Time.zone.now).closed

Or you could count how many times an issue was marked “in progress” like this:

issue.events.labeled('in progress').count

Hubkit seamlessly handles the necessary requests to the Repo, Issue, and Event endpoints for you. It also handles pagination behind the scenes when you have multiple pages of data.

Future Roadmap

We have tons of ideas for new Hubkit features. Here are just a couple we hope to add soon:

  • Support GitHub’s newer GraphQL API. This will allow Hubkit to do many of its operations faster.
  • Add more built-in chainable scopes. You can easily write your own now, but we want to cover the most common operations right out of the box.
  • Adding support for the newer Projects and Reviews endpoints of the GitHub API.

Check it out and let us know what you think. Contributions and feature requests are welcome.

If you love making great software, consider joining the Revelry team!

Apply to work with us!
We share our thoughts on development, product, and design on our Revelry blog every week.
Keep in touch by subscribing to CODING CREATIVITY.