deprecate the use of highlights attached to a release
We want teams to use reno for release notes and cycle-highlights for more general notes. This patch disallows the use of release-specific highlights for new releases from the new series with a message explaining why. We can change the schema and let the yamllint perform the check after running this way for a while. Change-Id: I8e885b856f3412a3f6df691abbfd8c78037bcd91 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
committed by
Sean McGinnis
parent
fdca8437cd
commit
bbbe66d728
@@ -170,6 +170,21 @@ def validate_series_open(deliverable_info,
|
||||
expected_branch, previous_deliverable_file, series_name))
|
||||
|
||||
|
||||
def deprecate_release_highlights(deliverable_info,
|
||||
mk_warning, mk_error):
|
||||
"No releases in the new series until the previous one has a branch."
|
||||
header('Deprecate Release Highlights')
|
||||
if not deliverable_info.get('releases'):
|
||||
return
|
||||
last_release = deliverable_info['releases'][-1]
|
||||
if 'highlights' in last_release:
|
||||
mk_error(
|
||||
'The per-release "highlights" feature is deprecated. '
|
||||
'Please use "cycle-highlights" for marketing notes '
|
||||
'and reno for release notes.'
|
||||
)
|
||||
|
||||
|
||||
def validate_series_first(deliverable_info, series_name,
|
||||
mk_warning, mk_error):
|
||||
"The first release in a series needs to end with '.0'."
|
||||
@@ -1157,6 +1172,11 @@ def main():
|
||||
mk_warning,
|
||||
mk_error,
|
||||
)
|
||||
deprecate_release_highlights(
|
||||
deliverable_info,
|
||||
mk_warning,
|
||||
mk_error,
|
||||
)
|
||||
validate_series_first(
|
||||
deliverable_info,
|
||||
series_name,
|
||||
|
||||
Reference in New Issue
Block a user