From be2b71fe3b7363df0a1a768307e19f9b62cbcc1f Mon Sep 17 00:00:00 2001 From: Ruby Loo Date: Wed, 28 Mar 2018 16:58:22 -0400 Subject: [PATCH] Support StoryBoard URLs Now that ironic has moved from using Launchpad to Storyboard for tracking features/RFEs, we need to check for StoryBoard URLs in the specifications. Co-Authored-By: Julia Kreger Change-Id: I3442f653a2dc610213d34b55ab8a4c466c888615 --- specs/template.rst | 9 ++++----- tests/test_titles.py | 12 ++++++++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/specs/template.rst b/specs/template.rst index dcf32e9a..215c525d 100644 --- a/specs/template.rst +++ b/specs/template.rst @@ -8,10 +8,9 @@ Title of the Spec ================= -Include the URL of your launchpad bug (which should be tagged with ``rfe`` -tag): +Include the URL of your StoryBoard story (which should have an `rfe`` tag): -https://bugs.launchpad.net/ironic/+bug/XXXXXX +https://storyboard.openstack.org/#!/story/XXXXXXX Introduction paragraph -- start here. @@ -442,10 +441,10 @@ If more than one person is working on the implementation, please designate the primary author and contact. Primary assignee: - + Other contributors: - + Work Items ---------- diff --git a/tests/test_titles.py b/tests/test_titles.py index 7a61fee8..d3f89612 100644 --- a/tests/test_titles.py +++ b/tests/test_titles.py @@ -28,6 +28,10 @@ DRAFT_REQUIRED_TITLES = { 'Proposed change': [], } +# There has to be an RFE story in StoryBoard associated with this spec. +STORYBOARD_URL = 'https://storyboard.openstack.org/#!/story/' + +# Backwards compatibility: # There has to be an RFE bug in launchpad associated with this spec, # and it could be in any ironic project (except for ironic-inspector # which has its own specs repository), not just 'ironic'. However, @@ -36,6 +40,7 @@ DRAFT_REQUIRED_TITLES = { # e.g. https://bugs.launchpad.net/ironic/+bug/12345 :) BUG_URL = 'https://bugs.launchpad.net/' +# Backwards compatibility: BLUEPRINT_URL = 'https://blueprints.launchpad.net/ironic/+spec/' @@ -105,10 +110,13 @@ class TestTitles(testtools.TestCase): (root, _) = os.path.splitext(os.path.basename(filename)) for i, line in enumerate(raw.split("\n")): - if BUG_URL in line: + if STORYBOARD_URL in line: return # Backward compatibility + if BUG_URL in line: + return + if BLUEPRINT_URL in line: self.assertTrue(line.endswith(root), "Filename '%s' must match blueprint name '%s'" % @@ -117,7 +125,7 @@ class TestTitles(testtools.TestCase): if line.startswith(FIRST_TITLE): break - self.fail("URL of launchpad bug is missing") + self.fail("URL of associated story in Storyboard is missing") def _check_license(self, raw): # Check for the presence of this license string somewhere within the