feat: basic pr diff rendering

This commit is contained in:
2026-05-24 16:44:10 +01:00
parent 1843622540
commit b3e041a257
23 changed files with 903 additions and 353 deletions

View File

@@ -41,6 +41,7 @@ pub(crate) struct PullRequest {
#[derive(Debug, Deserialize)]
pub(crate) struct DetailedPullRequest {
pub(crate) id: Id,
pub(crate) title: Arc<str>,
pub(crate) state: PullRequestState,
pub(crate) is_draft: bool,
@@ -189,7 +190,7 @@ pub(crate) struct ChangedFile {
pub(crate) change_type: ChangeType,
pub(crate) additions: i64,
pub(crate) deletions: i64,
pub(crate) path: String,
pub(crate) path: Arc<str>,
pub(crate) viewer_viewed_state: FileViewedState,
}
@@ -408,6 +409,7 @@ impl query::QueryFn for FetchPullRequest {
})?;
Ok(DetailedPullRequest {
id: Id(p.id.into()),
title: p.title.into(),
state: p.state,
is_draft: p.is_draft,
@@ -531,7 +533,7 @@ impl query::QueryFn for FetchPullRequestFileTree {
},
additions: node.additions,
deletions: node.deletions,
path: node.path,
path: node.path.into(),
viewer_viewed_state: node.viewer_viewed_state,
})
})