Skip to content

quarkiverse/quarkus-github-app

Repository files navigation

Quarkus GitHub App

Version

All Contributors

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:

Replay UI

Compatibility

Quarkus GitHub App 2.x is compatible with Quarkus 3.x.

We recommend using the latest versions of both for the best experience.

Documentation

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.

Examples

How?

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.

Architecture

Status

This extension is considered stable and is used in production.

License

This project is licensed under the Apache License Version 2.0.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Guillaume Smet
Guillaume Smet

💻 🚧
Yoann Rodière
Yoann Rodière

💻 🚧
jtama
jtama

💻
Joël Marty
Joël Marty

💻
Holly Cummins
Holly Cummins

💻
Edoardo Luppi
Edoardo Luppi

🐛
Erin Schnabel
Erin Schnabel

💻
Ryan Dens
Ryan Dens

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Acknowledgements

Quarkus GitHub App uses the following Open Source projects: