Skip to main content

gitlab_branch_name

Function gitlab_branch_name 

Source
pub fn gitlab_branch_name(
    iid: u64,
    title: &str,
    confidential: bool,
    template: Option<&str>,
    branch_creator: Option<&str>,
) -> Rendered
Expand description

Render a GitLab branch name for one issue, the way GitLab renders it.

This reproduces Issue.to_branch_name. The order is the source’s own: a confidential issue keeps its title out of the branch and ignores the template entirely, the three template parameters are parameterized first, an absent template joins the present values, an unresolved placeholder stays in the text, and a name over 100 characters is cut and loses its trailing partial segment.