Weave documentation
Rust referenceloom-gateway

loom-gateway · routes::pulls

Source declarations, signatures and documentation for routes::pulls.

Source: sigil/weave/tools/loom-gateway/src/routes/pulls.rs. SHA-256: 3019f0b322288e6d8cb2a2456a283bc0f1c8f9cdeab78dd7e953562f2592875e.

This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.

routes::pulls::PrSummary

#[derive(Serialize)]
pub struct PrSummary {
pub id: String,
pub title: String,
pub head_branch: String,
pub base_branch: String,
pub author_did: String,
pub status: String,
pub created_ms: u64,
pub updated_ms: u64
}

Source line: 18.

routes::pulls::PullsEnvelope

#[derive(Serialize)]
pub struct PullsEnvelope {
pub items: Vec<PrSummary>,
pub total: usize
}

Source line: 51.

routes::pulls::list

GET /api/v1/repos/:name/pulls

pub async fn list(
    State(state): State<AppState>,
    Path(name): Path<String>,
) -> Result<Json<PullsEnvelope>, ApiError>;

Source line: 57.

routes::pulls::ApprovalSummary

#[derive(Serialize)]
pub struct ApprovalSummary {
pub approver_did: String,
pub approved_head_seq: u64,
pub signed_at_ms: u64,
/// Whether the approval still pins to the PR's *current* head_seq.

/// `false` indicates the head advanced after signing — UI shows

/// "stale" badge.

pub pinned_to_current_head: bool
}

Source line: 75.

routes::pulls::PrDetail

#[derive(Serialize)]
pub struct PrDetail {
pub pr: PrFull,
pub approvals: Vec<ApprovalSummary>
}

Source line: 86.

routes::pulls::PrFull

#[derive(Serialize)]
pub struct PrFull {
pub id: String,
pub title: String,
pub description: String,
pub head_branch: String,
pub head_commit_seq: u64,
pub base_branch: String,
pub base_commit_seq: u64,
pub author_did: String,
pub repo_id: String,
pub status: String,
pub created_ms: u64,
pub updated_ms: u64,
pub merged_commit_seq: Option<u64>
}

Source line: 92.

routes::pulls::detail

GET /api/v1/repos/:name/pulls/:id

pub async fn detail(
    State(state): State<AppState>,
    Path((name, id)): Path<(String, String)>,
) -> Result<Json<PrDetail>, ApiError>;

Source line: 135.

routes::pulls::ApproveRequest

#[derive(Deserialize)]
pub struct ApproveRequest {

}

Source line: 162.

routes::pulls::approve

POST /api/v1/repos/:name/pulls/:id/approve

pub async fn approve(
    State(state): State<AppState>,
    Path((name, id)): Path<(String, String)>,
    Json(_): Json<ApproveRequest>,
) -> Result<Json<PrDetail>, ApiError>;

Source line: 165.

routes::pulls::MergeRequest

#[derive(Deserialize, Default)]
pub struct MergeRequest {
/// Optional override; defaults to 1 (matches CLI default).

#[serde(default)]
pub min_approvals: Option<u32>,
/// Optional commit message override.

#[serde(default)]
pub message: Option<String>
}

Source line: 197.

routes::pulls::merge

POST /api/v1/repos/:name/pulls/:id/merge

pub async fn merge(
    State(state): State<AppState>,
    Path((name, id)): Path<(String, String)>,
    Json(req): Json<MergeRequest>,
) -> Result<Json<PrDetail>, ApiError>;

Source line: 207.

On this page