diff --git a/.github/workflows/pr-quality.yml b/.github/workflows/pr-quality.yml new file mode 100644 index 0000000..7e7cece --- /dev/null +++ b/.github/workflows/pr-quality.yml @@ -0,0 +1,33 @@ +name: PR Quality + +permissions: + contents: read + issues: read + pull-requests: write + +on: workflow_call + +jobs: + anti-slop: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + repository: webpack/.github + - uses: peakoss/anti-slop@85daca1880e9e1af197fc06ea03349daf08f4202 # v0.2.1 + env: + IS_NEW: >- + ${{ contains(fromJSON('["FIRST_TIMER","FIRST_TIME_CONTRIBUTOR","NONE"]'), + github.event.pull_request.author_association) }} + with: + max-failures: ${{ env.IS_NEW == 'true' && 2 || 3 }} + global-merge-ratio-exclude-own: ${{ env.IS_NEW == 'true' }} + max-daily-forks: ${{ env.IS_NEW == 'true' && 4 || 7 }} + require-pr-template: true + require-conventional-title: true + require-conventional-commits: true + failure-pr-message: | + 👋 Hi there! This PR was automatically flagged and closed by our quality checks. + + If you believe this was a mistake, please review our contributing guidelines + and leave a comment explaining **why this is a mistake**.