Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflow/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Validate Branch Name

on:
pull_request:
branches:
- 'production'

jobs:
check_branch_name:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'hotfix/')

steps:
- name: Fail if branch name does not match pattern
run: |
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
DATE_PATTERN='^hotfix/((0[1-9])|([1-2][0-9])|(3[0-1]))_((0[1-9])|(1[0-2]))_[0-9]{4}$'

if [[ ! $BRANCH_NAME =~ $DATE_PATTERN ]]; then
echo "Error: Invalid branch name! Branch names for hotfixes should match 'hotfix/DD_MM_YYYY'."
exit 1
fi
5 changes: 5 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/aws-nodejs-sample-codebuild.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.