Enforce PR Semantic Title Names
Automatically enforce PR naming conventions; this example expects the format: <type>(<scope>): <short summary>
Configuration Description
Conditions (all must be true):
- The PR fails to follow a predefined semantic release format:
Automation Actions:
- Request changes and post a comment explaining why.
Enforce PR Semantic Title Names
# -*- mode: yaml -*-
manifest:
version: 1.0
automations:
enforce_pr_title:
if:
- {{ pr.title | match(regex=titlePolicy.titleRegex) | nope }}
run:
- action: request-changes@v1
args:
comment: |
All PRs must be titled according to our semantic naming policy: `<type>(<scope>): <short summary>`
Type must be one of the following:
* build
* ci
* docs
* feature
* fix
Scope must be one of the following:
* common
* core
* elements
* forms
* http
titlePolicy:
titleRegex: r/\b(build|ci|docs|feature|fix)\b\s*\((common|core|elements|forms|http)\):\s*\w+.*/
Additional Resources
gitStream is a workflow automation tool that enables you to use YAML configuration files to optimize your code review process. Add context to PRs, find code experts for reviews, and automate the merge process to maximize developer productivity.
Learn More about how gitStream Works.
Related Automations:
- Require changelog updates for PRs to specific branches
- Flag the use of deprecated APIs, functions, or other components.
- Restrict portions of your code base to authorized teams only.
- Require changes when PRs include !important tags in CSS files
More Automations can be found on the Automation Library and Integrations pages.