From 8050e50bacf20d876f4caafc6b820ac053920880 Mon Sep 17 00:00:00 2001 From: Aishwarya S Date: Sun, 11 Jun 2023 17:51:31 +0530 Subject: [PATCH] added --- .github/workflow/validate.yml | 22 ++++++++++++++++++++++ .idea/.gitignore | 5 +++++ .idea/aws-nodejs-sample-codebuild.iml | 12 ++++++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ 5 files changed, 53 insertions(+) create mode 100644 .github/workflow/validate.yml create mode 100644 .idea/.gitignore create mode 100644 .idea/aws-nodejs-sample-codebuild.iml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.github/workflow/validate.yml b/.github/workflow/validate.yml new file mode 100644 index 0000000..bd91377 --- /dev/null +++ b/.github/workflow/validate.yml @@ -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 \ No newline at end of file diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..b58b603 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,5 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/aws-nodejs-sample-codebuild.iml b/.idea/aws-nodejs-sample-codebuild.iml new file mode 100644 index 0000000..24643cc --- /dev/null +++ b/.idea/aws-nodejs-sample-codebuild.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..7644070 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file