fix: 收紧CSS所有权与历史兼容门禁

This commit is contained in:
hectorzhao
2026-09-05 09:33:34 +08:00
parent 64bfb9ad3d
commit ca1fc2847f
11 changed files with 670 additions and 41 deletions
+15 -2
View File
@@ -17,7 +17,20 @@ jobs:
node-version: 24
cache: npm
- run: npm ci
- name: Verify changed formatting and CSS ownership
- name: Resolve the complete change range
env:
QUALITY_BASE_REF: ${{ github.event_name == 'pull_request' && format('origin/{0}', github.base_ref) || format('{0}^', github.sha) }}
EVENT_NAME: ${{ github.event_name }}
PR_BASE: ${{ github.event.pull_request.base.sha }}
PUSH_BEFORE: ${{ github.event.before }}
run: |
if [ "$EVENT_NAME" = pull_request ]; then
base=$(git merge-base "$PR_BASE" HEAD)
elif [ "$PUSH_BEFORE" = 0000000000000000000000000000000000000000 ]; then
base=$(git hash-object -t tree /dev/null)
else
git cat-file -e "$PUSH_BEFORE^{commit}"
base=$PUSH_BEFORE
fi
echo "QUALITY_BASE_REF=$base" >> "$GITHUB_ENV"
- name: Verify changed formatting and CSS ownership
run: npm run format:check && npm run style:check && npm run css:verify