Rename issue action to match patch

Signed-off-by: Alexis Sellier <alexis@radicle.xyz>
This commit is contained in:
Alexis Sellier 2022-12-11 20:03:23 +01:00
parent 24f1de980e
commit f90f714fcf
No known key found for this signature in database
1 changed files with 5 additions and 5 deletions

View File

@ -160,7 +160,7 @@ impl Issue {
pub fn apply(&mut self, ops: impl IntoIterator<Item = Op>) -> Result<(), Error> {
for op in ops {
match op.action {
Action::Title { title } => {
Action::Edit { title } => {
self.title.set(title, op.clock);
}
Action::Lifecycle { state } => {
@ -198,8 +198,8 @@ impl Deref for Issue {
impl store::Transaction<Issue> {
/// Set the issue title.
pub fn title(&mut self, title: impl ToString) -> OpId {
self.push(Action::Title {
pub fn edit(&mut self, title: impl ToString) -> OpId {
self.push(Action::Edit {
title: title.to_string(),
})
}
@ -391,7 +391,7 @@ impl<'a> Issues<'a> {
) -> Result<IssueMut<'a, 'g>, Error> {
let (id, issue, clock) =
Transaction::initial("Create issue", &mut self.raw, signer, |tx| {
tx.title(title);
tx.edit(title);
tx.comment(description);
tx.tag(tags.to_owned(), []);
})?;
@ -416,7 +416,7 @@ impl<'a> Issues<'a> {
#[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)]
#[serde(tag = "type", rename_all = "camelCase")]
pub enum Action {
Title { title: String },
Edit { title: String },
Lifecycle { state: State },
Tag { add: Vec<Tag>, remove: Vec<Tag> },
Thread { action: thread::Action },