This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Bugzilla Script to close ALL EOL Bugs | |
# Author : Chandan Kumar <chkumar246@gmail.com> | |
# | |
# How to Run this script: | |
# $ python close_eol_bugs.py | |
import bugzilla | |
import getpass | |
BZ_URL = "https://bugzilla.redhat.com" | |
BZ_USER = "<Bugzilla Username>" | |
EOL_MSG = "This bug is against a Version which has reached End of Life.\n" "If it's still present in supported release (http://releases.openstack.org), please update Version and reopen." | |
TARGET_RELEASE = ["Icehouse", "Juno", "Kilo"] | |
PRODUCT = "RDO" | |
RESOLUTION = "EOL" | |
def get_bz_obj(): | |
""" | |
Get Bugzilla Object to perform further query | |
""" | |
bz = bugzilla.Bugzilla(url=BZ_URL, user=BZ_USER, | |
password=getpass.getpass(prompt='Enter your Bugzilla Password:')) | |
return bz | |
def get_eol_bugs(): | |
""" | |
Returns a list of EOL Bugzilla objects | |
""" | |
bz = get_bz_obj() | |
bugs = bz.query(bz.build_query(product=PRODUCT)) | |
eol_bugs = [bug for bug in bugs if bug.target_release[0] in TARGET_RELEASE and bug.status != "CLOSED"] | |
return eol_bugs | |
def close_eol_bug_with_eolmsg(bzobj): | |
""" | |
Close eol bug with a proper msg and resolution | |
""" | |
bzobj.close(RESOLUTION, comment=EOL_MSG) | |
print "%s is CLOSED successfully" % bzobj.weburl | |
def close_all_eolbugs(): | |
""" | |
Close all EOL bugs with Message | |
""" | |
eol_obj = get_eol_bugs() | |
for bug in eol_obj: | |
close_eol_bug_with_eolmsg(bug) | |
if __name__ == '__main__': | |
eol_bzs = get_eol_bugs() | |
print "%d EOL Bugs Found" % len(eol_bzs) | |
close_eol_bug_with_eolmsg(eol_bzs[0]) | |
# TO CLOSE EOL Bugs in one GO | |
# close_all_eolbugs() |
@sankarshanmukhopadhyay The above RDO EOL statement is decided in RDO meeting and we have evaluated Fedora EOL statement before coming to conclusion and then we come to conclusion to keep it short.
Here is the link for RDO meeting: https://meetbot.fedoraproject.org/teams/rdo_meeting_(2016-05-18)/rdo_meeting_(2016-05-18).2016-05-18-15.00.log.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'End-of-Life' is a software development term which may not be intuitive and obvious to all the users who filed the bugs. I'd request re-purposing the text that is used by the Fedora Project.
The Fedora Project uses the following stock response https://fedoraproject.org/wiki/BugZappers/StockBugzillaResponses#End_of_Life_.28EOL.29_product