dak.bts_categorize

bts – manage bugs filed against ftp.debian.org

@contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2009 Mike O’Connor <stew@vireo.org> @copyright: 2010 Alexander Reichle-Schmehl <tolimar@debian.org> @license: GNU General Public License version 2 or later

Functions

main()

for now, we just dump a list of commands that could be sent for control@b.d.o

send_email(commands[, simulate])

usage()

Classes

BugClassifier()

classify bugs using usertags based on the bug subject lines

class dak.bts_categorize.BugClassifier[source]

classify bugs using usertags based on the bug subject lines

>>> BugClassifier.rm_re.match( "RM: asdf" ) != None
True
>>> BugClassifier.rm_re.match( "[dak] Packages.diff/Index broken" ) != None
False
>>> BugClassifier.dak_re.match( "[dak] Packages.diff/Index broken" ) != None
True
arch_re = re.compile('^\\[Architectures\\]')
classifiers = {re.compile('^RM'): 'remove', re.compile('^\\[dak\\]'): 'dak', re.compile('^\\[Architectures\\]'): 'archs', re.compile('^override'): 'override'}
classify_bug(bug)[source]

if any of our classifiers match, return a newline terminated command to set an appropriate usertag, otherwise return an empty string

dak_re = re.compile('^\\[dak\\]')
email_text()[source]
override_re = re.compile('^override')
rm_re = re.compile('^RM')
unclassified_bugs()[source]

Returns a list of open bugs which have not yet been classified by one of our usertags.

dak.bts_categorize.main()[source]

for now, we just dump a list of commands that could be sent for control@b.d.o

dak.bts_categorize.send_email(commands, simulate=False)[source]
dak.bts_categorize.usage()[source]