Skip to content

Commit e2f5657

Browse files
authored
Merge pull request #14 from ferid333/DVLP-012
DVLP-012: Fix pr title check
2 parents 1120a1e + d9c8082 commit e2f5657

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ jobs:
2727

2828
- name: Validate PR title
2929
env:
30+
BASE_BRANCH: ${{ github.event.pull_request.base.ref }}
3031
PR_TITLE: ${{ github.event.pull_request.title }}
3132
run: |
32-
if [[ ! "$PR_TITLE" =~ ^DVLP ]]; then
33-
echo "PR title must start with DVLP."
33+
if [[ "$BASE_BRANCH" == "develop" && ! "$PR_TITLE" =~ ^DVLP ]]; then
34+
echo "PR title must start with DVLP when targeting develop."
35+
echo "Target branch: $BASE_BRANCH"
3436
echo "Actual title: $PR_TITLE"
3537
exit 1
3638
fi

0 commit comments

Comments
 (0)