An open API service indexing awesome lists of open source software.

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

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.]+)
```