<commit_before>ASP.Net MVC utilities and helpers for Slack
==============
You have a slack team already set up and want to integrate parts of your ASP.NET MVC application into it so that certain triggers result in Slack posts. These integrations will help you with that.

### Requirements:

1. You must first enable the Webhooks integration for your Slack account to get the token. You can enable it here: https://slack.com/services/new/incoming-webhook
2. This depends on Slack.Webhooks

<!-- NOT YET, DON'T KNOW HOW TO CREATE A NUGET PACKAGE YET
Download:

Package is hosted on [Nuget](https://www.nuget.org/packages/aspnet-mvc-slack/) and can be installed from the package manager:

```
PM> Install-Package aspnet-mvc-slack
```
-->
## WebHookErrorReportFilter
An MVC IExceptionFilter implementation that will post a captured exception to a slack channel.  In order to be effective, exceptions must be allowed to bubble up to the top of your application's ASP.NET MVC process stack so that they are handled by the MVC request pipeline. This is typical for applications that use a common exception handling strategy such as the MVC ```HandleErrorAttribute``` or ASP.NET custom errors behavior.

A couple of import notes:
* This filter only reports the exception. It DOES NOT mark it as handled.
* By default, this filter doesn't care if the exception has already been handled. If you want to ignore previously handled exceptions, set ```IgnoreHandled = true```.

### Example: Global app reporting
Add something like this to your global application configuration (global.asax.xx | App_Start\FilterConfig.xx | etc.)
```csharp
var slackReporter =
	new WebHookErrorReportFilter(
		new WebHookOptions("{my slack team webhook url}")
		{
			ChannelName = '{#channel|@username}", // Optional; Channel/user to post TO
			UserName = "{user name}" // Optional; user to post AS
		}
	)
	{
		IgnoreHandled = true
	};
filters.Add(slackReporter);
```<commit_msg>Fix typo is docs.<commit_after>ASP.Net MVC utilities and helpers for Slack
==============
You have a slack team already set up and want to integrate parts of your ASP.NET MVC application into it so that certain triggers result in Slack posts. These integrations will help you with that.

### Requirements:

1. You must first enable the Webhooks integration for your Slack account to get the token. You can enable it here: https://slack.com/services/new/incoming-webhook
2. This depends on Slack.Webhooks

<!-- NOT YET, DON'T KNOW HOW TO CREATE A NUGET PACKAGE YET
Download:

Package is hosted on [Nuget](https://www.nuget.org/packages/aspnet-mvc-slack/) and can be installed from the package manager:

```
PM> Install-Package aspnet-mvc-slack
```
-->
## WebHookErrorReportFilter
An MVC IExceptionFilter implementation that will post a captured exception to a slack channel.  In order to be effective, exceptions must be allowed to bubble up to the top of your application's ASP.NET MVC process stack so that they are handled by the MVC request pipeline. This is typical for applications that use a common exception handling strategy such as the MVC ```HandleErrorAttribute``` or ASP.NET custom errors behavior.

A couple of import notes:
* This filter only reports the exception. It DOES NOT mark it as handled.
* By default, this filter doesn't care if the exception has already been handled. If you want to ignore previously handled exceptions, set ```IgnoreHandled = true```.

### Example: Global app reporting
Add something like this to your global application configuration (global.asax.xx | App_Start\FilterConfig.xx | etc.)
```csharp
var slackReporter =
	new WebHookErrorReportFilter(
		new WebHookOptions("{my slack team webhook url}")
		{
			ChannelName = "{#channel|@username}", // Optional; Channel/user to post TO
			UserName = "{user name}" // Optional; user to post AS
		}
	)
	{
		IgnoreHandled = true
	};
filters.Add(slackReporter);
```
{'fraction_non_alphanumeric': 0.08440225756798359, 'fraction_numerical': 0.001026167265264238, 'mean_word_length': 4.453146853146853, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '846963', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1028, 'n_words': 511}