.. _commit_message_tags:

Using Commit Message Tags in Manila
===================================

When writing git commit messages for code submissions into manila, it can be
useful to provide tags in the message for both human consumption as well as
linking to other external resources, such as Launchpad. Each tag should be
placed on a separate line. The following tags are used in manila.

- **APIImpact** - Use this tag when the code change modifies a public HTTP
  API interface. This tag indicates that the patch creates, changes, or deletes
  a public API interface or changes its behavior. The tag may be followed by a
  reason beginning on the next line. If you are touching manila's API layer and
  you are unsure if your change has an impact on the API, use this tag anyway.
- **Change-id** - This tag is automatically generated by a Gerrit hook and is
  a unique hash that describes the change. This hash should not be changed
  when rebasing as it is used by Gerrit to keep track of the change.
- **Closes-Bug: | Partial-Bug: | Related-Bug:** *<#launchpad_bug_id>* - These
  tags are used when the change closes, partially closes, or relates to the bug
  referenced by the Launchpad bug ID respectively. This will automatically
  generate a link to the bug in Launchpad for easy access for reviewers.
- **DocImpact** - Use this tag when the code change requires changes or
  updates to documentation in order to be understood. This tag can also be
  used if the documentation is provided along with the patch itself. This will
  also generate a Launchpad bug in manila for triaging and tracking.
  Refer to the section on :ref:`documenting_your_work` to understand where
  to add documentation.
- **Implements: | Partially Implements:** *blueprint <name_of_blueprint>* - Use
  this tag when a change implements or partially implements the given blueprint
  in Launchpad. This will automatically generate a link to the blueprint in
  Gerrit for easy access for reviewers.
- **TrivialFix** - This tag is used for a trivial issue, such as a typo, an
  unclear log message, or a simple code refactor that does not change existing
  behavior which does not require the creation of a separate bug or blueprint
  in Launchpad.

Make sure that the **Closes-Bug**, **Partial-Bug**, **Related-Bug**,
**blueprint**, and **Change-id** tags are at the very end of the commit
message. The Gerrit hooks will automatically put the hash at the end of the
commit message. For more information on tags and some examples of good commit
messages, refer to the GitCommitMessages_ documentation.

.. _GitCommitMessages: https://wiki.openstack.org/wiki/GitCommitMessages#Including_external_references
