Module: Brainiac::Plugins::Github::Notifications
- Defined in:
- lib/brainiac/plugins/github/notifications.rb
Class Method Summary collapse
- .send_deploy(project_key, closed_cards) ⇒ Object
- .send_uat_deploy(project_key) ⇒ Object
- .send_workflow_failure(project_key, workflow_name, run_url) ⇒ Object
Class Method Details
.send_deploy(project_key, closed_cards) ⇒ Object
8 9 10 11 12 |
# File 'lib/brainiac/plugins/github/notifications.rb', line 8 def send_deploy(project_key, closed_cards) card_lines = closed_cards.map { |c| "• [##{c[:number]} — #{c[:title]}](#{c[:url]})" }.join("\n") = "🚀 **#{project_key.capitalize}** deployed to production\nClosed UAT cards:\n#{card_lines}" send_notification(:deploy, , metadata_project: project_key) end |
.send_uat_deploy(project_key) ⇒ Object
14 15 16 17 |
# File 'lib/brainiac/plugins/github/notifications.rb', line 14 def send_uat_deploy(project_key) = "✅ **#{project_key.capitalize}** deployed to UAT successfully" send_notification(:deploy, , metadata_project: project_key) end |
.send_workflow_failure(project_key, workflow_name, run_url) ⇒ Object
19 20 21 22 |
# File 'lib/brainiac/plugins/github/notifications.rb', line 19 def send_workflow_failure(project_key, workflow_name, run_url) = "❌ **#{project_key.capitalize}** — #{workflow_name} failed\n[View run](#{run_url})" send_notification(:ci_failure, , metadata_project: project_key) end |