Skip to content

Commit

Permalink
MINOR: Make release notes script check resolutions to avoid spurious …
Browse files Browse the repository at this point in the history
…inclusion of non-fix 'fixes' in release notes.

Author: Ewen Cheslack-Postava <[email protected]>

Reviewers: Ismael Juma <[email protected]>

Closes apache#2174 from ewencp/release-notes-resolution-filters
  • Loading branch information
ewencp committed Nov 29, 2016
1 parent 7d0f3e7 commit b11ead5
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions release_notes.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,28 @@ def issue_link(issue):
print >>sys.stderr, "Didn't find any issues for the target fix version"
sys.exit(1)

unresolved_issues = [issue for issue in issues if issue.fields.resolution is None]
# Some resolutions, including a lack of resolution, indicate that the bug hasn't actually been addressed and we shouldn't even be able to create a release until they are fixed
UNRESOLVED_RESOLUTIONS = [None,
"Unresolved",
"Duplicate",
"Invalid",
"Not A Problem",
"Not A Bug",
"Won't Fix",
"Incomplete",
"Cannot Reproduce",
"Later",
"Works for Me",
"Workaround",
"Information Provided"
]
unresolved_issues = [issue for issue in issues if issue.fields.resolution in UNRESOLVED_RESOLUTIONS or issue.fields.resolution.name in UNRESOLVED_RESOLUTIONS]
if unresolved_issues:
print >>sys.stderr, "The release is not completed since unresolved issues were found still tagged with this release as the fix version:"
print >>sys.stderr, "The release is not completed since unresolved issues or improperly resolved issues were found still tagged with this release as the fix version:"
for issue in unresolved_issues:
print >>sys.stderr, "Unresolved issue: %s %s" % (issue.key, issue_link(issue))
print >>sys.stderr, "Unresolved issue: %15s %20s %s" % (issue.key, issue.fields.resolution, issue_link(issue))
print >>sys.stderr
print >>sys.stderr, "Note that for some resolutions, you should simply remove the fix version as they have not been truly fixed in this release."
sys.exit(1)

# Get list of (issue type, [issues]) sorted by the issue ID type, with each subset of issues sorted by their key so they
Expand Down

0 comments on commit b11ead5

Please sign in to comment.