lita-gerrit is a handler for Lita that allows interaction with Gerrit code review tool.
It allows to fetch Gerrit changes details from the chat and listens for hook events on HTTP interface.
It depends on HTTParty because Gerrit uses HTTP digest authentication, which is not supported by Lita's built-in HTTP client, Faraday.
Add lita-gerrit to your Lita instance's Gemfile:
gem "lita-gerrit"
url
(String) - Gerrit service URLusername
(String) - Username for REST APIpassword
(String) - Password for REST API
Lita.configure do |config|
config.handlers.gerrit.url = "https://gerrit.example.com"
config.handlers.gerrit.username = "foo"
config.handlers.gerrit.password = "bar"
end
lita > gerrit 42
gerrit: Display debug informations with correct log level by John Doe in chef. http://gerrit.example.com/42
(gerrit: <commit message> by <author> in <project>. <url>)
lita-gerrit listens for events triggered by Gerrit hooks. An example hook is provided in contrib directory.
Currently only these hooks are implemented:
- patchset_created
- comment_added
- change_merged
See list of supported hooks in Gerrit doc