Approve JavaScript Formatting Changes
Approve PRs that only contain formatting changes to JavaScript or TypeScript files.
Configuration Description
Conditions (all must be true):
- All of the files end in
.js
or.ts
- All changes are non-functional
Automation Actions:
- Approve the PR
- Apply a
code-formatting
label. - Post a comment that explains the automation.
Approve JavaScript Formatting Change
# -*- mode: yaml -*-
manifest:
version: 1.0
automations:
approve_javascript_formatting:
if:
- {{ files | extensions | match(list=['js', 'ts']) | 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.