Skip to content
message-square

GitHub Action

Issue / Pull request body regex validator

v0.2 Latest version

Issue / Pull request body regex validator

message-square

Issue / Pull request body regex validator

This Action checks issue and pr descriptions against an regular expression

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Issue / Pull request body regex validator

uses: FabianKoestring/body-regex-validator-action@v0.2

Learn more about this action in FabianKoestring/body-regex-validator-action

Choose a version

Issue / Pull request body regex validator

This Action checks issue and pull-request descriptions against an regular expression. This can be used to check if the description met your Github template files.

Usage

This Action subscribes to Pull request events and Issues events which will fire whenever Issues or Pull requests get created.

name: Example workflow
on: [issues, pull_request]
jobs:
  example:
    name: Example job
    runs-on: ubuntu-latest
    steps:
    - name: Run actions/checkout 
      uses: actions/checkout@v1
      with:
        fetch-depth: 1
    - name: Run fabiankoestring/body-regex-validator-action
      uses: fabiankoestring/body-regex-validator-action@master
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        PULL_REQUEST_PATTERN: '^(.*Description.*Changes.*Tests.*)$'
        PULL_REQUEST_COMMENT: 'This is my pr comment template.'
        ISSUE_PATTERN: '^(.*Description.*Behavior.*)$'
        ISSUE_COMMENT: 'This is my issue comment template.'

License

The Dockerfile and associated scripts and documentation in this project are released under the GNU General Public License v3.0.