Review Important Tags in CSS Files
Flag the use of !important
in CSS files and automatically request changes.
Configuration Description
Conditions (all must be true):
- The PR contains changes to CSS files.
- The changes include
!important
Automation Actions:
- Apply an orange label that says
⚠️ Includes !important tag
- Request changes an post a comment asking the PR author to remove the important tage.
Review Important Tags in CSS Files
# -*- mode: yaml -*-
manifest:
version: 1.0
automations:
review_css_important:
if:
- {{ files | extensions | match(term='css') | some }}
- {{ source.diff.files | matchDiffLines(regex=r/!important/) | some }}
run:
- action: add-label@v1
args:
label: '⚠️ Includes !important tag'
color: '{{ colors.orange }}'
- action: request-changes@v1
args:
comment: |
Please remove the `!important` tag from your CSS.
colors:
orange: 'd93f0b'