Class: Lita::Handlers::Teamcity
- Inherits:
-
Handler
- Object
- Handler
- Lita::Handlers::Teamcity
- Defined in:
- lib/lita/handlers/teamcity.rb
Instance Method Summary collapse
Instance Method Details
#build(response) ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/lita/handlers/teamcity.rb', line 33 def build(response) Lita.logger.debug(response.matches) Lita.logger.debug(response.args) Lita.logger.debug(response.room.) = { comment: {text: "Triggered by #{response.user.name} in room #{response.room.name} via chatbot"}, } [:branchName] = response.args[2] if response.args[2] result = client.create_buildqueue(response.args[1], ) Lita.logger.debug(result) = { title: 'Done!', text: render_template('build', build: result), } reply(response, ) end |
#builds(response) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/lita/handlers/teamcity.rb', line 23 def builds(response) records = client.builds Lita.logger.debug(records) = { title: 'Builds', text: render_template('builds', builds: records), } reply(response, ) end |
#projects(response) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/lita/handlers/teamcity.rb', line 14 def projects(response) = { title: 'Projects', text: render_template('projects', projects: client.projects), } reply(response, ) end |