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. If you're looking for examples of how to integrate gitStream with other tools, take a look at the integrations page
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.
Improve PR Efficiency
These examples focus on auto-approve policies and providing detailed context via labels.
Auto-Approve Merges
- Approve safe changes - Approve documentation, formatting changes, and tests.
- Approve tests - Label and approve PRs that only include tests.
- Approve Tiny Changes - Approve single-line changes to a single file.
- Approve JavaScript formatting - Approve non-functional changes to JavaScript files
- Approve JavaScript log output - Approve changes to JavaScript files that only affect log output.
- Approve Python formatting - Approve non-functional changes to Python files
- Approve Python log output - Approve changes to Python files that only affect log output.
- Approve team by directory - Approve PRs from specific teams to specified directories and files .
Add PR Context With Labels
- Provide estimated time to review - Label all PRs with an estimated number of minutes it would take someone to review.
- Label PRs without tests - Apply a
missing-tests
label to any PRs that lack updates to tests. - 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.
- 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.
- Request screenshot - Request a screenshot in the PR description if none exist.
Improve PR Quality
These examples help you identify code experts and assign reviewers based on the contents of the PR.
Merge Routing
- Additional review for large PRs - Require additional reviewers for complex PRs.
- 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.
- 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.
Security Policy Compliance
These examples help you follow your team's security best practices.
- Review sensitive files - Define a custom list of files and directories that trigger additional reviews.
- Change deprecated components - Request changes when a PR includes one or more deprecated components.
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.