Approve Python Formatting Changes
Approve PRs that only contain formatting changes to Python files.
Configuration Description
Conditions (all must be true):
- All of the files end in
.py
. - All changes are non-functional
Automation Actions:
- Approve the PR
- Apply a
code-formatting
label. - Post a comment that explains the automation.
Approve Python Formatting Changes
# -*- mode: yaml -*-
manifest:
version: 1.0
automations:
approve_python_formatting:
if:
- {{ files | extensions | match(list=['py']) | every }}
- {{ source.diff.files | isFormattingChange }}
run:
- action: approve@v1
- action: add-label@v1
args:
label: code-formatting
- action: add-comment@v1
args:
comment: |
This PR only contains formatting changes and has been approved.
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:
- Automatically approve changes to docs, tests, and other safe assets.
- Approve low-risk PRs from trusted teams.
- Approve Tiny Changes
- Approve JSDoc or Javadoc changes.
- Approve and Merge Dependabot PRs
More Automations can be found on the Automation Library and Integrations pages.