Develop your GitHub Apps in Java with Quarkus
Tip
Interested in GitHub Actions? Have a look at the Quarkus GitHub Action extension.
Quarkus GitHub App is a Quarkus extension that allows to create GitHub Apps in Java with very little boilerplate.
Think of it as Probot for Java with some cool additional features.
And yes, it supports generating native executables with GraalVM or Mandrel.
Your application will look like:
class MyGitHubApp {
void onOpen(@Issue.Opened GHEventPayload.Issue issuePayload) throws IOException {
issuePayload.getIssue().comment("Hello from MyGitHubApp");
}
}
And that's it.
The code above listens to the issues.opened
GitHub event and posts a comment in each opened issue.
That's for the basics but it supports the GitHub REST API, execution of GraphQL queries, YAML or JSON config files in your repository...
It relies on a Smee.io proxy during the development of the app to redirect GitHub events towards your local instance with no hassle.
With the command-airline
additional extension, you can also easily develop comment-based commands (e.g. @bot do something
).
Finally, it comes with a nice and searchable Replay UI:
Quarkus GitHub App 2.x is compatible with Quarkus 3.x.
We recommend using the latest versions of both for the best experience.
To get you started (and more!), please refer to the extensive documentation.
Anything unclear or missing in the documentation? Please open an issue, we will address it quickly.
- Quarkus GitHub Bot
- Hibernate GitHub Bot
- Debezium GitHub Bot
- Keycloak GitHub Bot
- Milestone Check GitHub App
The Quarkus GitHub App extension uses the Hub4j GitHub API to parse the webhook payloads and handle the GitHub REST API calls.
It can also execute GraphQL queries towards the GitHub GraphQL API via the SmallRye GraphQL Client.
The rest of the extension is Quarkus magic - mostly code generation with Gizmo - to get everything wired.
It also leverages Reactive Routes, CDI events (both sync and async), and Caffeine.
This extension is considered stable and is used in production.
This project is licensed under the Apache License Version 2.0.
Thanks goes to these wonderful people (emoji key):
Guillaume Smet 💻 🚧 |
Yoann Rodière 💻 🚧 |
jtama 💻 |
Joël Marty 💻 |
Holly Cummins 💻 |
Edoardo Luppi 🐛 |
Erin Schnabel 💻 |
Ryan Dens 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
Quarkus GitHub App uses the following Open Source projects:
- Quarkus
- Hub4j GitHub API
- Airline
- Event Stream Client for Server-Sent Events
- And for the Replay UI: Fomantic UI, Vue.js and jQuery