<commit_before># Introduction
An Atlassian Stash plugin to check on various file attributes, like size, name.

# Installation
The plugin is available in the [Atlassian Marketplace](https://marketplace.atlassian.com/plugins/org.christiangalsterer.stash-filehooks-plugin) and can be installed directly in Stash using the Universal Plugin Manager (UPM), see [here](https://marketplace.atlassian.com/plugins/org.christiangalsterer.stash-filehooks-plugin#tabs-installation) for details.

# Configuration
## File Size Hook
In order to configure the hook go to your repository and select **Settings** -> **Hooks** -> **File Size Hook**.
The following example rejects all files larger then 1MB (1048576 bytes).

![File Size Hook Configuration](screenshots/file-hooks-plugin-filesize-hook-configuration.png)

## File Name Hook
In order to configure the hook go to your repository and select **Settings** -> **Hooks** -> **File Name Hook**.
The following example rejects all files matching the pattern **readme.md**

![File Size Hook Configuration](screenshots/file-hooks-plugin-filename-hook-configuration.png)

# Releases

1.1.0 (2015-03-15)

* File Size Hook:
  * Allows now to specify up to 5 different pattern and size combinations.
  * Fixes: [Plugin crashes when pushing a branch delete #2](https://github.com/christiangalsterer/stash-filehooks-plugin/issues/2)
* File Name Hook: New hook which allows to check on the file name and reject pushes if files matches the specified pattern

1.0.0 (2015-01-15)

* Reject commits containing files which exceed a configurable file size. Files can be identified by regular expressions.

# Roadmap


# License

```
   Copyright 2015 <NAME>

   Licensed under the Apache License, Version 2.0 (the "License");<commit_msg>Release 1.1.0<commit_after># Introduction
An Atlassian Stash plugin to check on various file attributes, like size, name.

![File Size Hook Configuration](screenshots/file-hooks-plugin-comfiguration.png)

# Installation
The plugin is available in the [Atlassian Marketplace](https://marketplace.atlassian.com/plugins/org.christiangalsterer.stash-filehooks-plugin) and can be installed directly in Stash using the Universal Plugin Manager (UPM), see [here](https://marketplace.atlassian.com/plugins/org.christiangalsterer.stash-filehooks-plugin#tabs-installation) for details.

# Configuration
## File Size Hook
In order to configure the hook go to your repository and select **Settings** -> **Hooks** -> **File Size Hook**.
The following example rejects all files larger then 1MB (1048576 bytes).

![File Size Hook Configuration](screenshots/file-hooks-plugin-filesize-hook-configuration.png)

## File Name Hook
In order to configure the hook go to your repository and select **Settings** -> **Hooks** -> **File Name Hook**.
The following example rejects all files matching the pattern **readme.md**

![File Size Hook Configuration](screenshots/file-hooks-plugin-filename-hook-configuration.png)

# Releases

1.1.0 (2015-03-15)

* File Size Hook:
  * Allows now to specify up to 5 different pattern and size combinations.
  * Fixes: [Plugin crashes when pushing a branch delete #2](https://github.com/christiangalsterer/stash-filehooks-plugin/issues/2)
* File Name Hook:
  * New hook which allows to check on the file name and reject pushes if files matches the specified pattern

1.0.0 (2015-01-15)

* Reject commits containing files which exceed a configurable file size. Files can be identified by regular expressions.

# Roadmap


# License

```
   Copyright 2015 <NAME>

   Licensed under the Apache License, Version 2.0 (the "License");
{'fraction_non_alphanumeric': 0.09699833240689272, 'fraction_numerical': 0.022512506948304613, 'mean_word_length': 4.833063209076175, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3967298', 'n_tokens_mistral': 1061, 'n_tokens_neox': 993, 'n_words': 390}