David Caro has posted comments on this change.

Change subject: Check for patches not updated for last 30 and 60 days alone. 
Pass more than one project as command line args. Abandon changes inactive for 
more than 60 days Signed-off-by: Vishnu Sreekumar <[email protected]> 
Change-Id: Ic911411a61e097c734d0199cc0405
......................................................................


Patch Set 1: Code-Review-1

(7 comments)

A few comments, good job :), eager to see it working (I'm sure I have more than 
3 patches that will get abandoned xd)

http://gerrit.ovirt.org/#/c/37426/1/scripts/alert_old_patches.py
File scripts/alert_old_patches.py:

Line 1: #!/usr/bin/python
Pass pep8 and pyflakes on it (I know it might not have passed before, but 
having the opportunity let's take it)
Line 2: 
Line 3: 
Line 4: from __future__ import print_function
Line 5: from email.mime.text import MIMEText


Line 51: Abandoned
Maybe you can store the command common options in a global var, and use that 
instead of using all the globals separated


Line 55: ("
The output might be interesting also, and the return code too


Line 78: if __name__ == "__main__":
Line 79:     global MAIL_SERVER_HOST
Line 80:     subject = "Forgotten Patches"
Line 81:     mailserver = smtplib.SMTP(MAIL_SERVER_HOST)
Line 82:     fromaddr = "[email protected]"
mmm, maybe better to use an address that exists, or 
[email protected] or similar
Line 83:     patches = []
Line 84:     days = [60,30]
Line 85:     template = "Your patch did not have any activity for over 30 days, 
please consider nudging for more attention. : http://gerrit.ovirt.org/%s";
Line 86: 


Line 83:     patches = []
Line 84:     days = [60,30]
Line 85:     template = "Your patch did not have any activity for over 30 days, 
please consider nudging for more attention. : http://gerrit.ovirt.org/%s";
Line 86: 
Line 87:     for project in sys.argv[1:]:
I really prefer using argparse or similar, that will also add th e--help 
command automatically, and allow passing extra option (like could be gerrit 
server, user, etc.)
Line 88:         for day in days:
Line 89:             output = check_forgotten_patches("gerrit.ovirt.org", day, 
project)
Line 90:             if not output:
Line 91:                 print("Forgotten patches within the last %d days were 
not found" % day)


Line 87:     for project in sys.argv[1:]:
Line 88:         for day in days:
Line 89:             output = check_forgotten_patches("gerrit.ovirt.org", day, 
project)
Line 90:             if not output:
Line 91:                 print("Forgotten patches within the last %d days were 
not found" % day)
s/Forgotten patches (.*) were not found/No forgotten patches \1 were found/
Line 92:             for patch, owner in output.items():
Line 93:                 if patch not in patches:
Line 94:                     patches.append(patch)
Line 95:                     if day == 60:


Line 105: com
I know it's not specified in the task, but the emails are:

iheim at redhat.com
bazulay at redhat.com


-- 
To view, visit http://gerrit.ovirt.org/37426
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic911411a61e097c734d0199cc04057c393b974f9
Gerrit-PatchSet: 1
Gerrit-Project: jenkins
Gerrit-Branch: master
Gerrit-Owner: Vishnu Sreekumar <[email protected]>
Gerrit-Reviewer: Barak Korren <[email protected]>
Gerrit-Reviewer: David Caro <[email protected]>
Gerrit-Reviewer: Eyal Edri <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to