From 097bb18b284e3711abfdde092e4a8075bbe286b3 Mon Sep 17 00:00:00 2001 From: Kenzium <135893200+Kenzium@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:00:28 +0100 Subject: [PATCH 1/3] Added new print statment --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 3dc05cc..3b1b9d4 100644 --- a/main.py +++ b/main.py @@ -2,4 +2,5 @@ print("This is DEV2: you are a pussy DEV1") print("Welcome to DevOps practise") print("You are a pussy - DEV1 BRANCH & dont delete me") -print("This is a hotfix") \ No newline at end of file +print("This is a hotfix") +print("You better deny this boy") \ No newline at end of file From 6e23267d7c053352e253f87f583375b091e52745 Mon Sep 17 00:00:00 2001 From: Kenzium <135893200+Kenzium@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:20:37 +0100 Subject: [PATCH 2/3] THIS IS NOT ALLOWED --- .github/workflows/PR-validator.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/PR-validator.yml diff --git a/.github/workflows/PR-validator.yml b/.github/workflows/PR-validator.yml new file mode 100644 index 0000000..6b55a92 --- /dev/null +++ b/.github/workflows/PR-validator.yml @@ -0,0 +1,15 @@ +name: PR Validator + +on: + pull_request: + types: [opened, synchronize] + +jobs: + validate-pr: + runs-on: ubuntu-latest + steps: + - name: Check PR Title Format + run: | + PR_TITLE="${{ github.event.pull_request.title }}" + if [[ ! "$PR_TITLE" =~ ^(feature|bugfix|hotfix)/[a-z0-9-]+$ ]]; then + echo "❌ Pull request title must follow the format: feature/branch-name, bugfix/branch-name, or hot From a964cb819dd2df76f2edaec6f5203be2c3b02e6c Mon Sep 17 00:00:00 2001 From: Kenzium <135893200+Kenzium@users.noreply.github.com> Date: Tue, 25 Mar 2025 13:24:29 +0100 Subject: [PATCH 3/3] THIS IS NOT ALLOWED --- .github/workflows/PR-validator.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/PR-validator.yml b/.github/workflows/PR-validator.yml index 6b55a92..e328899 100644 --- a/.github/workflows/PR-validator.yml +++ b/.github/workflows/PR-validator.yml @@ -12,4 +12,6 @@ jobs: run: | PR_TITLE="${{ github.event.pull_request.title }}" if [[ ! "$PR_TITLE" =~ ^(feature|bugfix|hotfix)/[a-z0-9-]+$ ]]; then - echo "❌ Pull request title must follow the format: feature/branch-name, bugfix/branch-name, or hot + echo "❌ Pull request title must follow the format: feature/branch-name, bugfix/branch-name, or hotfix/branch-name" + exit 1 + fi