gitpoulpi-hosting 1.3.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
15
//! The local Markdown family spec: an issue's "web page" is its note.

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

pub static SPEC: FamilySpec = FamilySpec {
    // `project` is the folder, `reference` the issue number.
    issue_web_url: |_base, project, reference| {
        let id: u64 = reference.trim().trim_start_matches('#').parse().ok()?;
        let store = super::Store::new(project, Default::default());
        let issue = store.get(id).ok()?;
        Some(super::client::file_url(&issue.path))
    },
    ..FamilySpec::none(ApiFamily::LocalMarkdown, "MD", '#')
};