public class GitChangelogApi
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
Changelog |
getChangelog()
Get the changelog as data object.
|
Settings |
getSettings() |
static GitChangelogApi |
gitChangelogApiBuilder() |
java.lang.String |
render()
Get the changelog as rendered string.
|
void |
toFile(java.lang.String filePath)
Write changelog to file.
|
void |
toMediaWiki(java.lang.String username,
java.lang.String password,
java.lang.String url,
java.lang.String title)
Create MediaWiki page with changelog.
|
GitChangelogApi |
withCustomIssue(java.lang.String name,
java.lang.String pattern,
java.lang.String link,
java.lang.String title)
Custom issues are added to support any kind of issue management, perhaps something that is
internal to your project.
|
GitChangelogApi |
withDateFormat(java.lang.String dateFormat)
Format of dates, see
SimpleDateFormat. |
GitChangelogApi |
withExtendedVariables(java.util.Map<java.lang.String,java.lang.Object> extendedVariables)
Extended variables is simply a key-value mapping of variables that are made available in the
template.
|
GitChangelogApi |
withFromCommit(java.lang.String fromCommit)
Include all commits from here.
|
GitChangelogApi |
withFromRef(java.lang.String fromBranch)
Include all commits from here.
|
GitChangelogApi |
withFromRepo(java.lang.String fromRepo)
Folder where repo lives.
|
GitChangelogApi |
withGitHubApi(java.lang.String gitHubApi)
URL pointing at GitHub API.
|
GitChangelogApi |
withGitHubIssuePattern(java.lang.String gitHubIssuePattern)
Pattern to recognize GitHub:s.
|
GitChangelogApi |
withGitHubToken(java.lang.String gitHubToken)
GitHub authentication token.
|
GitChangelogApi |
withGitLabIssuePattern(java.lang.String gitLabIssuePattern)
Pattern to recognize GitHub:s.
|
GitChangelogApi |
withGitLabProjectName(java.lang.String gitLabProjectName)
In this URL:
https://gitlab.com/tomas.bjerre85/violations-test/issues it would be
violations-test. |
GitChangelogApi |
withGitLabServer(java.lang.String gitLabServer)
Example: https://gitlab.com/
|
GitChangelogApi |
withGitLabToken(java.lang.String gitLabToken)
You can create it in the project settings page.
|
GitChangelogApi |
withIgnoreCommitsWithMesssage(java.lang.String ignoreCommitsIfMessageMatches)
A regular expression that is evaluated on the commit message of each commit.
|
GitChangelogApi |
withIgnoreCommitsWithoutIssue(boolean ignoreCommitsWithoutIssue)
If a commit cannot be mapped to any issue, it can be added to the virtual "
no issue"-issue. |
GitChangelogApi |
withIgnoreTagsIfNameMatches(java.lang.String ignoreTagsIfNameMatches)
A regular expression that is evaluated on each tag.
|
GitChangelogApi |
withJiraIssuePattern(java.lang.String jiraIssuePattern)
Pattern to recognize JIRA:s.
|
GitChangelogApi |
withJiraPassword(java.lang.String string)
Authenticate to JIRA.
|
GitChangelogApi |
withJiraServer(java.lang.String jiraServer)
URL pointing at your JIRA server.
|
GitChangelogApi |
withJiraUsername(java.lang.String string)
Authenticate to JIRA.
|
GitChangelogApi |
withNoIssueName(java.lang.String noIssueName)
This is a "virtual issue" that is added to
Changelog.getIssues(). |
GitChangelogApi |
withReadableTagName(java.lang.String readableTagName)
Your tags may look something like
git-changelog-maven-plugin-1.6. |
GitChangelogApi |
withRemoveIssueFromMessageArgument(boolean removeIssueFromMessage)
If true, the changelog will not contain the issue in the commit comment.
|
GitChangelogApi |
withSettings(java.net.URL url)
|
GitChangelogApi |
withTemplateContent(java.lang.String templateContent)
Use string as template.
|
GitChangelogApi |
withTemplatePath(java.lang.String templatePath)
Path of template-file to use.
|
GitChangelogApi |
withTimeZone(java.lang.String timeZone)
When date of commits are translated to a string, this timezone is used.
|
GitChangelogApi |
withToCommit(java.lang.String toCommit)
Include all commits to here.
|
GitChangelogApi |
withToRef(java.lang.String toBranch)
Include all commits to this reference.
|
GitChangelogApi |
withUntaggedName(java.lang.String untaggedName)
Some commits may not be included in any tag.
|
public static GitChangelogApi gitChangelogApiBuilder()
public Changelog getChangelog() throws GitChangelogRepositoryException
GitChangelogRepositoryExceptionpublic Settings getSettings()
public java.lang.String render()
throws GitChangelogRepositoryException
GitChangelogRepositoryExceptionpublic void toFile(java.lang.String filePath)
throws GitChangelogRepositoryException,
java.io.IOException
GitChangelogRepositoryExceptionjava.io.IOException - When file cannot be written.public void toMediaWiki(java.lang.String username,
java.lang.String password,
java.lang.String url,
java.lang.String title)
throws GitChangelogRepositoryException,
GitChangelogIntegrationException
public GitChangelogApi withCustomIssue(java.lang.String name, java.lang.String pattern, java.lang.String link, java.lang.String title)
SettingsIssue.public GitChangelogApi withDateFormat(java.lang.String dateFormat)
SimpleDateFormat.public GitChangelogApi withExtendedVariables(java.util.Map<java.lang.String,java.lang.Object> extendedVariables)
public GitChangelogApi withFromCommit(java.lang.String fromCommit)
public GitChangelogApi withFromRef(java.lang.String fromBranch)
public GitChangelogApi withFromRepo(java.lang.String fromRepo)
public GitChangelogApi withGitHubApi(java.lang.String gitHubApi)
Issue.getTitle() will be populated
with title from GitHub.https://api.github.com/repos/tomasbjerre/git-changelog-libpublic GitChangelogApi withGitHubIssuePattern(java.lang.String gitHubIssuePattern)
#([0-9]+)public GitChangelogApi withGitHubToken(java.lang.String gitHubToken)
curl -u 'yourgithubuser' -d '{"note":"Git Changelog Lib"}' https://api.github.com/authorizations
public GitChangelogApi withGitLabIssuePattern(java.lang.String gitLabIssuePattern)
#([0-9]+)public GitChangelogApi withGitLabProjectName(java.lang.String gitLabProjectName)
https://gitlab.com/tomas.bjerre85/violations-test/issues it would be
violations-test.public GitChangelogApi withGitLabServer(java.lang.String gitLabServer)
public GitChangelogApi withGitLabToken(java.lang.String gitLabToken)
public GitChangelogApi withIgnoreCommitsWithMesssage(java.lang.String ignoreCommitsIfMessageMatches)
^\[maven-release-plugin\].*|^\[Gradle Release Plugin\].*|^Merge.*
^\\[maven-release-plugin\\].*|^\\[Gradle Release Plugin\\].*|^Merge.*
public GitChangelogApi withIgnoreCommitsWithoutIssue(boolean ignoreCommitsWithoutIssue)
no issue"-issue.public GitChangelogApi withIgnoreTagsIfNameMatches(java.lang.String ignoreTagsIfNameMatches)
public GitChangelogApi withJiraIssuePattern(java.lang.String jiraIssuePattern)
\b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\b\\b[a-zA-Z]([a-zA-Z]+)-([0-9]+)\\bpublic GitChangelogApi withJiraPassword(java.lang.String string)
public GitChangelogApi withJiraServer(java.lang.String jiraServer)
Issue.getTitle() will be
populated with title from JIRA.https://jiraserver/jirapublic GitChangelogApi withJiraUsername(java.lang.String string)
public GitChangelogApi withNoIssueName(java.lang.String noIssueName)
Changelog.getIssues(). It contains all
commits that has no issue in the commit comment. This could be used as a "wall of shame"
listing commiters that did not tag there commits with an issue.public GitChangelogApi withReadableTagName(java.lang.String readableTagName)
git-changelog-maven-plugin-1.6. But in the
changelog you just want 1.6. With this regular expression, the numbering can be
extracted from the tag name./([^/]+?)$public GitChangelogApi withRemoveIssueFromMessageArgument(boolean removeIssueFromMessage)
public GitChangelogApi withSettings(java.net.URL url)
public GitChangelogApi withTemplateContent(java.lang.String templateContent)
withTemplatePath(java.lang.String).public GitChangelogApi withTemplatePath(java.lang.String templatePath)
Changelog.public GitChangelogApi withTimeZone(java.lang.String timeZone)
UTCpublic GitChangelogApi withToCommit(java.lang.String toCommit)
public GitChangelogApi withToRef(java.lang.String toBranch)
public GitChangelogApi withUntaggedName(java.lang.String untaggedName)
Changelog.getTags(), that includes those commits. A
fitting value may be "Next release".