diff mbox

[kteam-tools,1/3] verify-release-ready: verify no "Miscellaneous" changelog entries

Message ID 1475092338-22449-2-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa Sept. 28, 2016, 7:52 p.m. UTC
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 maintscripts/verify-release-ready | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
diff mbox

Patch

diff --git a/maintscripts/verify-release-ready b/maintscripts/verify-release-ready
index 436c192..11a142b 100755
--- a/maintscripts/verify-release-ready
+++ b/maintscripts/verify-release-ready
@@ -267,6 +267,9 @@  class VerifyReleaseReady():
 
                 s.status('unique release tracking bug', unique_tracker)
 
+        # Verify that the changelog entry contains no "Miscellaneous" entries
+        s.verify_changelog_nomisc()
+
         # Verify the bugs in the changelog are public, targeted against linux and the
         # proper series, and marked Fix Committed.
         s.verify_changelog_bugs()
@@ -324,6 +327,20 @@  class VerifyReleaseReady():
             else:
                 s.status(msg, 'warning')
 
+    def verify_changelog_nomisc(s):
+        # Verify that no "Miscellaneous {upstream,Ubuntu,whatever} changes"
+        # entries were inserted by debian/scripts/misc/git-ubuntu-log
+        msg = 'no "Miscellaneous" entries'
+        changelog = Debian.changelog()
+        content = changelog[1]['content']
+        for line in content:
+            m = re.match("\* Miscellaneous .* changes$", line.strip())
+            if m:
+                s.status(msg, False)
+                stdo(colored('\t\t' + line + '\n', 'red'))
+                return
+        s.status(msg, True)
+
     def verify_changelog_bugs(s):
         master_changelog = Debian.master_changelog()[1]
         changelog_bugs = master_changelog['bugs']