Skip to content

Instantly share code, notes, and snippets.

@Rokko11

Rokko11/ReleaseNotes.md

Last active Aug 19, 2019
Embed
What would you like to do?
Erzeugung von ReleaseNotes mit dem maven-changes-plugin. Nach dem Auslesen aus Jira werden sie per Apache Velocity in Markdown exportiert. Die Issues werden anschließend mit einem Lua-Filter verlinkt.
...
<issueManagement>
<system>Jira</system>
<url>https://jira.url/browse/MyProject</url>
</issueManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId>
<version>2.12.1</version>
<configuration>
<version>${RELEASE_VERSION}</version>
<issueManagementSystems>
<issueManagementSystem>JIRA</issueManagementSystem>
</issueManagementSystems>
<webUser>${jira.user}</webUser>
<webPassword>${jira.password}</webPassword>
<template>template.vm</template>
<templateEncoding>UTF-8</templateEncoding>
<announcementFile>ReleaseNotes.md</announcementFile>
<resolutionIds>1,6</resolutionIds>
<statusIds>6</statusIds>
<filter>project = "MyProject" AND fixVersion = ${RELEASE_VERSION}
AND issuetype in (Story, Bug) AND status = 6
AND resolution in (1, 6)
</filter>
</configuration>
</plugin>
</plugins>
...

Version 1.2.3

Stories:

  • MYPROJECT-1: Kurzbeschreibung Story 1
  • MYPROJECT-2: Kurzbeschreibung Story 2

Fixed Bugs:

  • MYPROJECT-12: Anzeigefehler auf Seite 1
  • MYPROJECT-14: Systemabsturz durch Aktion x
docker run -v `pwd`:/data \
pandoc/latex:2.6 \
*.md \
--lua-filter=issue-link.lua \
-o result.pdf
#if ($release.getActions().size() == 0)
# Keine Änderungen in der Version ${version}
#else
# Version ${version}
#if ($release.getActions().size() !=0)
Stories:
#foreach($actionItem in $release.getActions('add'))
#set($action=$actionItem.getAction())
#if ($actionItem.getIssue())
#set($issue=$actionItem.getIssue())
#else
#set($issue="")
#end
#if ($actionItem.getDueTo())
#set($dueto=$actionItem.getDueTo())
#else
#set($dueto="")
#end
- $issue: ${action} #if($!issue != "") #end#if($!dueto != "") #end
#set($issue="")
#set($dueto="")
#end
#end
#if ($release.getActions('fix').size() !=0)
Fixed Bugs:
#foreach($actionItem in $release.getActions('fix'))
#set($action=$actionItem.getAction())
#if ($actionItem.getIssue())
#set($issue=$actionItem.getIssue())
#else
#set($issue="")
#end
#if ($actionItem.getDueTo())
#set($dueto=$actionItem.getDueTo())
#else
#set($dueto="")
#end
- $issue: ${action} #if($!issue != "") #end#if($!dueto != "") #end
#set($issue="")
#set($dueto="")
#end
#end
## End of main loop
#end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.