Skip to content

Pullforcer

Actions
Enforce Pull Request Rules
v1.0.0
Latest
Star (2)

Tags

 (1)

Pull Request Enforcer

Enforce title and body of your pull requests via regular expressions.

Usage

Add ./github/workflows/ci.yml to your main branch:

name: CI
on:
  pull_request_target:
    types:
      - opened
      - reopened
      - edited
      - synchronize

jobs:
  pr:
    name: Pullforcer
    runs-on: ubuntu-latest
    steps:
      - uses: radulle/[email protected] 
      # If you run locally copy action.yml and dist contents to .github/actions/pullforcer and replace previous line with:
      # - uses: actions/checkout@v3
      # - uses: ./.github/actions/pullforcer 
        with:
          pr-title-regexp: '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(?:\(([a-z\-\.,]+)\))?(!)?: ([0-9a-z\-\., <>()\[\]]{4,})$'

Width

pr-title-regexp

Regular expression. ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(?:\(([a-z\-\.,]+)\))?(!)?: ([0-9a-z\-\., <>()\[\]]{4,})$ would enforce all lowercase Conventional Commit with subject being at least 4 characters long.

pr-body-regexp

Regular expression. (\r\n.+){2} would require body to be at least two lines long

Development

$ npm install
$ npm run build && npm run package

References

Pullforcer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Enforce Pull Request Rules
v1.0.0
Latest

Tags

 (1)

Pullforcer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.