Skip to content

Commit b11ead5

Browse files
committed
MINOR: Make release notes script check resolutions to avoid spurious inclusion of non-fix 'fixes' in release notes.
Author: Ewen Cheslack-Postava <me@ewencp.org> Reviewers: Ismael Juma <ismael@juma.me.uk> Closes apache#2174 from ewencp/release-notes-resolution-filters
1 parent 7d0f3e7 commit b11ead5

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

release_notes.py

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,28 @@ def issue_link(issue):
6161
print >>sys.stderr, "Didn't find any issues for the target fix version"
6262
sys.exit(1)
6363

64-
unresolved_issues = [issue for issue in issues if issue.fields.resolution is None]
64+
# 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
65+
UNRESOLVED_RESOLUTIONS = [None,
66+
"Unresolved",
67+
"Duplicate",
68+
"Invalid",
69+
"Not A Problem",
70+
"Not A Bug",
71+
"Won't Fix",
72+
"Incomplete",
73+
"Cannot Reproduce",
74+
"Later",
75+
"Works for Me",
76+
"Workaround",
77+
"Information Provided"
78+
]
79+
unresolved_issues = [issue for issue in issues if issue.fields.resolution in UNRESOLVED_RESOLUTIONS or issue.fields.resolution.name in UNRESOLVED_RESOLUTIONS]
6580
if unresolved_issues:
66-
print >>sys.stderr, "The release is not completed since unresolved issues were found still tagged with this release as the fix version:"
81+
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:"
6782
for issue in unresolved_issues:
68-
print >>sys.stderr, "Unresolved issue: %s %s" % (issue.key, issue_link(issue))
83+
print >>sys.stderr, "Unresolved issue: %15s %20s %s" % (issue.key, issue.fields.resolution, issue_link(issue))
84+
print >>sys.stderr
85+
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."
6986
sys.exit(1)
7087

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

0 commit comments

Comments
 (0)