// Back - An extremely simple git issue tracking system. Inspired by tvix's // panettone // // Copyright (C) 2024 Benedikt Peetz // SPDX-License-Identifier: AGPL-3.0-or-later // // This file is part of Back. // // You should have received a copy of the License along with this program. // If not, see . use std::convert::Infallible; use operation_type::OperationType; use serde::Deserialize; use serde_json::Value; use crate::{ get, git_bug::format::{MarkDown, TimeStamp}, }; use super::{entity, label::Label, Status}; pub mod operation_type; #[derive(Deserialize, Debug)] #[serde(try_from = "Value")] pub enum Operation { AddComment { timestamp: TimeStamp, message: MarkDown, }, Create { timestamp: TimeStamp, title: MarkDown, message: MarkDown, }, EditComment { timestamp: TimeStamp, target: entity::Id, message: MarkDown, }, LabelChange { timestamp: TimeStamp, added: Vec