switchtrue / jirachangelogbuilder Goto Github PK
View Code? Open in Web Editor NEWCommunicates with JIRA and generates a change log for a given JIRA Project Version
License: MIT License
Communicates with JIRA and generates a change log for a given JIRA Project Version
License: MIT License
If multiple versions have the same release dates, those versions will be sorted by version number ascending instead of descending.
Sample output:
11-06-2013 XXX-2.9.006
Bug fix release for XXX-2.9.000
[...]
07-06-2013 XXX-2.9.003
Bug fix release for XXX-2.9.000
[...]
07-06-2013 XXX-2.9.004
Bug fix release for XXX-2.9.000
[...]
07-06-2013 XXX-2.9.005
Bug fix release for XXX-2.9.000
[...]
06-06-2013 XXX-2.9.002
Bug fix release for XXX-2.9.000
[...]
05-06-2013 SEWPAC-2.9.001
Bug fix release for SEWPAC-2.9.000
[...]
As part of the maven build we should be generating the javadocs.
Add a flag to specify the name of the JIRA filed to be used as the changelog description. currently it is hard-coded as "Changelog Description" with a fall back of "Summary".
The "Summary" fallback is fine.
I'm facing the following exception running the lasted release of the changelog builder:
java -jar jira-changelog-builder.jar http://192.168.56.110:8080 **** **** Project 0.0.1 ./ plain-text.mustache.txt --debug
DEBUG 10:26:17: --debug flag found. Debug logging enabled.
DEBUG 10:26:17: Starting with parameters:
Version: 0.0.1
JIRA Project Key: Project
JIRA URL: http://192.168.56.110:8080
JIRA username: ******
JIRA password: *******
Template files: plain-text.mustache.txt
DEBUG 10:26:17: Establishing JIRA API connection for generating changelog to http://192.168.56.110:8080.
DEBUG 10:26:18: Obtaining project information via JIRA API.
Dez 04, 2013 10:26:18 AM com.sun.jersey.api.client.ClientResponse getEntity
Grave: A message body reader for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/json;charset=UTF-8 was not found
Dez 04, 2013 10:26:18 AM com.sun.jersey.api.client.ClientResponse getEntity
Grave: The registered message body readers compatible with the MIME media type are:
application/json;charset=UTF-8 ->
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$App
com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$App
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$App
*/* ->
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$General
com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$General
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General
com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy
Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/json;charset=UTF-8 was not found
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:548)
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:505)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:66)
at com.atlassian.jira.rest.client.internal.jersey.JerseyProjectRestClient.getProject(JerseyProjectRestClient.java:49)
at com.atlassian.jira.rest.client.internal.jersey.JerseyProjectRestClient.getProject(JerseyProjectRestClient.java:63)
at net.foxopen.jira.changelog.JiraAPI.fetchVersionDetails(JiraAPI.java:99
Hi,
Firstly, thanks for this -- it's exactly what we've been after!
One issue we're seeing which makes this impractical to use in a continuous integration system is that it appears to hang when complete. I've tried this on both a Linux and a Windows system. With debugging enabled, it gets to the 'Done - Success!' line... but then requires a Ctrl+C to end.
Unfortunately, this causes the CI build to hang -- any help appreciated!
Thanks,
Chris
If a JIRA is failed and is now part of another release, the previous release's item cached still has this issue listed.
It would be great to update the cache policy to invalidate a cached element if one of the JIRA listed is updated.
Currently the API is called to get a list of versions for a project, then get a list of issues for that version and then for each issue to get its details. I would be nice to reduce the number of requests made. Perhaps this is possible without the use of the JIRA API Java library and communication directly.
We're now using maven to build so we should remove the files left over from the ant build.
Currently the changelog builder always produces a changelog with a full history of all previous builds.
It would be good to offer additional arguments to be able to limit what comes out, it would be good to consider the following options:
It could possibly be handle by a single argument --history
that could appear in the following distinct formats:
--history 8
--history YYYY-MM-DD
--history 2w
or --history 4d
or --history 1y
for day, week and year durations.--history ALL
The code could simply parse the value for the appropriate format and raise an exception if none of these are matched.
For backward compatibility the default options should be ALL.
Sometimes is necessary to pass some dynamic data to be used in changelog's template. Passing parameters in the command seems a good way to achieve that (only scalar values).
jira-chagelog-builder ... foo=1 bar=http://acme.com
Currently the changelog builder includes every version in JIRA with a release date prior to to the date on which the changelog builder is being run.
This is not ideal when multiple version are being produced in parallel and the changelog may include release information for future versions that are built but not yet released.
A mechanism should be provided to allow for the following items:
Create ant builds scripts for the project and get rid of the build directory containing the jars that is currently committed to git.
Currently the JIRAChangelogBuilder requires a command line argument of "--changelog-description-field " to be provided in order to specify field name in JIRA that provide the issue deescription.
Instead it would be good if you could just use any field name in the template and the changelog builder would fetch the appropriate fields from JIRA.
for example:
{{ summary }}
{{ fixVersion }}
{{ changelogdescription }}
{{ epiclink }}
There would have to be a deterministic policy on how tag names are related to field names (maybe case-insensitive and strip spaces?).
As this will involve the parsing of the templates to determine the field names it would also be good to introduce special place holders that can be replaced with environment variables, for example:
{{ $(SOME_ENV_VAR) }}
See if there is any functionality similar to this already in mustache (my gut feeling is no) and identify the "best way" to name the variables.
If a Fix Version is assigned to a JIRA prior to the 'Ready for build' stage (or to any similar stages), the changelog for that version will display those JIRAs.
First of all, congratulations for this awesome project. We use successfully in our CI server.
I would like to suggest provide the latest compiled version so that we can download automatically every time we generate the changelog.
The output format of the changelog is currently hardcoded. It would be nice if it could also produce XML/HTML/etc. Consider using a mustache-like (http://mustache.github.io/) templating format. Pass the template to use as a command line flag so that the same changelog builder jar can be used in different circumstances.
Could have a default template of "default.tmpl" or similar.
The following strack trace appeared to be raised when the specified project key was incorrect.
Can we try to catch this exception and make it more obvious what the issue is.
java -jar jira-changelog-builder.jar http://192.168.56.110:8080 **** **** Project 0.0.1 ./ plain-text.mustache.txt --debug
DEBUG 10:26:17: --debug flag found. Debug logging enabled.
DEBUG 10:26:17: Starting with parameters:
Version: 0.0.1
JIRA Project Key: Project
JIRA URL: http://192.168.56.110:8080
JIRA username: ******
JIRA password: *******
Template files: plain-text.mustache.txt
DEBUG 10:26:17: Establishing JIRA API connection for generating changelog to http://192.168.56.110:8080.
DEBUG 10:26:18: Obtaining project information via JIRA API.
Dez 04, 2013 10:26:18 AM com.sun.jersey.api.client.ClientResponse getEntity
Grave: A message body reader for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/json;charset=UTF-8 was not found
Dez 04, 2013 10:26:18 AM com.sun.jersey.api.client.ClientResponse getEntity
Grave: The registered message body readers compatible with the MIME media type are:
application/json;charset=UTF-8 ->
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$App
com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$App
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$App
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$App
*/* ->
com.sun.jersey.json.impl.provider.entity.JSONJAXBElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONArrayProvider$General
com.sun.jersey.json.impl.provider.entity.JSONObjectProvider$General
com.sun.jersey.json.impl.provider.entity.JSONRootElementProvider$General
com.sun.jersey.json.impl.provider.entity.JSONListElementProvider$General
com.sun.jersey.json.impl.provider.entity.JacksonProviderProxy
Exception in thread "main" com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/json;charset=UTF-8 was not found
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:548)
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:505)
at com.atlassian.jira.rest.client.internal.jersey.AbstractJerseyRestClient.invoke(AbstractJerseyRestClient.java:66)
at com.atlassian.jira.rest.client.internal.jersey.JerseyProjectRestClient.getProject(JerseyProjectRestClient.java:49)
at com.atlassian.jira.rest.client.internal.jersey.JerseyProjectRestClient.getProject(JerseyProjectRestClient.java:63)
at net.foxopen.jira.changelog.JiraAPI.fetchVersionDetails(JiraAPI.java:99
Generated changelog files are currently using Unix line endings, meaning opening a .txt changelog file using a Windows program like Notepad will not display the changelog in a neat format.
It would be ideal to use windows line endings (CR/LF) so that such files can be opened in Notepad and display a neatly formatted changelog.
We have a use case that every time we release a new version, the changelog is generated and appended to the the current one. Currently, we achieve that generating a new file and using command to merge them.
If you consider useful, I can work on that and open a pull request.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.