11 unstable releases (3 breaking)
| new 0.4.0 | Feb 1, 2026 |
|---|---|
| 0.3.1 | Nov 27, 2025 |
| 0.2.5 | Apr 17, 2025 |
| 0.2.4 | Jan 4, 2025 |
| 0.2.3 | Nov 1, 2024 |
#856 in HTTP server
54KB
824 lines
Overview
Octoapp is a Rust library for building GitHub Apps. It provides a simple interface for creating GitHub Apps and handling webhook events.
✨ Features
- Focus on simplicity and ease of use.
- Built-in support for handling GitHub webhook events.
- Uses
octocrabfor interacting with the GitHub API. - Support for webhook events.
- Supported Libraries and Framework
🚀 Quick Start
Run the following command to add octoapp to your project:
cargo add octoapp
🏃 Getting Started
use anyhow::Result;
use octoapp::prelude::*;
#[tokio::main]
async fn main() -> Result<()> {
// [optional] Load .env file if it exists
// dotenvy::dotenv().ok();
// Load the configuration (from environment variables)
// Or, you can set the configuration manually
let config = OctoAppConfig::init()
.app_name("My App")
.app_id(12345)
.client_id("client_id")
.client_secret("client_secret")
.webhook_secret("webhook_secret")
.build()
.expect("Failed to build OctoAppConfig");
println!("{}", config);
// Create a new Octocrab instance
let octocrab = config.octocrab();
if let Ok(client) = octocrab {
let repos = client.issues("42ByteLabs", "octoapp")
.list()
.creator("GeekMasher")
.send()
.await?;
}
Ok(())
}
Hyper
Install the Hyper features by using:
cargo add octoapp -F hyper
Once installed, check out the example here to see how to implement it.
Rocket
To install the Rocket features, use the following command:
cargo add octoapp -F rocket
Once installed, check out the example here to see how to implement it.
📚 Documentation
You can find the documentation for this project on docs.rs.
♥️ Maintainers / Contributors
🦸 Support
Please create GitHub Issues if there are bugs or feature requests.
This project uses Semantic Versioning (v2) and with major releases, breaking changes will occur.
📓 License
This project is licensed under the terms of the MIT open source license. Please refer to MIT for the full terms.
Dependencies
~25–64MB
~1M SLoC