Re: new toy
[email protected] (H . Merijn Brand) Mon, 27 Aug 2001 10:53:51 +0200
| Newsgroups | perl.bugmongers |
|---|---|
| Message-ID | <[email protected]> |
On Mon 27 Aug 2001 11:25, [email protected] (Richard Foley) wrote: > Robert Spier wrote: > > > It would be worth putting the two/three together, possibly Merijn also > wrote something similar, if I remember correctly? No I only wrote the Tk interface bacause I wanted to browse the database off-line and I have not (and won't) installed the internet modules. > Could go as a script in: ~/scripts/bugadmin or ~scripts/bugclose > > # bugclose bla bla bla > > Where 'bla bla bla' is/are the message/note/comments Like it. Go on. > > I had written something similar a few months ago - except it was > > different. It's around somewhere - but essentially it accepted a > > bugid on the command line and a comment on STDIN. (It's important to > > get those comments in the database.) > > > > -R (thinking about track@bugs) > > > > [email protected] writes: > > >This is still only experimental, but I wanted to see if people were > > >interested. I'm not sure if it actually closes bugs yet, because > > >I'm having problems working the email query interface. > > > > > >In mutt you can pipe messages into it with |close if you stick the > > >script in your path (and you could presumably bind this to a > > >key). > > > > > >Michael > > > > > >#!/usr/bin/perl -w > > > > > >use strict; > > >use Mail::Mailer; > > >use Mail::Internet; > > > > > >my $action = ($0 eq 'close') ? 'close' : 'propose_close'; > > > > > >my $bugdb_email = '[email protected]'; > > > > > >my $mail = new Mail::Internet(\*STDIN); > > > > > >my $mail_head = $mail->head; > > > > > ># would be useful to put the bug id in X-Perlbug-ID > > ># Maybe should patch this in the bugtron > > >my $subject = $mail_head->get('Subject'); > > >chomp $subject; > > >my $bugid; > > >if ($subject =~ /\[ID (\d{8}\.\d{3})\]/) { > > > $bugid = $1; > > >} else { > > > print STDERR "Couldn't find a bug in this message, giving up\n"; > > > sleep 1; > > > exit 0; > > >} > > > > > >my $mailer = new Mail::Mailer; > > > > > >$mailer->open( { > > > To => $bugdb_email, > > > Subject => "-a close b $bugid", > > >} > > >); > > > > > >print $mailer <<ENDIT; > > > > > >This is an automatically generated message from $0 to close > > >the perl bug with bugid [$bugid]. > > > > > >ENDIT > > > > > >$mailer->close; > > > > > >print STDERR "Closed bugid [$bugid]\n"; > > >sleep 1; > > >exit 0; > > > > -- -- H.Merijn Brand Amsterdam Perl Mongers (http://www.amsterdam.pm.org/) using perl-5.6.1, 5.7.1 & 628 on HP-UX 10.20 & 11.00, AIX 4.2, AIX 4.3, WinNT 4, Win2K pro & WinCE 2.11 often with Tk800.022 &/| DBD-Unify ftp://ftp.funet.fi/pub/languages/perl/CPAN/authors/id/H/HM/HMBRAND/