Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 4 months 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 (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-10-19T02:16:37.000Z (4 months ago)
- Last Synced: 2024-10-24T15:56:04.484Z (4 months ago)
- Topics: automation, close-fork-pulls, github-action, pull-requests, workflow
- Language: TypeScript
- Homepage:
- Size: 2.34 MB
- Stars: 6
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
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)