From ce0d2e4dc4e725c40e56429b0ec9d7f981d4086d Mon Sep 17 00:00:00 2001 From: sohitkumar Date: Mon, 7 Oct 2024 18:56:38 +0530 Subject: [PATCH] chore(DEV-106): pr_validation.yml --- .github/workflows/pr_validation.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr_validation.yml b/.github/workflows/pr_validation.yml index 2adf7a5e..9d877d81 100644 --- a/.github/workflows/pr_validation.yml +++ b/.github/workflows/pr_validation.yml @@ -1,4 +1,4 @@ -name: PR Validation +name: PR Title Validation on: pull_request: @@ -9,19 +9,18 @@ jobs: runs-on: ubuntu-latest steps: - - name: Check PR Title and Description + - name: Check PR Title run: | title="${{ github.event.pull_request.title }}" - description="${{ github.event.pull_request.body }}" # Validate PR title - if [[ "$title" != *"feat"* ]] && \ - [[ "$title" != *"fix"* ]] && \ - [[ "$title" != *"refactor"* ]] && \ - [[ "$title" != *"style"* ]] && \ - [[ "$title" != *"chore"* ]]; then - echo "Error: Pull request title must include 'feat', 'fix', 'refactor', 'style' or 'chore'." + if [[ "$title" != feat* ]] && \ + [[ "$title" != fix* ]] && \ + [[ "$title" != refactor* ]] && \ + [[ "$title" != style* ]] && \ + [[ "$title" != chore* ]]; then + echo "Error: Pull request title must start with 'feat', 'fix', 'refactor', 'style', or 'chore'." exit 1 fi - echo "Pull request title and description are valid." + echo "Pull request title is valid."