Skip to content

Instantly share code, notes, and snippets.

@richimf
Last active January 29, 2021 18:25
Show Gist options
  • Save richimf/04f8d91b7eb16c56bef1512db9827491 to your computer and use it in GitHub Desktop.
Save richimf/04f8d91b7eb16c56bef1512db9827491 to your computer and use it in GitHub Desktop.
Pull Request format regex
# '^(?:\[IMPROVEMENT\]|\[FEATURE\]|\[BUGFIX\])\[([A-Z])+\-(\d+)\]\s(\w){1,}(\w|\s|\-){1,}$'
# Github action for Jira ticket verification
name: JIRA Validation
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
jobs:
pr-lint:
runs-on: ubuntu-latest
steps:
- uses: seferov/pr-lint-action@master
with:
title-regex: '^(?:\[IMPROVEMENT\]|\[FEATURE\]|\[BUGFIX\])\[([A-Z])+\-(\d+)\]\s(\w){1,}(\w|\s|\-){1,}$'
error-message: '*** Invalid JIRA format on Pull Request ***'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment