https://github.com/42bytelabs/octoapp
Octoapp is a Rust library for building GitHub Apps
https://github.com/42bytelabs/octoapp
github github-app rust
Last synced: about 15 hours ago
JSON representation
Octoapp is a Rust library for building GitHub Apps
- Host: GitHub
- URL: https://github.com/42bytelabs/octoapp
- Owner: 42ByteLabs
- License: mit
- Created: 2024-08-07T00:45:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-17T22:39:53.000Z (9 months ago)
- Last Synced: 2025-06-24T11:58:47.473Z (7 months ago)
- Topics: github, github-app, rust
- Language: Rust
- Homepage: https://crates.io/crates/octoapp
- Size: 48.8 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
Octoapp
[][github]
[][crates-io]
[][crates-io]
[][github]
[][github-issues]
[][license]
## Overview
[Octoapp][crates-io] is a Rust library for building [GitHub Apps][docs-github-app].
It provides a simple interface for creating GitHub Apps and [handling webhook events][docs-github-webhooks].
## ✨ Features
- Focus on simplicity and ease of use.
- Built-in support for handling GitHub webhook events.
- Uses `octocrab` for interacting with the GitHub API.
- Supports `rocket` web framework for handling incoming webhook events.
- feature: `rocket`
## 🚀 Quick Start
Run the following command to add `octoapp` to your project:
```bash
cargo add octoapp
```
## 🏃 Getting Started
```rust
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(())
}
```
## 📚 Documentation
You can find the documentation for this project on [docs.rs][docs].
## ♥️ Maintainers / Contributors
## 🦸 Support
Please create [GitHub Issues][github-issues] if there are bugs or feature requests.
This project uses [Semantic Versioning (v2)][semver] 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][license] for the full terms.
[license]: ./LICENSE
[crates-io]: https://crates.io/crates/octoapp
[docs]: https://docs.rs/geekorm/latest/octoapp
[semver]: https://semver.org/
[github]: https://github.com/42ByteLabs/octoapp
[github-issues]: https://github.com/42ByteLabs/octoapp/issues
[docs-github-app]: https://docs.github.com/en/developers/apps
[docs-github-webhooks]: https://docs.github.com/en/developers/webhooks-and-events/webhooks