mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-11 23:04:26 +00:00
cac63a3a82
To avoid requiring authorization to run the PR block action for new contributors, use `pull_request_target`. Running the workflow file from the destination branch does not require approval. - https://stackoverflow.com/questions/74957218/what-is-the-difference-between-pull-request-and-pull-request-target-event-in-git
31 lines
1.0 KiB
YAML
31 lines
1.0 KiB
YAML
# beacon_chain
|
|
# Copyright (c) 2024 Status Research & Development GmbH
|
|
# Licensed and distributed under either of
|
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
name: PR block
|
|
on:
|
|
pull_request_target:
|
|
branches:
|
|
- stable
|
|
|
|
jobs:
|
|
close:
|
|
name: "Close pull request"
|
|
runs-on: ubuntu-latest
|
|
if: github.actor != 'dependabot[bot]'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Close
|
|
run: |
|
|
gh pr close ${{ github.event.pull_request.number }} --comment \
|
|
'Pull requests to the `stable` branch are not allowed.
|
|
Please open your pull request against the `unstable` branch.
|
|
See https://nimbus.guide/contribute.html#build-and-deploy'
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|