pub struct RedmineConfig {
pub url: String,
pub ticket_patterns: Vec<String>,
pub tracker_type_colors: HashMap<String, LabelColorConfig>,
pub priority_colors: HashMap<String, LabelColorConfig>,
}Expand description
Per-project Redmine integration configuration embedded in projects.toml
under [project.redmine].
Each GitLab project can point to a different Redmine instance, enabling
multi-tenant setups where project A uses redmine-a.example.com and project B
uses redmine-b.example.com. The API token for each instance is stored
separately in the OS keyring, keyed by the Redmine URL.
Example in projects.toml:
[[project]]
name = "Backend — Client A"
project_id = "12345678"
gitlab_url = "https://gitlab.com"
[project.redmine]
url = "https://redmine-a.example.com"
[project.redmine.tracker_type_colors]
"Bug" = { bg = "red", fg = "white" }Fields§
§url: StringBase URL of the Redmine instance, e.g. “https://redmine.example.com”. Must not have a trailing slash.
ticket_patterns: Vec<String>Regex patterns used to detect ticket IDs in the MR title and description. Each pattern must expose the numeric ticket ID in capture group 1.
tracker_type_colors: HashMap<String, LabelColorConfig>Colour overrides for Redmine tracker-type labels displayed as badges in the Inspector panel (e.g. “Evolution”, “Bug”, “Support”).
Keys are matched case-insensitively against the tracker field returned
by the Redmine API. Use "*" as a catch-all fallback.
Example:
[project.redmine.tracker_type_colors]
"Bug" = { bg = "red", fg = "white" }
"Evolution" = { bg = "cyan", fg = "black" }
"Support" = { bg = "yellow", fg = "black" }
"*" = { bg = "dark_gray", fg = "white" }priority_colors: HashMap<String, LabelColorConfig>Colour overrides for Redmine priority labels displayed as badges in the Inspector panel (e.g. “Regular”, “High”, “Urgent”).
Keys are matched case-insensitively against the priority field returned
by the Redmine API. Use "*" as a catch-all fallback.
Example:
[project.redmine.priority_colors]
"Low" = { bg = "dark_gray", fg = "white" }
"Regular" = { bg = "dark_gray", fg = "white" }
"High" = { bg = "yellow", fg = "black" }
"Urgent" = { bg = "red", fg = "white" }
"*" = { bg = "dark_gray", fg = "white" }Implementations§
Source§impl RedmineConfig
impl RedmineConfig
Sourcepub fn is_active(&self) -> bool
pub fn is_active(&self) -> bool
Returns true when the URL is non-empty after trimming.
Used to gate the integration without unwrapping an Option<RedmineConfig>.
Sourcepub fn apply_env_override(&mut self) -> bool
pub fn apply_env_override(&mut self) -> bool
Applies the REDMINE_URL environment variable override when set,
returning whether the value was changed.
Trait Implementations§
Source§impl Clone for RedmineConfig
impl Clone for RedmineConfig
Source§fn clone(&self) -> RedmineConfig
fn clone(&self) -> RedmineConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more