mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-15 11:20:36 +08:00
Add id to revision type
This commit is contained in:
@@ -7,6 +7,7 @@ import type { Reaction } from "./Reaction";
|
||||
import type { Review } from "./Review";
|
||||
|
||||
export type Revision = {
|
||||
id: string;
|
||||
author: Author;
|
||||
description: Array<Edit>;
|
||||
base: string;
|
||||
|
||||
@@ -125,6 +125,8 @@ impl Patch {
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
pub struct Revision {
|
||||
#[ts(as = "String")]
|
||||
id: patch::RevisionId,
|
||||
author: Author,
|
||||
description: Vec<Edit>,
|
||||
#[ts(as = "String")]
|
||||
@@ -141,6 +143,7 @@ pub struct Revision {
|
||||
impl Revision {
|
||||
pub fn new(value: cob::patch::Revision, aliases: &impl AliasStore) -> Self {
|
||||
Self {
|
||||
id: value.id(),
|
||||
author: Author::new(*value.author().id(), aliases),
|
||||
description: value
|
||||
.edits()
|
||||
|
||||
Reference in New Issue
Block a user