Class CommitDecorator
java.lang.Object
io.jenkins.plugins.forensics.util.CommitDecorator
- Direct Known Subclasses:
CommitDecorator.NullDecorator
A
RepositoryBrowser
for commits. Since a RepositoryBrowser
has no API to generate links to simple
commits, this decorator adds such a functionality. Note that this API does not only obtain such links, it also
renders these links as HTML a tags.- Author:
- Ullrich Hafner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A decorator that does nothing. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
CommitDecorator
public CommitDecorator()
-
-
Method Details
-
asLink
Obtains a link for the specified commit ID.- Parameters:
id
- the ID of the commit- Returns:
- an HTML a tag that contains a link to the commit
-
getRawLink
Returns the raw link for the specified commit ID.- Parameters:
id
- the ID of the commit- Returns:
- a raw link to the commit, e.g. https://github.com/jenkinsci/analysis-model/commit/9f5eb8b28e422d6249e6c29dc65173a59f2d9f6f
-
asText
Renders the commit ID as a human-readable text.- Parameters:
id
- the ID of the commit- Returns:
- a commit ID as human-readable text
-