Update changelog.py and fix markdown indent
This behaves the same as in Icinga 2, only the default redmine project is different. There's also an addition for "support" as tracker.
This commit is contained in:
parent
1a7da738ae
commit
c3da7a5bce
18
ChangeLog
18
ChangeLog
|
@ -1,6 +1,8 @@
|
|||
# Icinga Web 2 Changelog
|
||||
|
||||
## What's New in Version 2.3.0
|
||||
## What's New
|
||||
|
||||
### What's New in Version 2.3.0
|
||||
|
||||
#### Features
|
||||
|
||||
|
@ -34,7 +36,7 @@
|
|||
* Bug 11558: Missing ) in the documentation
|
||||
* Bug 11568: Docs: Global permissions table is broken
|
||||
|
||||
## What's New in Version 2.2.0
|
||||
### What's New in Version 2.2.0
|
||||
|
||||
#### Features
|
||||
|
||||
|
@ -95,7 +97,7 @@
|
|||
* Bug 11197: Menu items without url should ignore the target configuration
|
||||
* Bug 11260: Scheduling downtimes through the API not working
|
||||
|
||||
## What's New in Version 2.1.1
|
||||
### What's New in Version 2.1.1
|
||||
|
||||
#### Features
|
||||
|
||||
|
@ -127,7 +129,7 @@
|
|||
* Bug 10886: "impacted" container is no longer fading out
|
||||
* Bug 10892: Wrong mask for FileCache's temp directory
|
||||
|
||||
## What's New in Version 2.1.0
|
||||
### What's New in Version 2.1.0
|
||||
|
||||
#### Features
|
||||
|
||||
|
@ -168,9 +170,9 @@
|
|||
* Bug 10614: Class loader: hardcode module and Zend prefixes
|
||||
* Bug 10623: Acknowledging multiple selected objects erroneous
|
||||
|
||||
## What's New in Version 2.0.0
|
||||
### What's New in Version 2.0.0
|
||||
|
||||
### Changes
|
||||
#### Changes
|
||||
|
||||
|
||||
Upgrading to Icinga Web 2 2.0.0
|
||||
|
@ -372,9 +374,9 @@ The location of a user's preferences has been changed from config-dir/preference
|
|||
* Bug 10246: Use a separate configuration file for each type of navigation item
|
||||
* Bug 10263: Forms with target=_next remain unusable after first submission
|
||||
|
||||
## What's New in Version 2.0.0-rc1
|
||||
### What's New in Version 2.0.0-rc1
|
||||
|
||||
### Changes
|
||||
#### Changes
|
||||
|
||||
* Improve layout and look and feel in many ways
|
||||
* Apply host, service and custom variable restrictions to all monitoring objects
|
||||
|
|
90
changelog.py
90
changelog.py
|
@ -1,22 +1,20 @@
|
|||
#!/usr/bin/env python
|
||||
#/******************************************************************************
|
||||
# * Icinga 2 *
|
||||
# * Copyright (C) 2012-2015 Icinga Development Team (http://www.icinga.org) *
|
||||
# * *
|
||||
# * This program is free software; you can redistribute it and/or *
|
||||
# * modify it under the terms of the GNU General Public License *
|
||||
# * as published by the Free Software Foundation; either version 2 *
|
||||
# * of the License, or (at your option) any later version. *
|
||||
# * *
|
||||
# * This program is distributed in the hope that it will be useful, *
|
||||
# * but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
# * GNU General Public License for more details. *
|
||||
# * *
|
||||
# * You should have received a copy of the GNU General Public License *
|
||||
# * along with this program; if not, write to the Free Software Foundation *
|
||||
# * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. *
|
||||
# ******************************************************************************/
|
||||
# Icinga 2
|
||||
# Copyright (C) 2012-2016 Icinga Development Team (https://www.icinga.org/)
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software Foundation
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
import urllib2, json, sys, string
|
||||
from argparse import ArgumentParser
|
||||
|
@ -27,7 +25,7 @@ ISSUE_URL= "https://dev.icinga.org/issues/"
|
|||
ISSUE_PROJECT="icingaweb2"
|
||||
|
||||
arg_parser = ArgumentParser(description= "%s (Version: %s)" % (DESCRIPTION, VERSION))
|
||||
arg_parser.add_argument('-V', '--version', type=str, help="define version to query")
|
||||
arg_parser.add_argument('-V', '--version', required=True, type=str, help="define version to query")
|
||||
arg_parser.add_argument('-p', '--project', type=str, help="add urls to issues")
|
||||
arg_parser.add_argument('-l', '--links', action='store_true', help="add urls to issues")
|
||||
arg_parser.add_argument('-H', '--html', action='store_true', help="print html output (defaults to markdown)")
|
||||
|
@ -54,6 +52,21 @@ def format_logentry(log_entry, args = args, issue_url = ISSUE_URL):
|
|||
else:
|
||||
return "* %s %d: %s" % log_entry
|
||||
|
||||
def print_category(category, entries):
|
||||
if len(entries) > 0:
|
||||
print ""
|
||||
print format_header(category, 4)
|
||||
print ""
|
||||
if args.html:
|
||||
print "<ul>"
|
||||
|
||||
for entry in sorted(entries):
|
||||
print format_logentry(entry)
|
||||
|
||||
if args.html:
|
||||
print "</ul>"
|
||||
print ""
|
||||
|
||||
|
||||
version_name = args.version
|
||||
|
||||
|
@ -84,18 +97,20 @@ if "custom_fields" in version:
|
|||
|
||||
changes = string.join(string.split(changes, "\r\n"), "\n")
|
||||
|
||||
print format_header("What's New in Version %s" % (version_name), 2)
|
||||
print format_header("What's New in Version %s" % (version_name), 3)
|
||||
print ""
|
||||
|
||||
if changes:
|
||||
print format_header("Changes", 3)
|
||||
print format_header("Changes", 4)
|
||||
print ""
|
||||
print changes
|
||||
print ""
|
||||
|
||||
offset = 0
|
||||
|
||||
log_entries = []
|
||||
features = []
|
||||
bugfixes = []
|
||||
support = []
|
||||
|
||||
while True:
|
||||
# We could filter using &cf_13=1, however this doesn't currently work because the custom field isn't set
|
||||
|
@ -120,29 +135,18 @@ while True:
|
|||
if ignore_issue:
|
||||
continue
|
||||
|
||||
log_entries.append((issue["tracker"]["name"], issue["id"], issue["subject"].strip()))
|
||||
entry = (issue["tracker"]["name"], issue["id"], issue["subject"].strip())
|
||||
|
||||
for p in range(2):
|
||||
not_empty = False
|
||||
if issue["tracker"]["name"] == "Feature":
|
||||
features.append(entry)
|
||||
elif issue["tracker"]["name"] == "Bug":
|
||||
bugfixes.append(entry)
|
||||
elif issue["tracker"]["name"] == "Support":
|
||||
support.append(entry)
|
||||
|
||||
for log_entry in log_entries:
|
||||
if (p == 0 and log_entry[0] == "Feature") or (p == 1 and log_entry[0] != "Feature"):
|
||||
not_empty = True
|
||||
print_category("Feature", features)
|
||||
print_category("Bugfixes", bugfixes)
|
||||
print_category("Support", support)
|
||||
|
||||
if not_empty:
|
||||
print format_header("Features", 4) if p == 0 else format_header("Bugfixes", 4)
|
||||
print ""
|
||||
if args.html:
|
||||
print "<ul>"
|
||||
|
||||
for log_entry in sorted(log_entries):
|
||||
if (p == 0 and log_entry[0] == "Feature") or (p == 1 and log_entry[0] != "Feature"):
|
||||
print format_logentry(log_entry)
|
||||
|
||||
if not_empty:
|
||||
if args.html:
|
||||
print "</ul>"
|
||||
|
||||
print ""
|
||||
|
||||
sys.exit(0)
|
||||
|
|
Loading…
Reference in New Issue