Skip to content

Commit 159fdde

Browse files
authored
feat(ci): pr-quality
1 parent c961dc2 commit 159fdde

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/pr-quality.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: PR Quality
2+
3+
permissions:
4+
contents: read
5+
issues: read
6+
pull-requests: write
7+
8+
on:
9+
pull_request_target:
10+
types: [opened, reopened]
11+
12+
jobs:
13+
anti-slop:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
18+
- uses: peakoss/anti-slop@85daca1880e9e1af197fc06ea03349daf08f4202 # v0.2.1
19+
env:
20+
IS_NEW: >-
21+
${{ contains(fromJSON('["FIRST_TIMER","FIRST_TIME_CONTRIBUTOR","NONE"]'),
22+
github.event.pull_request.author_association) }}
23+
with:
24+
max-failures: ${{ env.IS_NEW == 'true' && 2 || 3 }}
25+
global-merge-ratio-exclude-own: ${{ env.IS_NEW == 'true' }}
26+
max-daily-forks: ${{ env.IS_NEW == 'true' && 4 || 7 }}
27+
require-pr-template: true
28+
require-conventional-title: true
29+
require-conventional-commits: true
30+
failure-pr-message: |
31+
👋 Hi there! This PR was automatically flagged and closed by our quality checks.
32+
33+
If you believe this was a mistake, please review our contributing guidelines
34+
and leave a comment explaining **why this is a mistake**.

0 commit comments

Comments
 (0)