gitpoulpi-hosting 1.1.0

Hosting and issue-tracker API clients (GitHub, GitLab, Gitea/Forgejo, Azure DevOps, Bitbucket, Gerrit, Jira, Trello, Linear, YouTrack, Redmine, local Markdown issues): project listing, clone helpers, SSH key generation and upload, remote-URL provider matching.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! The Redmine family spec: the page of an issue.

use crate::spec::FamilySpec;
use gitpoulpi_config::ApiFamily;

pub static SPEC: FamilySpec = FamilySpec {
    // `{url}/issues/12` for the reference `#12` (or `12`).
    issue_web_url: |base, _project, reference| {
        let number = reference.trim().trim_start_matches('#');
        (!number.is_empty() && number.chars().all(|c| c.is_ascii_digit()))
            .then(|| format!("{}/issues/{number}", base.trim_end_matches('/')))
    },
    ..FamilySpec::none(ApiFamily::Redmine, "RM", '#')
};