Giter Site home page Giter Site logo

radulle / pullforcer Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 301 KB

Pull Request Enforcer GitHub Action

Home Page: https://github.com/marketplace/actions/pullforcer

License: MIT License

TypeScript 84.09% JavaScript 15.91%
code-quality conventional-commits

pullforcer's Introduction

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's People

Contributors

nradulaski-godaddy avatar

Stargazers

Andrew Johnson avatar Nikola Radulaški avatar

Watchers

Nikola Radulaški avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.