Skip to content

Commit 99b2731

Browse files
author
rahul-infra
committed
debug step for pr title check.
1 parent 26d0a13 commit 99b2731

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

.github/workflows/pr-title.yaml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818
1919
# Please look up the latest version from
2020
# https://github.com/amannn/action-semantic-pull-request/releases
21-
- uses: amannn/action-semantic-pull-request@v6.1.1
21+
- name: Validate PR title
22+
id: validate_pr_title
23+
uses: amannn/action-semantic-pull-request@v6.1.1
2224
env:
2325
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2426
with:
@@ -57,3 +59,36 @@ jobs:
5759
# merge commit, and it's easy to commit this by mistake. Enable this option
5860
# to also validate the commit message for one commit PRs.
5961
validateSingleCommit: false
62+
63+
- name: Validation Result - Success
64+
if: success()
65+
run: |
66+
echo "==================================="
67+
echo " PR TITLE VALIDATION PASSED"
68+
echo "==================================="
69+
echo "PR Title: ${{ github.event.pull_request.title }}"
70+
echo "Status: VALID ✓"
71+
echo ""
72+
echo "Your PR title follows conventional commit format!"
73+
echo "The PR is ready for review and merge."
74+
75+
- name: Validation Result - Failure
76+
if: failure()
77+
run: |
78+
echo "==================================="
79+
echo " PR TITLE VALIDATION FAILED"
80+
echo "==================================="
81+
echo "PR Title: ${{ github.event.pull_request.title }}"
82+
echo "Status: INVALID ✗"
83+
echo ""
84+
echo "Please update your PR title to follow conventional commit format:"
85+
echo " <type>[optional scope][optional !]: <description>"
86+
echo ""
87+
echo "Allowed types: fix, feat, docs, ci, chore"
88+
echo "Description must start with an uppercase letter"
89+
echo ""
90+
echo "Examples:"
91+
echo " ✓ feat: Add new feature"
92+
echo " ✓ fix: Resolve bug in validation"
93+
echo " ✓ feat!: Breaking change description"
94+
echo " ✓ feat(api): Add new endpoint"

0 commit comments

Comments
 (0)