Skip to content
This repository was archived by the owner on Jul 2, 2021. It is now read-only.

Praqma/commit-message-parser

License Build Status Release

Collection of parsers to extract issues from commit messages

GitHub issues

Parser follows guidelines outline by GitHub In addition parser supports to additional key words - reopen and revert. In this case issue reference will have type REVERT which might be handy to point out that change was reverted

    final URL baseUrl = new URL("http://github.com");
    final String baseProject = "user/repo";
    final CommitMessageParser parser = new GitHub(baseUrl, baseProject);
    List<Issue> issues = parser.parse("Fix #123: my super fix");

Example logs

    Jul 20, 2016 8:20:56 PM net.praqma.utils.parsers.cmg.impl.GitHub parse
    INFO: Found issue 123 with transition type RESOLVE and URL to the issue http://github.com/user/repo/issues/123

Atlassian Jira

Parser follows guidelines outlined by Atlassian (See workflow section) Supported key words - close and resolve. In addition parser supports to additional key words - reopen and revert. In this case issue reference will have type REVERT which might be handy to point out that change was reverted

    final URL baseUrl = new URL("http://jira.com");
    final String baseProject = "myproject";
    final CommitMessageParser parser = new Jira(baseUrl, baseProject);
    List<Issue> issues = parser.parse("ignored text ISSUE-1 ignored text #close");

Example logs

    Jul 20, 2016 8:20:57 PM net.praqma.utils.parsers.cmg.impl.Jira parse
    INFO: Found issue ISSUE-1 with transition type RESOLVE and URL to the issue http://jira.com/projects/myproject/issues/ISSUE-1

Get the library

Follow JitPack institutions

Known usages

...

Definition of Done for the contribution

Your pull request should

  • Pass Travis CI check (simply run ./gradlew build locally to test before push)
  • Documentation update
  • New or updated unit tests

About

Collection of parsers to extract issues from commit messages

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages