mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-04 02:33:56 +00:00
Introduce PullRequestApiError with a structured NotFound variant and an
Other(String) catch-all for non-classified failures. Update
get_pull_request, merge_pull_request, and close_pull_request to return
the new type so callers can branch on shape rather than substring.
Server PR handlers now match Err(PullRequestApiError::NotFound { .. })
to map a missing GitHub PR to the existing github_pull_request_not_found
ApiError, removing three err.contains("not found") substring checks.
The Display impl for NotFound preserves the prior message format
("Pull request #N not found in owner/repo") so logging and the
catch-all BAD_GATEWAY response keep their human-readable text.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
31 lines
722 B
TOML
31 lines
722 B
TOML
[package]
|
|
name = "fabro-github"
|
|
edition.workspace = true
|
|
version.workspace = true
|
|
publish = false
|
|
license.workspace = true
|
|
description = "GitHub App authentication and API helpers for Fabro"
|
|
|
|
[lib]
|
|
doctest = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
serde.workspace = true
|
|
serde_json.workspace = true
|
|
fabro-http.workspace = true
|
|
fabro-types = { path = "../fabro-types" }
|
|
jsonwebtoken.workspace = true
|
|
chrono.workspace = true
|
|
tracing.workspace = true
|
|
tokio = { workspace = true }
|
|
base64.workspace = true
|
|
strum.workspace = true
|
|
thiserror.workspace = true
|
|
|
|
[dev-dependencies]
|
|
fabro-macros = { path = "../fabro-macros" }
|
|
fabro-test = { workspace = true }
|
|
tokio = { workspace = true, features = ["test-util", "macros"] }
|