Re: new toy
[email protected] ((Richard Foley)) Mon, 27 Aug 2001 11:25:40 +0200
| Newsgroups | perl.bugmongers |
|---|---|
| Organization | RFI |
| Message-ID | <[email protected]> |
Robert Spier wrote: > It would be worth putting the two/three together, possibly Merijn also wrote something similar, if I remember correctly? 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 > 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; > > -- -- Ciao Richard Foley Ciao - shorter than AufWiederSehen!