Skip to content

Workflow file for this run

name: No PRs to live branch
on:
pull_request_target:
types:
- opened
branches:
- master
jobs:
prevent-merge:
runs-on: ubuntu-latest
steps:
- name: Comment and close PR
run: |
gh pr close "${PR_URL}"
--comment "Pull requests to the master branch are not allowed. Use staging branch. Maintainer can publish staging branch using workflow dispatch at https://github.com/laminas/getlaminas.org/actions/workflows/publish.yml"
env:
PR_URL: ${{ github.event.pull_request.url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}