Merge "Support StoryBoard URLs"

This commit is contained in:
Zuul 2018-04-02 15:20:24 +00:00 committed by Gerrit Code Review
commit 7f3796ff42
2 changed files with 14 additions and 7 deletions

View File

@ -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:
<launchpad-id or None>
<IRC handle, email address, or None>
Other contributors:
<launchpad-id or None>
<IRC handle, email address, None>
Work Items
----------

View File

@ -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