---
title: "Configuration overview"
canonical: "https://support.appfire.com/space/YACC/152928570/Configuration%20overview"
format: markdown
---
> Macro (aura-html)

# Global settings

To configure global settings, click **Administration** ⚙️ at the top of the page, then click **YACC Configuration** under the *ADD-ONS *heading from the Bitbucket *Administration* page side menu.

![image](media://8d00b28d-f21f-4a71-bdc7-c2b3a31b8a84)

See [Configuration](https://appfire.atlassian.net/wiki/spaces/DEVM/pages/328433665) for settings information.

# Pre-receive hook settings

## Enable per-project settings

1. Go to your project and from the side menu click **Project settings **⚙️ > **Hooks**. *Yet Another Commit Checker *is under the *Pre Receive* heading.
2. From the *Actions* column, click the ellipsis (…) and select **Enable** from the the *Status* dropdown.
  See [Configuration](https://appfire.atlassian.net/wiki/spaces/DEVM/pages/328433665) for settings information.

## Enable per-repository settings

1. Go to your repository and from the side menu click > **Repository settings **⚙️ >** Hooks**. *Yet Another Commit Checker* is under the *Pre Receive *heading.
2. From the *Actions* column, click the ellipsis (…) and select **Enable** from the the *Status* dropdown.
  See [Configuration](https://appfire.atlassian.net/wiki/spaces/DEVM/pages/328433665) for settings information.
3. The hook can also be configured via the [Bitbucket REST API](https://appfire.atlassian.net/wiki/spaces/YACC/pages/152928544).

See [Using repository hooks](https://confluence.atlassian.com/bitbucketserver/using-repository-hooks-776639836.html#Usingrepositoryhooks-Managinghooks) for additional information.

# Merge check settings

## Enable per-project settings

1. Open your project and from the side menu select **Project settings **⚙️ > **Merge checks**. *Yet Another Commit Checker* is under the *Merge checks *heading.
2. From the *Actions* column, click the ellipsis (**…**) and select **Enable** from the the *Status* dropdown.  
See [Configuration](https://appfire.atlassian.net/wiki/spaces/DEVM/pages/328433665) for settings information.

## Enable per-repository merge check settings

1. Open your repository and from the side menu select **Repository settings **⚙️ ** **>** Merge checks**. *Yet Another Commit Checker* is under the *Merge checks* heading.
2. Click the ellipsis (**…**) and select **Enable** from the the *Status* dropdown..   
See [Configuration](https://appfire.atlassian.net/wiki/spaces/DEVM/pages/328433665) for settings information.
3. The merge check can also be configured via the [Bitbucket REST API](https://appfire.atlassian.net/wiki/spaces/YACC/pages/152928544).

See [Checks for merging pull requests](https://confluence.atlassian.com/bitbucketserver/checks-for-merging-pull-requests-776640039.html) for additional information.

# Configuration settings

YACC settings are grouped into tabs, where you can configure the different aspects of the hook. 

> ✅ **Where** are the configuration settings?
> ✅ 
> ✅ - **Global** - Go to **Administration **⚙️ > **YACC Configuration**. Choose from *Global Setting - Push Hook*, *Global Setting - Merge Check, and Advanced Options. *Use the **Push hook** or **Merge Check** toggle to enable or disable.
> ✅ - **Project: **settings work on the project level for all repositories where the YACC hook is configured to `Inherited` (default)  
> ✅ Go to **Project Settings **⚙️  > **Hooks**  
> ✅ Go to **Project Settings **⚙️  > **Merge Checks**
> ✅ - **Repository - **settings applied at the repository level override global settings. Select the repository you want to change, then from the left panel click
> ✅   - ** Repository settings **⚙️  >  **Hooks**
> ✅   - ** Repository settings  **⚙️ >  **Merge Checks**
> ✅ 
> ✅ From any location, click Learn More to open the Yet Another Commit Checker documentation.

> 📝 All YACC **Configuration** pages contain different options, depending on where you are configuring the settings ([global setting push hook][global setting merge check][Project Hooks][project merge checks] [repository hook]or [repository merge check]).

![image](media://12a5c2f5-cb43-48bd-a49c-66bee5c160d9)

## Configuration

![image](media://81076cfe-f5cb-41c1-ba99-c4de3b896110)

### General Configuration

| **Feature** | **Feature Locations** | **Description** |
| --- | --- | --- |
| **Overriding global configuration ** | - [global setting push hook]
- [global setting merge check] | Bitbucket administrator defines who can override hook settings defined on a global level:<br>- **Global configuration only**: Use global configuration for all enabled Project and Repository level hooks and ignore existing settings.
- **Selected group admins**: Only selected user groups can change Project and Repository hook settings. All previously configured hooks remain unchanged.
- **All project/repo admins** (default): Global settings can be overridden by users with the necessary permissions.<br>> 📝 Limiting configuration changes does not modify or remove existing hooks configuration so that you can switch this option with no risk to existing configurations.
> 📝 
> 📝 This option can be changed for **Pre-receive hooks** and **Merge checks** independently. |
| **Scan All Commits in Pull Request ** | - [global setting push hook]
- [Project hooks]
- [repository hooks] | When enabled, the pre-receive hook scans all commits in a Pull Request on a merge attempt, even if they have been scanned before. |
| **Enable dry run mode ** | - [global setting push hook]
- [Project hooks]
- [repository hooks] | When enabled, the pre-receive hook displays an error but does not reject the push action. |
| **Skip checks on cross-repository pull requests** | - [global setting push hook]
- [Project hooks]
- [repository hooks] | When enabled, YACC skips the checks for cross repository request merges. Normally a check is performed on one repository, and then on the other. With this feature enabled, the second check is removed.<br>> ℹ️ Enable this option if:
> ℹ️ 
> ℹ️ - You are upgrading from 1.x and want to mimic the method YACC originally used when performing cross checks for repository request merges.
> ℹ️ - Multiple repositories are involved in your workflow and you want to control when the push hook is invoked. With this option enabled, the push hook is not invoked as part of the merging process.
> ℹ️ - A push hook is invoked any time a commit is introduced into a new repository. If your workflow includes forking a repository, then the push hook can be triggered both when sent to the forked repository and after merging the pull request. With this option enabled, the hook is only invoked before the pull request process has started.
> ℹ️ - The pull request target and source repositories are different, you're using Jira ticket validation as part of your YACC config which is set to allow a Jira ticket in a context in which the commit is not in a PR, but to block a Jira ticket when the commit is in the PR process (for example with automated Jira transitions). Use this option to avoid blocking valid commits during the merge. |

## Commits

![image](media://1d17d3b0-7924-4435-af76-210a1be70679)

### Commit Requirements

| **Feature** | **Feature Locations** | **Description** |
| --- | --- | --- |
| **Require Committer Matches Valid User** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [repository hooks]
- [repository merge check] | When enabled, YACC checks that the committer email matches any valid Bitbucket Server user. |
| **Require Matching Committer Email** | - [global setting push hook]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When enabled, the committer email must match the email of a valid Bitbucket Server user. |
| **Require Matching Committer Name** | - [global setting push hook]
- [Project hooks]
- [repository hooks] | When enabled, the committer name must match the name of the Bitbucket Server user. |
| **Committer Email Regex** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When a regex is present, the committer email must match the regex. |
| **Commit Message Regex** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When a regex is present, the commit message must match the regex. Leading and trailing whitespace are ignored.  
**Example**  
`[A-Z0-9\-]+: .*`<br>requires the commit message to be in the form of:  
`PROJ-123: added new feature xyz`<br>- **Multi-line Commit Message Regex** - Multi-line commit messages can be matched by including newlines into the regex (like `(.|\n)*`), or by enabling `Pattern.DOTALL` by starting your regex with `(?s)`.<br>See [Regex is not working ](https://appfire.atlassian.net/wiki/spaces/YACC/pages/152928460)for debugging details. |

## Jira Issues

![image](media://b2ddd337-4843-4f90-b66b-c83b6b0ecd8e)

The **Jira Issues** tab allows you to set how Bitbucket responds to Jira issues in commit messages. 

> ⚠️ To set Jira Issue Requirements through YACC, you must also configure a Jira [Application Link](https://confluence.atlassian.com/bitbucketserver/linking-bitbucket-server-with-jira-776640408.html) in Bitbucket Server.

### Jira Issue Requirements

| **Feature** | **Feature Location** | **Description** |
| --- | --- | --- |
| **Jira App Link ** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | Jira application links are used to:<br>- Check Jira issues, the building blocks of a Jira project and can be anything from bugs to stories
- Validate issue keys, used as identifiers for specific work items in a Jira project<br>When you have multiple application links to your Jira instances, the YACC Jira App Link feature allows you to determine which application links it uses to validate issue keys.<br>The App Link feature has three options:<br>- **All** - All available Jira application links are used to validate issue keys. Once an issue key is found, validation stops and returns issue data from the first matching Jira instance
- **Primary** - The Jira application link configured as Primary at the time of commit is used to validate issue keys
- **Select Links - **Only the selected Jira application links are used to validate issue keys<br>> 📝 To create a Jira application link, see [Link Bitbucket with Jira](https://confluence.atlassian.com/bitbucketserver/linking-bitbucket-server-with-jira-776640408.html). |
| **Require Valid Jira Issue(s)** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When enabled, commit messages must contain valid Jira issue IDs. Jira issue IDs are defined as any item that matches the regex `[A-Z][A-Z_0-9]+-[0-9]+`.<br>This can result in false positives if commit messages contain strings that look like Jira issues. For example, `UTF-8`. Enable `Ignore Unknown Jira Project Keys` to tell YACC to ignore items that do not contain a valid Jira Project key. |
| **Require Matching Jira Issue In Branch Name ** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When enabled, issue keys in the commit message are checked against the branch name. The commit is rejected if the branch name does not contain an issue key. The default branch (typically `master`) is automatically excluded.  
**Example**  
Sample commit message `PROJ-123 Clean up leftover interfaces from PROJ-3`<br>- Allowed branch names: `bugfix/PROJ-123`, `PROJ-123-cleanup`, `PROJ-3-update`
- Blocked branch names: `fixes`, `feature/PROJ-12`<br>> 📝 Enable the **Require Valid Jira Issue(s)** option first to use this feature. |
| **Ignore Unknown Jira Project Keys** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When enabled, any issue-like items that do not contain a valid Jira project key (for example, `UTF-8`) in the commit messages are ignored. |
| **Issue JQL Matcher** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When a JQL query is present, detected Jira issues must match this query.  
**Example**  
`assignee is not empty and status="in progress" and project=PROJ` requires Jira issues be assigned, `in progress,` and from project `PROJ`.<br>> 📝 Due to Atlassian's indexing process, updates made in Jira items within the last 25 minutes might not be visible for YACC JQL Matcher. However, in most cases, over 99% of issues update and appear within seconds. This applies to Jira Cloud only.
> 📝 
> 📝 For more details, refer to [Atlassian’s official changelog on API deprecations](https://developer.atlassian.com/changelog/#CHANGE-2046). |

### Additional topics

See [Jira Advanced Searching](https://confluence.atlassian.com/display/JIRA/Advanced+Searching) for documentation regarding writing and testing JQL queries.

See [Jira authentication failed message ](https://appfire.atlassian.net/wiki/spaces/YACC/pages/152928456)article in the [Troubleshooting](https://appfire.atlassian.net/wiki/spaces/YACC/pages/152928582) section.

## Branches

The **Branches** tab is used to set branch naming requirements.

![image](media://22eab606-c04a-4905-b350-015b6219be55)

### Branch Requirements

| **Feature** | **Feature Locations** | **Description** |
| --- | --- | --- |
| **Branch Name Regex** | - [global setting push hook]
- [Project hooks]
- [repository hooks] | When present, only branches with names that match this regex can be created. This also affects branches created within the Bitbucket Server UI. This only affects new branches and branches created within the Bitbucket UI; existing branches that do not match this regex are allowed.  
**Example**  
`master|(?:(?:bugfix|hotfix|feature)/[A-Z]+-\d+-.+)` branch names must follow the Bitbucket Server Branching Model naming convention.<br>> 📝 Leading and trailing whitespace are ignored. |

## Exclusions

![image](media://fbb395bf-d587-4160-9704-3fba182ff978)

### Exclude 

| **Feature** | **Feature Locations** | **Description** |
| --- | --- | --- |
| **Exclude Personal Repositories ** | - [global setting push hook]
- [global setting merge check] | When enabled, commits and PRs to personal repositories are not included in checks by YACC. Excluding personal repos allows your organization to define additional rules on the global level without encountering exceptions for repos that are not required to adhere to those rules. |
| **Exclude Commits From Bitbucket UI** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When enabled, YACC skips validation of changes made through the Bitbucket UI. This includes edits from the [built-in web editor](https://confluence.atlassian.com/bitbucketserver/bitbucket-server-4-13-release-notes-867365635.html) and the [Apply suggestion feature](https://confluence.atlassian.com/bitbucketserver/bitbucket-server-6-6-release-notes-975023322.html#BitbucketServer6.6releasenotes-Suggestchangesdirectlyinpullrequests). The latter does not display a rejection message and does not allow repeat attempts even after correcting the commit message ([Bitbucket bug report](https://jira.atlassian.com/browse/BSERV-12528)), so it may be useful not to validate such changes. |
| **Exclude Merge Commits** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When enabled, merge commits are excluded from commit requirements. This includes merge commits pushed through the command line and merges made via the Pull Request UI. |
| #### Exclude Commit by Regex | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When present, commits are excluded from all requirements if part of the commit message matches this regex.  
**Example**  
`^Revert \"|#skipchecks`<br>> 📝 Leading and trailing whitespace are ignored. |
| **Exclude Branch by Regex** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When present, commits on branches that match the specified regex are excluded from all checks. Branch regex exclusion is applied before the **Branch Name Regex** option; i.e., branch creation is never blocked when a branch matches the **Exclude Branch **pattern.  
**Example**  
`experimental/.*`<br>> 📝 Leading and trailing whitespace are ignored. |
| **Exclude Service User Commits** | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | When enabled, commits from service users (i.e., using [SSH Access Keys](https://confluence.atlassian.com/bitbucketserver/ssh-access-keys-for-system-use-776639781.html)) are excluded from commit requirements. |
| **Exclude User**<br>**Exclude Group** | - [global setting push hook][global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | Select from the dropdown lists of Bitbucket User Names or Groups. Commits from these users or members of these groups are excluded from commit requirements. |

## Error Messages

![image](media://2cfec403-c2b2-4079-ad5b-0330734f15dd)

### Error Message Customization

| **Feature** | **Feature Locations** | **Description** |
| --- | --- | --- |
| **Error Messages**<br>- Header
- Committer Email Error
- Committer Email Regex Error
- Committer Name Error
- Commit Regex Error
- Issue JQL Matcher Error
- No Jira Issue Error
- Footer | - [global setting push hook]
- [global setting merge check]
- [Project hooks]
- [Project merge checks]
- [repository hooks]
- [repository merge check] | The **Error Messages** tab allows you to customize various messages produced by the YACC hook. For each entry, you can add a customized error message that replaces the default error message. |

#### Example message

To add a customized error message to help ensure internal policies were being followed, a heading message could look like this:

`Your commit message does not conform to organizational requirements. Contact your Bitbucket repository administrator for details`

Add your message to the appropriate field; in this case, the **Header** field and click **Enable**.

![image](media://c07dcad8-97aa-411d-8e6b-30fa9d4c68bd)

When triggered, Bitbucket displays the custom error message:

![image](media://0c2eb3a4-d982-45ed-b5df-2621f4725199)

## Advanced Options

![yaac-jira-auth-user.png](media://b162625c-2323-4865-b0ee-72e9ac2826e8)

> ℹ️ Advanced options are configurations applied globally to all hooks (pre receive/merge hooks) and cannot be overridden in project/repo settings.

- **Configuration**
  - **Jira Authentication User **- By default, YACC uses the user account associated with the committer to make a connection to Jira to validate issues, run JQL queries, etc. This can cause authentication issues when the user pushing the code does not have read access to the corresponding Jira project. Examples include commits from continuous integration or commits made through SSH access keys.  
The specified username is used for all Jira queries if this parameter is configured. There must be a valid Bitbucket username associated with a Jira account.  
The *Jira Authentication User* parameter can only be specified in the global settings. The setting is shared between the pre-receive hook and the merge check.
- **Jira Issues**
  - **Allow Lower Case Jira Issue Keys** - When enabled, the *Require Valid Jira Issue(s)* configuration uses case insensitive matching to find Jira tickets.

Click **Save Advanced Options** after any changes.