From 500d00930d0586f48e357e60792b968a3e4ed271 Mon Sep 17 00:00:00 2001 From: Ruoyu Zhong Date: Fri, 1 Mar 2024 02:08:06 +0800 Subject: [PATCH] triage: limit open pull requests created by a user See also: Homebrew/homebrew-core#164475. --- .github/workflows/triage.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml index 7bb51f5fda..880c57ac43 100644 --- a/.github/workflows/triage.yml +++ b/.github/workflows/triage.yml @@ -10,6 +10,24 @@ permissions: contents: read jobs: + limit-pull-requests: + if: > + always() && github.repository_owner == 'Homebrew' && + (github.event_name == 'pull_request_target' && + github.event.action == 'opened') + runs-on: ubuntu-latest + steps: + - uses: Homebrew/actions/limit-pull-requests@master + with: + except-users: | + BrewTestBot + comment-limit: 15 + comment: | + Hi, thanks for your contribution to Homebrew! You already have >=15 open pull requests, so please get them ready to be merged or close them before you open more. If CI fails on any of them, please fix it or ask for help doing so. + If you are performing simple version bumps, @BrewTestBot automatically bumps [a list of formulae](https://github.com/${{ github.repository }}/blob/HEAD/.github/autobump.txt) so you don't need to. Please take a look at issues and pull requests labelled https://github.com/${{ github.repository }}/labels/help%20wanted and see if you can help to fix any of them. Thanks! + close-limit: 30 + close: true + triage: runs-on: ubuntu-latest steps: