Enum clog::LinkStyle
[−]
[src]
pub enum LinkStyle { Github, Gitlab, Stash, }
Variants
Github | |
Gitlab | |
Stash |
Methods
impl LinkStyle
impl LinkStyle
fn issue_link<S: AsRef<str>>(&self, issue: S, repo: S) -> String
Gets a link to an issue in the specified format.
Example
let link = LinkStyle::Github; let issue = link.issue_link("141", "https://github.com/thoughtram/clog"); assert_eq!("[#141](https://github.com/thoughtram/clog/issues/141", issue);
fn commit_link<S: AsRef<str>>(&self, hash: S, repo: S) -> String
Gets a link to an commit in the specified format.
Example
let link = LinkStyle::Github; let commit = link.commit_link("123abc891234567890abcdefabc4567898724", "https://github.com/thoughtram/clog"); assert_eq!("[#123abc89](https://github.com/thoughtram/clog/commit/123abc891234567890abcdefabc4567898724", commit);