- Defined in:
Ensures a Gerrit Change-Id line is included in the commit message.
It may seem odd to do this here instead of in a prepare-commit-msg hook, but the reality is that if you want to ensure the Change-Id is included then you need to do it in a commit-msg hook. This is because the user could still edit the message after a prepare-commit-msg hook was run.
Constant Summary collapse
- SCRIPT_LOCATION =
Instance Attribute Summary
Attributes inherited from
Instance Method Summary collapse
Methods inherited from
, , , , , , , , , , , , , , , , , , ,
This class inherits a constructor from
Instance Method Details
#run ⇒ Object
13 14 15 16 17 18
# File 'lib/overcommit/hook/commit_msg/gerrit_change_id.rb', line 13 def run result = execute(['sh', , ]) return :pass if result.success? [:fail, result.stdout] end