[Bro-Dev] Closing tickets in commit messages

Seth Hall seth at icir.org
Thu Feb 10 14:15:37 PST 2011


On Feb 10, 2011, at 5:09 PM, Seth Hall wrote:

> If you want to close a ticket through a commit message, the git->trac integration works now.  You just need to reference the ticket in your commit message like this: ticket:393.  I'm not completely sure of the full syntax available for commit messages, but my commits I just did a little bit ago closed my test ticket with this syntax.  We'll just have to be careful with this since we've frequently been changing tickets to merge requests so that the person committing the fix is often not the person that actually closes the ticket.  


Nevermind, I found a place that documents the behavior.  (down at the bottom of the page: http://www.topazproject.org/trac/wiki/CommitGuidelines)

=======begin========
Closing/Commenting-on Tickets

You can automatically comment on or close one or more tickets by including special "commands" in the commit message. These can be anywhere, as the whole commit message is searched. The message is searched for strings of the form:

	• command #1
	• command #1, #2
	• command #1 & #2
	• command #1 and #2
where 'command' is one of "close", "closes", "closed", "fix", "fixes", "fixed", "addresses", "re", "refs", "references", or "see", and N in #N is the ticket number. All of these cause the commit message to be added as a note to the tickets; additionally the close* and fix* commands cause the corresponding tickets to be closed.

Note that you can both fix and reference as many tickets as desired in the commit message.
========end======

I'll add this to the git documentation page later.

  .Seth

--
Seth Hall
International Computer Science Institute
(Bro) because everyone has a network
http://www.bro-ids.org/




More information about the bro-dev mailing list