gitStream Automation Library
This library of gitStream examples is meant to serve as a starting point for your automation. We encourage you to customize them for your project and organization.
How to use these examples.
These examples are all complete gitStream configuration files that you can download directly via the buttons below the examples and upload to the
.cm directory of your repo. Alternatively, you can copy and paste the individual automations, but make sure you include all required declarations and any related custom expressions from the configurations to ensure they work properly.
Most Popular Automations
- Approve safe changes - Approve documentation, formatting changes, and tests.
- Provide estimated time to review - Label all PRs with an estimated number of minutes it would take someone to review.
- Explain Code Experts - Post a comment that recommends reviewers based on their expertise.
- Review sensitive files - Define a custom list of files and directories that trigger additional reviews.
- Additional review for large PRs - Require additional reviewers for complex PRs.
Improve PR Efficiency
- Approve tests - Label and approve PRs that only include tests.
- Approve Tiny Changes - Approve single-line changes to a single file.
- Approve team by directory - Approve PRs from specific teams to specified directories and files.
Add PR Context With Labels and Comments
- Label PRs without tests - Apply a
missing-testslabel to any PRs that lack updates to tests.
- Label percent new code - Post a comment that indicates what percentage of the PR contains new code.
- Label deleted files - Label PRs that delete files.
- Label missing project tracker - Flag PRs that are missing a reference to an associated project tracking resource.
- Automatic project tracking links - Automatically post PR comments that link to the associated project tracking resource (Jira, Shortcut, Azure Boards, and more).
Improve PR Quality
- Assign code experts - Identify the best experts for a PR and assign them to review.
- Assign reviewers by directory - Automatically assign code reviewers based on directory structure.
- Assign reviewers for knowledge share - Automatically assign code reviewers based on contributions between specified thresholds.
- Change missing Lambda field - Request changes if a PR creates a new Lambda function that lacks a required field.
- Close wrong team by directory - Close PRs to a specified directory if the PR author is not on an approved team.
- Enforce Semantic PR Titles - Enforce PR naming conventions.
- Enforce Changelog Updates - Require changelog updates for PRs that meet specific criteria.
- Request screenshot - Request a screenshot in the PR description if none exist.
- Welcome newcomer - Post a welcome message when someone makes their first PR to a repo, and provide context to help them know what's next.
- Remove TODO comments - Detect TODO comments in PRs and ask the author to remove or fix them.
Security and Policy Compliance
These examples help you follow your team's security best practices.
- Change deprecated components - Request changes when a PR includes one or more deprecated components.
- Enforce copyright headers - Enforce the use of copyright headers when publishing open source code.
GitHub / GitLab
These examples provide useful components to use in other automations. These aren't intended to be used on their own; instead they act as a reference point for improving other automations.
- Colors custom expression - A custom expression that implements all of GitHub's default label colors in a custom expression.
- CM File Header - A header to copy/paste to the top of your CM files to help yourself, and others, understand the purpose of the file.
Contribute Your Idea
Have a great idea for an automation that should be included in this library?
Submit your configuration on GitHub. We'll recognize your contribution publicly (if you want) and might even send you some special swag for your contribution.