https://github.com/peter-evans/close-fork-pulls
A GitHub action to close pull requests from forks
https://github.com/peter-evans/close-fork-pulls
automation close-fork-pulls github-action pull-requests workflow
Last synced: about 1 year ago
JSON representation
A GitHub action to close pull requests from forks
- Host: GitHub
- URL: https://github.com/peter-evans/close-fork-pulls
- Owner: peter-evans
- License: mit
- Created: 2020-06-03T08:08:37.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2025-05-10T02:16:33.000Z (about 1 year ago)
- Last Synced: 2025-05-10T03:22:47.571Z (about 1 year ago)
- Topics: automation, close-fork-pulls, github-action, pull-requests, workflow
- Language: TypeScript
- Homepage:
- Size: 4.11 MB
- Stars: 6
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Close Fork Pulls
[](https://github.com/peter-evans/close-fork-pulls/actions?query=workflow%3ACI)
[](https://github.com/marketplace/actions/close-fork-pulls)
A GitHub action to close pull requests from forks.
## Usage
```yml
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](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). | `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](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) instead of `GITHUB_TOKEN`.
The user associated with the PAT must have write access to the repository.
## License
[MIT](LICENSE)