Post notification in a Microsoft Teams channel via Incoming Webhook Connector
Just add the HTTParty gem to your Gemfile
:
gem 'httparty'
To configure it, you need to set the webhook_url
option.
If you are using GitLab for issue tracking, you can specify git_url
as follows to add a Create issue button in your notification.
By default this will use your Rails application name to match the git repository. If yours differs, you can specify app_name
.
By that same notion, you may also set a jira_url
to get a button that will send you to the New Issue screen in Jira.
Rails.application.config.middleware.use ExceptionNotification::Rack,
email: {
email_prefix: "[PREFIX] ",
sender_address: %{"notifier" <[email protected]>},
exception_recipients: %w{[email protected]}
},
teams: {
webhook_url: 'https://outlook.office.com/webhook/your-guid/IncomingWebhook/team-guid',
git_url: 'https://your-gitlab.com/Group/Project',
jira_url: 'https://your-jira.com'
}
String, required
The Incoming WebHook URL on Teams.
String, optional
Url of your gitlab or github with your organisation name for issue creation link (Eg: github.com/aschen
). Defaults to nil and doesn't add link to the notification.
String, optional
Url of your Jira instance, adds button for Create Issue screen. Defaults to nil and doesn't add a button to the card.
String, optional
Your application name used for git issue creation link. Defaults to Rails.application.class.parent_name.underscore
.