Skip to content
slash

GitHub Action

Close Fork Pulls

v3.0.0 Latest version

Close Fork Pulls

slash

Close Fork Pulls

A GitHub action to close pull requests from forks

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Close Fork Pulls

uses: peter-evans/close-fork-pulls@v3.0.0

Learn more about this action in peter-evans/close-fork-pulls

Choose a version

Close Fork Pulls

CI GitHub Marketplace

A GitHub action to close pull requests from forks.

Usage

name: Close Fork Pulls
on:
  schedule:
    - cron:  '0 0 * * *'
jobs:
  rebase:
    runs-on: ubuntu-latest
    steps:
      - name: Close Pull
        uses: peter-evans/close-fork-pulls@v3
        with:
          comment: |
            Sorry. Pull requests are not accepted for this repository.
            Auto-closing this pull request.

Action inputs

Name Description Default
token GITHUB_TOKEN or a repo scoped PAT. GITHUB_TOKEN
repository The GitHub repository containing the pull request. github.repository (Current repository)
comment A comment to make on the pull request before closing.

Accessing pull requests in other repositories

You can close pull requests in another repository by using a PAT instead of GITHUB_TOKEN. The user associated with the PAT must have write access to the repository.

License

MIT