https://github.com/lukbukkit/action-pr-limits
A GitHub action which limits pull requests on specific branches
https://github.com/lukbukkit/action-pr-limits
actions github nodejs pull-requests
Last synced: 9 months ago
JSON representation
A GitHub action which limits pull requests on specific branches
- Host: GitHub
- URL: https://github.com/lukbukkit/action-pr-limits
- Owner: lukbukkit
- License: mit
- Created: 2020-03-17T09:41:04.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2025-03-07T20:07:36.000Z (11 months ago)
- Last Synced: 2025-04-30T04:47:59.287Z (9 months ago)
- Topics: actions, github, nodejs, pull-requests
- Language: TypeScript
- Homepage:
- Size: 1.23 MB
- Stars: 4
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Limit Pull Requests
A GitHub action which limits pull requests to given branches.
## Inputs
You should at least specify one of the inputs, otherwise the usage of this action is pointless.
If both inputs are given the allowlist will be preferred.
You can use a full branch name or regular expression to match branch names.
The inputs `whitelist` and `blacklist` are deprecated.
### `allowlist`
A list of branches which are allowed to merge into another branch.
### `denylist`
A list of branches which aren't allowed to merge into another branch.
## Example usage
In this example action we want to limit the branches from which pull requests into the `main` branch can be created.
Just pull requests from the branches `development` and [`testing-v([\d.]+)`](https://regexr.com/5ohd9)
to the `main` branch should be allowed.
All other pull request, which aren't targeting `main` branch should also be allowed.
```yaml
name: Limit PRs
on:
pull_request:
branches:
- main
jobs:
limit_main_pr:
runs-on: ubuntu-latest
steps:
- uses: LukBukkit/action-pr-limits@v1
with:
allowlist: |
development
testing-v([\d.]+)
```