diff --git a/src/handlers/autolabel.rs b/src/handlers/autolabel.rs index 2a1078490..fbddbdb92 100644 --- a/src/handlers/autolabel.rs +++ b/src/handlers/autolabel.rs @@ -1,3 +1,4 @@ +use crate::db::issue_data::IssueData; use crate::{ config::AutolabelConfig, github::{IssuesAction, IssuesEvent, Label}, @@ -6,6 +7,16 @@ use crate::{ use anyhow::Context as _; use tracing as log; +/// Key for the state in the database +const AUTOLABEL_KEY: &str = "autolabel"; + +/// State stored in the database +#[derive(Debug, Default, PartialEq, Clone, serde::Deserialize, serde::Serialize)] +struct AutolabelState { + /// If true, then `autolabel.new_pr` labels have already been applied to this PR. + new_pr_labels_applied: bool, +} + pub(super) struct AutolabelInput { add: Vec