Skip to main content

gitpoulpi_hosting/linear/
spec.rs

1//! The Linear family spec: the page of an issue.
2
3use crate::spec::FamilySpec;
4use gitpoulpi_config::ApiFamily;
5
6pub static SPEC: FamilySpec = FamilySpec {
7    // `https://linear.app/<workspace>/issue/ENG-123`. The workspace slug is
8    // part of the profile's URL when the user typed it
9    // (`https://linear.app/acme`); the listed rows carry the exact URL the
10    // API gave, this one serves commit-message references.
11    issue_web_url: |base, _project, reference| {
12        let reference = reference.trim();
13        (!reference.is_empty()).then(|| format!("{}/issue/{reference}", base.trim_end_matches('/')))
14    },
15    ..FamilySpec::none(ApiFamily::Linear, "LN", '#')
16};