[Openstack-docs] Fwd: [openstack-dev] [Infra] New "Bug" tags in commit messages

Tom Fifield tom at openstack.org
Sat Aug 3 23:28:15 UTC 2013


This is awesome :)

Very useful for bugs like our quantum rename one.

Regards,

Tom


-------- Original Message --------
Subject: [openstack-dev] [Infra] New "Bug" tags in commit messages
Date: Fri, 02 Aug 2013 09:00:08 -0700
From: jeblair at openstack.org (James E. Blair)
Reply-To: OpenStack Development Mailing List
<openstack-dev at lists.openstack.org>
To: OpenStack Development Mailing List <openstack-dev at lists.openstack.org>

Hi,

Anthony Dodd has recently implemented some cool new features that we
discussed at the summit -- driving more automation from commit messages.
Here's what you need to know to use the new features:

Use header style references when referencing a bug in your commit
log. The following styles are now supported and recommended [1]:

    Closes-Bug: #1234567 -- use 'Closes-Bug' if the commit is intended to
    fully fix and close the bug being referenced.

    Partial-Bug: #1234567 -- use 'Partial-Bug' if the commit is only a
    partial fix and more work is needed.

    Related-Bug: #1234567 -- use 'Related-Bug' if the commit is merely
    related to the referenced bug.

While it is perfectly fine to reference a bug at any point within your
commit log, in order for proper automation to take place, ensure that
you reference your bugs on their own line, and preferably at the bottom
of the commit log near the Change-Id header as prescribed in our wiki
[2].

The Regular Expression which we use to parse commit logs for bug
references is case-insensitive. Using the header 'closes-bug' is
identical to using 'Closes-Bug' in terms of the automation it will
affect.

If your fix spans multiple commits, then simply use the 'Partial-Bug'
header when you reference your bug. Then, when you are ready to close
the bug with a final commit, use the 'Closes-Bug' header.

If you are having a lot of difficulty remembering to use the recommended
header styles, have no fear! Referencing your bugs the old school way
still works. That is:

    bug #123454321 -- this will invoke the 'Closes-Bug' functionality.

    fixes bug: #123454321 -- this will invoke the 'Closes-Bug'
    functionality.

    resolves bug: #123454321 -- this will invoke the 'Closes-Bug'
    functionality.

    Supplying an unknown bug header—such as 'Mega-Bug: #123454321' -- will
    simply invoke the 'Related-Bug' functionality for safety reasons.

[1] For original summit discussion, see
    https://etherpad.openstack.org/drive-automation-from-commitmsg

[2] https://wiki.openstack.org/wiki/GitCommitMessages

Thanks again, Anthony, for doing this!

-Jim

_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev





More information about the Openstack-docs mailing list