Skip to content

Commit

Permalink
FOUNDATIONS: Created Job To Check PR Title
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdutoit committed Dec 27, 2023
1 parent ce49acf commit a93db3f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
PR_TITLE="${{ github.event.pull_request.title }}"
echo "PR Title: ${{ github.event.pull_request.title }}"
# Define the list of prefixes
PREFIXES=(
Expand Down Expand Up @@ -91,6 +94,9 @@ jobs:
if [ "${PREFIX_MATCH}" == false ]; then
echo "error: The PR title must start with one of THE STANDARD specified prefixes. Current PR Title: '${{ github.event.pull_request.title }}'"
echo "See https://github.com/hassanhabib/The-Standard-Team/blob/main/4%20Practices/4%20Practices.md#4113-category-list for the complete category list"
echo ""
echo "Please update the PR Title to the correct category, then navigate to the Actions tab and click on the Re-run jobs button"
echo "P.S. if the job fails again with the wrong title, give it a few minutes to allow the PR Title Change event to propagate through the system."
exit 1
fi
build:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ public CheckPrTitleJob(
Name = "Check PR Title",
Run = @"PR_TITLE=""${{ github.event.pull_request.title }}""
echo ""PR Title: ${{ github.event.pull_request.title }}""
# Define the list of prefixes
PREFIXES=(
""ACCEPTANCE""
Expand Down Expand Up @@ -77,6 +79,9 @@ public CheckPrTitleJob(
if [ ""${PREFIX_MATCH}"" == false ]; then
echo ""error: The PR title must start with one of THE STANDARD specified prefixes. Current PR Title: '${{ github.event.pull_request.title }}'""
echo ""See https://github.com/hassanhabib/The-Standard-Team/blob/main/4%20Practices/4%20Practices.md#4113-category-list for the complete category list""
echo """"
echo ""Please update the PR Title to the correct category, then navigate to the Actions tab and click on the Re-run jobs button""
echo ""P.S. if the job fails again with the wrong title, give it a few minutes to allow the PR Title Change event to propagate through the system.""
exit 1
fi"
},
Expand Down

0 comments on commit a93db3f

Please sign in to comment.