name: PR Limit on: pull_request_target: types: [opened, reopened] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.user.id }} cancel-in-progress: false permissions: contents: read pull-requests: write jobs: pr_limit: name: Check contributor PR limit runs-on: ubuntu-latest timeout-minutes: 5 steps: - name: Checkout uses: actions/checkout@v7 with: persist-credentials: false # Execute trusted code from the base repository's default branch. ref: ${{ github.event.repository.default_branch }} - name: Set up Python uses: actions/setup-python@v6 with: python-version: '3.15' - name: Check PR limit env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} PR_REPO: ${{ github.repository }} AUTOCLOSE: ${{ github.repository == 'django/django' && vars.PR_LIMIT_AUTOCLOSE == 'true' }} PYTHONPATH: scripts run: python scripts/pr_limit/check_pr.py