Currently our default outlier detection is set-up to mark any commit over one thousand lines of code as an outlier. With Advanced outlier detection you can tailor your outlier commits to your organizational needs. Below will instruct you how to use these settings. Also see our help doc on how to manually mark a commit as an outlier.
Who can use this?
You will need specific permissions to adjust the Advanced outlier detection settings.
To provide permissions:
- Go to the top navigation bar and click Settings. Under User Management in the left navigation, click Users.
- Locate the User you want to have access. Open their User detail page. Under Access tab click on Administration.
- Give them access to both manage configurations and manage outlier commits and then click Save.Manage configurations gives the User access Advanced Outlier Detection Settings plus any general report configurations. Manage commits gives the User access to manually mark commits as outliers in the Work log report.
- After clicking Save Changes,a pop-up will appear asking to confirm your changes. Click Yes, update user's view access.
Next, go to Report Settings in the left navigation and click Configurations. Here, you can customize your outlier detection. You can use one or a combination of the three to set up your outlier rules.
- Impact - dictate which commits are marked as an outlier based on the raw Impact score or by a percentage range of all impact scores of commits that we’ve processed for your organization (0-25%).
- Size - dictate which commits are marked as an outlier based on the size (number of LoC) of the commit. Here you can also ignore whitespace, comments or lines with a certain number of characters.
- Regular Expressions - dictate which commits are marked as an outlier using regular expressions.
You can determine which commits are outliers by setting filters for Impact scores.
You can ignore commits by impact percentage. Input a percentage based on Impact score to determine which commits to include as an outlier. In the example, any commit that falls into the highest 20% Impact score or the lowest 3% Impact score of your processed commits will be considered an outlier.
Ignore commits by raw Impact score. In this setting you can ignore commits by Impact score. In this example, any commit that has an impact score above 500 or below 10 will be considered an outlier.
You can determine which commits are outliers by the size of the commit.
The minimum number of lines needed in order to be considered an outlier. In the example below any commit that has less than 3 lines of code will be marked as an outlier.
You can also determine what lines to count when considering a commit for an outlier. You can ignore whitespace, ignore comments, and ignore lines with with specified non-whitespace characters.
Ignoring whitespace eliminates any lines that do not contain any characters. Ignoring comments eliminates any lines that contain comments. Ignoring lines that contain less than a designated number of non-whitespace characters. This will include lines without any characters.
The maximum number of lines needed in order to be considered an outlier. In the example above, any commit that has 1000 or more lines of code will be marked as an outlier.
You can determine which commits are outliers by using regular expressions to match on the User associated with the commit or on the commit message. You can create as many rules here as you need.
To create a rule:
- Toggle Enable
- Click Create Rule.
- Type in your regular expression and choose whether to "match on user" and "match on message" or just one.
Testing regular expressions
If you have commits that you know should be marked as an outlier and should be included within your regular expression your can test you regular expression to determine which commits it will include. Click Test a Regular Expression.
A modal will appear where you need to type in the following:
- Your regular expression.
- Commit SHA(s) to test against specific commits- you can put in the entire SHA number or just the first 6 characters.
- Indicate whether you want to “Match on user” or “Match on message”. Matches will be considered outliers based on your regular expression. Does Not Match will remain a regular commit within your reports
Click Load commits and show matches. You will now see the 3 commits listed below and if they match your regular expression.
If you do not have commits you want to test your regular expression with, leave Commits to test blank to load your 100 most recent commits.
If you turn off your Advanced outlier detection settings, you do not need to do anything. Your organization will return to the default outlier settings of any commit larger than 1000 lines will be considered an outlier.
If you turn off your outlier settings, it will also return any manually marked committo its original state.
Advanced outlier detection use cases
Below are a few use cases, and the necessary settings to implement them in your own account.
Default outlier detection (commits larger than 1000 lines) AND manually marked commits
If you would like to keep the current default outlier plus be able to manually mark commits as outliers, use the following settings:
No automatic filters BUT manually marked commits
If you would like to include all of your commits except the ones you manually mark as outliers, use the following settings.
If you need help, please email Support (opens email form) for 24/7 assistance.