[Collab-qa-commits] r1745 - / retitle-old-ita-itp

Lucas Nussbaum lucas at alioth.debian.org
Mon May 24 19:16:48 UTC 2010


Author: lucas
Date: 2010-05-24 19:16:42 +0000 (Mon, 24 May 2010)
New Revision: 1745

Added:
   retitle-old-ita-itp/
   retitle-old-ita-itp/retitle-old-ita-itp.rb
Log:
script to retitle old ITA/ITP to O/RFP

Added: retitle-old-ita-itp/retitle-old-ita-itp.rb
===================================================================
--- retitle-old-ita-itp/retitle-old-ita-itp.rb	                        (rev 0)
+++ retitle-old-ita-itp/retitle-old-ita-itp.rb	2010-05-24 19:16:42 UTC (rev 1745)
@@ -0,0 +1,117 @@
+#!/usr/bin/ruby -w
+# Retitles old ITP/ITA bugs to RFP/O.
+# Always wait for UDD to be updated before running again!
+
+require 'pp'
+require 'dbi'
+
+ita_months = 18
+itp_months = 18
+
+
+#### old ITA
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+sth = dbh.prepare("select id, arrival, owner, title, last_modified from bugs
+            where package='wnpp' and title ~ 'ITA:'
+            and last_modified < current_date - interval '#{ita_months} months' and done = ''
+            and id not in (select id from bugs_merged_with where id > merged_with)")
+sth.execute ; rows = sth.fetch_all
+rows.each do |r|
+  id = r['id']
+  subject = r['title']
+  next if subject !~ /^ITA: ([^ ]+) /
+  source  = $1
+  newsub = subject.gsub(/^ITA: /, 'O: ')
+  f = File::new('tmpfile', 'w')
+  puts "#{id}..."
+  f.puts <<-EOF
+From: Lucas Nussbaum <lucas at debian.org>
+To: #{id}@bugs.debian.org
+Cc: control at bugs.debian.org
+Subject: #{source}: changing back from ITA to O
+
+retitle #{id} #{newsub}
+noowner #{id}
+thanks
+
+Hi,
+
+This is an automatic email to change the status of #{source} back from ITA
+(Intent to Adopt) to O (Orphaned), because this bug hasn't seen any activity
+during the last #{ita_months} months.
+
+If you are still interested in adopting #{source}, please send a mail to
+<control at bugs.debian.org> with:
+
+ retitle #{id} #{subject}
+ owner #{id} !
+ thanks
+
+However, it is not recommended to keep ITA for a long time without acting on
+the package, as it might cause other prospective maintainers to refrain from
+adopting the package. It is also a good idea to document your progress on this
+ITA from time to time, by mailing <#{id}@bugs.debian.org>.
+
+Thank you for your interest in Debian,
+-- 
+Lucas, for the QA team
+ EOF
+  f.close
+  raise "sendmail failed for #{source}!" if not system("/usr/sbin/sendmail -t < tmpfile")
+end
+puts "old ITA: #{rows.length} packages processed"
+
+
+#### old ITP
+
+dbh = DBI::connect('DBI:Pg:dbname=udd;port=5441;host=localhost', 'guest')
+sth = dbh.prepare("select id, arrival, owner, title, last_modified from bugs
+            where package='wnpp' and title ~ 'ITP:'
+            and last_modified < current_date - interval '#{itp_months} months' and done = ''
+            and id not in (select id from bugs_merged_with where id > merged_with)")
+sth.execute ; rows = sth.fetch_all
+rows.each do |r|
+  id = r['id']
+  subject = r['title']
+  next if subject !~ /^ITP: ([^ ]+) /
+  source  = $1
+  newsub = subject.gsub(/^ITP: /, 'RFP: ')
+  f = File::new('tmpfile', 'w')
+  puts "#{id}..."
+  f.puts <<-EOF
+From: Lucas Nussbaum <lucas at debian.org>
+To: #{id}@bugs.debian.org
+Cc: control at bugs.debian.org
+Subject: #{source}: changing back from ITP to RFP
+
+retitle #{id} #{newsub}
+noowner #{id}
+thanks
+
+Hi,
+
+This is an automatic email to change the status of #{source} back from ITP
+(Intent to Package) to RFP (Request for Package), because this bug hasn't seen
+any activity during the last #{itp_months} months.
+
+If you are still interested in adopting #{source}, please send a mail to
+<control at bugs.debian.org> with:
+
+ retitle #{id} #{subject}
+ owner #{id} !
+ thanks
+
+However, it is not recommended to keep ITP for a long time without acting on
+the package, as it might cause other prospective maintainers to refrain from
+packaging that software. It is also a good idea to document your progress on
+this ITP from time to time, by mailing <#{id}@bugs.debian.org>.
+
+Thank you for your interest in Debian,
+-- 
+Lucas, for the QA team
+ EOF
+  f.close
+  raise "sendmail failed for #{source}!" if not system("/usr/sbin/sendmail -t < tmpfile")
+end
+puts "old ITP: #{rows.length} packages processed"


Property changes on: retitle-old-ita-itp/retitle-old-ita-itp.rb
___________________________________________________________________
Added: svn:executable
   + *




More information about the Collab-qa-commits mailing list