Created
March 3, 2023 19:02
-
-
Save jbcpollak/b86d32f092a7ad3f413df348803326e2 to your computer and use it in GitHub Desktop.
Validating / Linting your PR summary with a JIRA ticket
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "[Validation] Pull Request" | |
on: | |
pull_request: | |
# By default, a workflow only runs when a pull_request's activity type is opened, synchronize, or reopened. We | |
# explicity override here so that PR titles are re-linted when the PR text content is edited. | |
# | |
# Possible values: https://help.github.com/en/actions/reference/events-that-trigger-workflows#pull-request-event-pull_request | |
types: ["opened", "edited", "reopened", "synchronize"] | |
branches: | |
- 'main**' | |
jobs: | |
validation_pull_request: | |
name: "[Validation] Pull Request" | |
runs-on: ubuntu-latest | |
# Make sure this is actually a PR before running, otherwise silently succeed | |
if: github.event_name == 'pull_request' | |
steps: | |
- name: Lint PR title | |
uses: amannn/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
subjectPattern: '.*\[PROJ-\d*\]\s*' | |
subjectPatternError: No JIRA ticket found at the end of the PR title. | |
types: fix, feat |
Author
jbcpollak
commented
Mar 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment