0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-08 22:32:41 +00:00

Merge pull request #3413 from naturalcrit/calculuschild-patch-1

Update pr-check.yml
This commit is contained in:
Trevor Buckner
2024-04-19 11:24:28 -04:00
committed by GitHub

View File

@@ -1,26 +1,25 @@
name: PR Check name: PR Check
on: pull_request_target
on: env:
pull_request: GH_REPO: ${{ github.repository }}
types: GH_NO_UPDATE_NOTIFIER: 1
- opened GH_PROMPT_DISABLED: 1
permissions:
contents: read
issues: write
pull-requests: write
statuses: write
jobs: jobs:
check-pr: limit-pull-requests:
if: always() && github.repository_owner == 'Homebrew'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - uses: Homebrew/actions/limit-pull-requests@master
uses: actions/checkout@v2 with:
except-users: |
- name: Get PR count dependabot
id: pr-count comment-limit: 1
run: | comment: |
PR_COUNT=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ Hi, thanks for your contribution to the Homebrewery! You already have >=3 open pull requests. Consider completing some of your existing PRs before opening new ones. Thanks!
"https://api.github.com/repos/naturalcrit/homebrewery/pulls? state=open&head=${{ github.actor }}:${{ github.head_ref }}" | jq '. | length') close-limit: 5
echo "::set-output name=pr_count::$PR_COUNT" close: false
- name: Update PR description
if: ${{ steps.pr_count.outputs.pr_count }} -ge 1
run: |
gh pr edit ${{ github.event.number }} --body "You already have ${{ steps.pr-count.outputs.pr_count }} PRs open. Consider completing some of your existing PRs before opening new ones."