forked from lucide-icons/lucide
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (35 loc) · 1.21 KB
/
pr-lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: lint
on:
pull_request:
paths:
- 'icons/*'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: refs/pull/${{ github.event.pull_request.number }}/merge
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v35
with:
files: icons/*
- uses: pnpm/action-setup@v2
with:
version: 8
- uses: actions/[email protected]
with:
node-version: 18
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node ./scripts/updateContributors.mjs ${{ steps.changed-files.outputs.all_changed_files }}
- env:
ANNOTATION_SEVERITY: notice
ANNOTATION_TITLE: Contributors have changed!
run: git diff --unified=0 | perl -ne '/^(\+|- |@)/ && print' | perl -pe 's/\n/%0A/' | perl -pe 's/%0A(\+\+\+ b\/)/\n\1/g' | perl -pe "s/\+\+\+ b\/([^@]*)%0A@@ -(\d+)[^\s]* \+(\d+)[^@]*@@(.*)/::$ANNOTATION_SEVERITY file=\1,line=\2,endLine=\3,title=$ANNOTATION_TITLE::\4/"
- run: git diff --exit-code