Expand description
GitHub API integration for Miyabi
This crate provides a high-level wrapper around the Octocrab GitHub API client, tailored for Miyabi’s autonomous development workflow.
§Features
- Issue Management: Create, read, update, close issues
- Label Management: Full CRUD operations for labels, bulk sync for 53-label system
- Pull Request Management: Create, merge, close PRs
- State-based Queries: Filter issues by Miyabi state labels
- Type Safety: Uses miyabi-types for consistent type definitions
§Example
use miyabi_github::GitHubClient;
use miyabi_types::issue::IssueState;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = GitHubClient::new("ghp_xxx", "owner", "repo")?;
// Get issues in "pending" state
let pending = client.get_issues_by_state(IssueState::Pending).await?;
println!("Found {} pending issues", pending.len());
// Create a new issue
let issue = client.create_issue(
"Implement new feature",
Some("Feature description here")
).await?;
println!("Created issue #{}", issue.number);
Ok(())
}Re-exports§
pub use auth::check_gh_cli_status;pub use auth::discover_token;pub use auth::validate_token_format;pub use auth::GhCliStatus;pub use client::GitHubClient;pub use labels::Label;pub use projects::ContentType;pub use projects::KPIReport;pub use projects::ProjectItem;
Modules§
- auth
- GitHub authentication utilities
- client
- GitHub API client wrapper
- issues
- GitHub Issues API wrapper
- labels
- GitHub Labels API wrapper
- projects
- GitHub Projects V2 API integration
- pull_
requests - GitHub Pull Requests API wrapper
Structs§
Enums§
- Issue
State - Issue state in Miyabi lifecycle (8 states)
- Issue
State Github - GitHub issue state (open/closed)
- PRState