[rt-users] enhanced-mailgate eta for RT3

Matthew J. Draper matthewd at staff.airnet.com.au
Wed Jun 18 08:12:58 EDT 2003


Jamie said:
> Post it anyway, I've done a bit with cvs commit messages and 
> bug closing, albeit with debbugs, perhaps I can help.

Okay, done! :)

I think it's pretty much working now, and I've even tidied the code a
little (although my perl, and the indentation, etc, still leave a fair
bit to be desired).


Jesse said:
> Have you guys looked at simply updating the rt calls from the 
> cvs commit handler for RT2?

Absolutely! This is essentially just that, although I cheated a little
on the RT calls... There's a reason this script's name closely resembles
that of rt-mailgate. :)


As far as usage is concerned, follow the usage instructions at the top
of the file, for lines to insert into CVS configuration files, and
customise the following five variables: $cvs_user, $cvs_domain,
$rt_address, $rt_name, $rt_url. If anyone sees a benefit to making this
script read RT's config, then go ahead; I didn't bother, because chances
are, this will often be on a separate machine to the RT installation
anyway.

Obviously, you won't be able to use this to do fun things like resolve
tickets unless you've also applied my enhanced-mailgate patch.

I nearly forgot... I should probably give a sample of the format I
created (my priority was, at the time, just to get something working for
myself, at which point efficiency, and not backward compatibility, was
key):

<< Start commit message >>
This is just plain ordinary commit message content. 

It won't be added to any tickets.
#1234
This message will be added as a comment to ticket #1234.

Ticket messages aren't limited to one line, either, of course.
#2345!
This message will be added as a comment to ticket #2345, which will then
be resolved (!).
#1024:rd
This message will be added as a reply (r) to ticket #1024, and include
instructions for obtaining a diff of each file changed.
#512s
Custom subject!
This message has a custom subject (s), instead of the default 'CVS
Commit'. Also note that the colon seen on ticket #1024 is optional.
#0
This is more plain message. It won't be added to any ticket, because it
is under ticket #0.
#666:s:r:d
Complicated update
Status: stalled
Owner: johndoe

This reply (r), with a custom subject (s), will contain diff
instructions (d), as well as having additional enhanced-mailgate format
commands (Status, Owner). Note that the subject comes BEFORE mailgate
commands, when you use the 's' option.

Also, you can use colons to separate each option, if you like.
#1234r
I can add another block for a ticket I've already updated previously.
This will create a new comment (or in this case, reply), after the
previous one.
#500,600,700!:d
I can update multiple tickets at once, too! Those three tickets will not
have any evidence that I was lazy and only did the one update, unless
someone notices the messages are all the same. Note that the options (in
this case, resolve [!], and diff [d]), apply to ALL tickets listed --
there's no way to specify options for one ticket, but not another (for
now, at least).
<< End commit message >>



Hopefully, someone can put this to good use! :)

Matthew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rt-cvsgate.txt
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20030618/46ac6446/attachment.txt>


More information about the rt-users mailing list