...
Special Tags for Commit Messages
JIRA
...
Gerrit
Gerrit supports auto-closing of issues and other features via Smart Commits. A smart commit consists of a reference to an issue, followed by some action to take:
No Format |
---|
ASTERISK-1234 #action |
and commenting of uploaded reviews by referencing an issue.
Note |
---|
If you do not reference an issue when you submit a review the review tool will remind you that you should. While it is not currently required to include an issue in the commit message it is highly preferred. |
Issue Referencing
To have a commit noted in an issue and to also close the issue, simply referencing the issue is sufficient:
...
Note that this can be done anywhere in the text of the issue.
Note |
---|
The only useful action is the #close action. No other actions should be used. |
Issue Closing
To have a commit be noted in an issue and be automatically closed, use a tag of the form:
No Format |
---|
ASTERISK-1234 #close |
Solution Attribution
To properly attribute a patch use the following notation:
No Format |
---|
ASTERISK-1234
#close
patches:
fix_bug_1234.diff submitted by SomeDeveloper (license 5678) |
If multiple patches are being applied, provide a comment for each author:
No Format |
---|
ASTERISK-1234
#close
patches:
fix_bug_1234.diff submitted by SomeDeveloper (license 5678)
tweak_1234.diff submitted by AnotherDeveloper (license 8765) |
...
All of this information can be chained together:
No Format |
---|
ASTERISK-1234
#close
Reported by: SomeGuy
Tested by: SomeGuy
patches:
fix_bug_1234.diff submitted by SomeDeveloper (license 5678)
|
...
If you have a very simple commit that affects or and closes multiple issues you can follow this example format:
No Format |
---|
ASTERISK-1234 #close Reported by: SomeGuy ASTERISK-4567 #close Reported by: AnotherGuy |
Example Commit Message
...
No Format |
---|
core/db: Fix DBDelTree error codes for AMI, CLI and AGI.
The AMI DBDelTree command will return Success/Key tree deleted successfully even
if the given key does not exist. The CLI command 'database deltree' had a
similar problem, but was saved because it actually responded with '0 database
entries removed'. AGI had a slightly different error, where it would return
success if the database was unavailable.
This came from confusion about the ast_db_deltree retval, which is -1 in the
event of a database error, or number of entries deleted (including 0 for
deleting nothing).
* Changed some poorly named res variables to num_deleted
* Specified specific errors when calling ast_db_deltree (database unavailable
vs. entry not found vs. success)
* Fixed similar bug in AGI database deltree, where 'Database unavailable'
results in successful result
ASTERISK-967
#close
Reported by: John Bigelow
Tested by: John Bigelow
|