From 92935dae8dd6621ecad113a2ef46dc0a946a39aa Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Sat, 10 Jan 2026 19:05:47 +0200 Subject: [PATCH 01/23] Remove Maven prerequisites from pom.xml Removed Maven prerequisites section from pom.xml --- pom.xml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pom.xml b/pom.xml index 187d2a36a0..5c10d417c1 100644 --- a/pom.xml +++ b/pom.xml @@ -220,8 +220,4 @@ http://github.com/jleetutorial/maven-project - - 3.0.3 - - From ea6991e678f0f042b3cd7b6ab8f68b71566a5e49 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Mon, 9 Feb 2026 17:21:19 +0200 Subject: [PATCH 02/23] Update manual workflow to create branches in repos --- .github/workflows/manual.yml | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/manual.yml diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000000..04908cddbf --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,55 @@ +name: Create branches in multiple repos + +on: + workflow_dispatch: + inputs: + jira_key: + description: "Jira issue key (e.g. ABC-123)" + required: true + repos: + description: "Comma-separated repos (org/repo1,org/repo2)" + required: true + base_branch: + description: "Base branch" + required: false + default: "main" + +jobs: + create-branches: + runs-on: ubuntu-latest + + steps: + - name: Create branches + env: + GH_TOKEN: ${{ secrets.GH_PAT }} + JIRA_KEY: ${{ github.event.inputs.jira_key }} + REPOS: ${{ github.event.inputs.repos }} + BASE_BRANCH: ${{ github.event.inputs.base_branch }} + run: | + set -e + + BRANCH_NAME="feature/${JIRA_KEY}" + IFS=',' read -ra REPO_LIST <<< "$REPOS" + + for REPO in "${REPO_LIST[@]}"; do + echo "Processing $REPO" + + BASE_SHA=$(curl -s \ + -H "Authorization: token $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/$REPO/git/ref/heads/$BASE_BRANCH \ + | jq -r .object.sha) + + if [ "$BASE_SHA" = "null" ]; then + echo "Base branch not found in $REPO" + continue + fi + + curl -s -X POST \ + -H "Authorization: token $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/$REPO/git/refs \ + -d "{\"ref\":\"refs/heads/$BRANCH_NAME\",\"sha\":\"$BASE_SHA\"}" + + echo "Branch $BRANCH_NAME created in $REPO" + done From bcc0045d35a4838a94c0b8279355abc0da4097e6 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 10:19:50 +0200 Subject: [PATCH 03/23] Refactor manual workflow to use hardcoded repos --- .github/workflows/manual.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 04908cddbf..3265e0accf 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -6,11 +6,8 @@ on: jira_key: description: "Jira issue key (e.g. ABC-123)" required: true - repos: - description: "Comma-separated repos (org/repo1,org/repo2)" - required: true base_branch: - description: "Base branch" + description: "Base branch name" required: false default: "main" @@ -19,36 +16,40 @@ jobs: runs-on: ubuntu-latest steps: - - name: Create branches + - name: Create branches in repos env: GH_TOKEN: ${{ secrets.GH_PAT }} JIRA_KEY: ${{ github.event.inputs.jira_key }} - REPOS: ${{ github.event.inputs.repos }} BASE_BRANCH: ${{ github.event.inputs.base_branch }} run: | set -e + ORG="" BRANCH_NAME="feature/${JIRA_KEY}" - IFS=',' read -ra REPO_LIST <<< "$REPOS" - for REPO in "${REPO_LIST[@]}"; do - echo "Processing $REPO" + REPOS=( + "hello-world" + "New Actions" + ) + + for REPO in "${REPOS[@]}"; do + echo "Creating branch in $ORG/$REPO" BASE_SHA=$(curl -s \ -H "Authorization: token $GH_TOKEN" \ -H "Accept: application/vnd.github+json" \ - https://api.github.com/repos/$REPO/git/ref/heads/$BASE_BRANCH \ + "https://api.github.com/repos/$ORG/$REPO/git/ref/heads/$BASE_BRANCH" \ | jq -r .object.sha) if [ "$BASE_SHA" = "null" ]; then - echo "Base branch not found in $REPO" + echo "Base branch '$BASE_BRANCH' not found in $REPO" continue fi curl -s -X POST \ -H "Authorization: token $GH_TOKEN" \ -H "Accept: application/vnd.github+json" \ - https://api.github.com/repos/$REPO/git/refs \ + "https://api.github.com/repos/$ORG/$REPO/git/refs" \ -d "{\"ref\":\"refs/heads/$BRANCH_NAME\",\"sha\":\"$BASE_SHA\"}" echo "Branch $BRANCH_NAME created in $REPO" From c7f9a255c2f55094e9af33cccea5b3f42c9c76cd Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 10:58:53 +0200 Subject: [PATCH 04/23] Add GitHub Actions workflow to create branches --- actions/workflows/manual.yml | 56 ++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 actions/workflows/manual.yml diff --git a/actions/workflows/manual.yml b/actions/workflows/manual.yml new file mode 100644 index 0000000000..3265e0accf --- /dev/null +++ b/actions/workflows/manual.yml @@ -0,0 +1,56 @@ +name: Create branches in multiple repos + +on: + workflow_dispatch: + inputs: + jira_key: + description: "Jira issue key (e.g. ABC-123)" + required: true + base_branch: + description: "Base branch name" + required: false + default: "main" + +jobs: + create-branches: + runs-on: ubuntu-latest + + steps: + - name: Create branches in repos + env: + GH_TOKEN: ${{ secrets.GH_PAT }} + JIRA_KEY: ${{ github.event.inputs.jira_key }} + BASE_BRANCH: ${{ github.event.inputs.base_branch }} + run: | + set -e + + ORG="" + BRANCH_NAME="feature/${JIRA_KEY}" + + REPOS=( + "hello-world" + "New Actions" + ) + + for REPO in "${REPOS[@]}"; do + echo "Creating branch in $ORG/$REPO" + + BASE_SHA=$(curl -s \ + -H "Authorization: token $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + "https://api.github.com/repos/$ORG/$REPO/git/ref/heads/$BASE_BRANCH" \ + | jq -r .object.sha) + + if [ "$BASE_SHA" = "null" ]; then + echo "Base branch '$BASE_BRANCH' not found in $REPO" + continue + fi + + curl -s -X POST \ + -H "Authorization: token $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + "https://api.github.com/repos/$ORG/$REPO/git/refs" \ + -d "{\"ref\":\"refs/heads/$BRANCH_NAME\",\"sha\":\"$BASE_SHA\"}" + + echo "Branch $BRANCH_NAME created in $REPO" + done From 23f48c0ddb824c2be9bf0f13de0f2c79d6000157 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 11:06:42 +0200 Subject: [PATCH 05/23] Add workflow to create branches in multiple repos --- .github/workflows/create-branches.yml | 56 +++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/create-branches.yml diff --git a/.github/workflows/create-branches.yml b/.github/workflows/create-branches.yml new file mode 100644 index 0000000000..3265e0accf --- /dev/null +++ b/.github/workflows/create-branches.yml @@ -0,0 +1,56 @@ +name: Create branches in multiple repos + +on: + workflow_dispatch: + inputs: + jira_key: + description: "Jira issue key (e.g. ABC-123)" + required: true + base_branch: + description: "Base branch name" + required: false + default: "main" + +jobs: + create-branches: + runs-on: ubuntu-latest + + steps: + - name: Create branches in repos + env: + GH_TOKEN: ${{ secrets.GH_PAT }} + JIRA_KEY: ${{ github.event.inputs.jira_key }} + BASE_BRANCH: ${{ github.event.inputs.base_branch }} + run: | + set -e + + ORG="" + BRANCH_NAME="feature/${JIRA_KEY}" + + REPOS=( + "hello-world" + "New Actions" + ) + + for REPO in "${REPOS[@]}"; do + echo "Creating branch in $ORG/$REPO" + + BASE_SHA=$(curl -s \ + -H "Authorization: token $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + "https://api.github.com/repos/$ORG/$REPO/git/ref/heads/$BASE_BRANCH" \ + | jq -r .object.sha) + + if [ "$BASE_SHA" = "null" ]; then + echo "Base branch '$BASE_BRANCH' not found in $REPO" + continue + fi + + curl -s -X POST \ + -H "Authorization: token $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + "https://api.github.com/repos/$ORG/$REPO/git/refs" \ + -d "{\"ref\":\"refs/heads/$BRANCH_NAME\",\"sha\":\"$BASE_SHA\"}" + + echo "Branch $BRANCH_NAME created in $REPO" + done From 4e9a12f6b67014eb84eb7701503f735fa1fdaab7 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 11:14:38 +0200 Subject: [PATCH 06/23] Update organization name in manual.yml --- .github/workflows/manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 3265e0accf..ed2c65e423 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -24,7 +24,7 @@ jobs: run: | set -e - ORG="" + ORG="Nandishn969" BRANCH_NAME="feature/${JIRA_KEY}" REPOS=( From 03cef9d3a0116c2cd160f2d04071b42d3d314f43 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 11:17:11 +0200 Subject: [PATCH 07/23] Change default branch from 'main' to 'master' --- .github/workflows/manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index ed2c65e423..2e954fb2de 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -9,7 +9,7 @@ on: base_branch: description: "Base branch name" required: false - default: "main" + default: "master" jobs: create-branches: From 8aee491c71ded75757628ca3c924a678d62cc3e6 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 11:35:41 +0200 Subject: [PATCH 08/23] Change default branch from 'master' to 'main' --- .github/workflows/manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 2e954fb2de..ed2c65e423 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -9,7 +9,7 @@ on: base_branch: description: "Base branch name" required: false - default: "master" + default: "main" jobs: create-branches: From ffff0b7dfba058bfca40ac8812b6a0bef3f51539 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 11:38:02 +0200 Subject: [PATCH 09/23] Remove 'New Actions' repository from workflow Removed 'New Actions' from the list of repositories in the manual workflow. --- .github/workflows/manual.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index ed2c65e423..4c12d3f7e9 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -29,7 +29,6 @@ jobs: REPOS=( "hello-world" - "New Actions" ) for REPO in "${REPOS[@]}"; do From 753091a87b69b82bce6b630fcafb35b0a4996c99 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 11:42:43 +0200 Subject: [PATCH 10/23] Refactor manual workflow to remove base_branch input Removed base_branch input and updated branch creation logic to use default branch instead. --- .github/workflows/manual.yml | 48 +++++++++++++++++++++++++----------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 4c12d3f7e9..4d0e380e04 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -6,10 +6,6 @@ on: jira_key: description: "Jira issue key (e.g. ABC-123)" required: true - base_branch: - description: "Base branch name" - required: false - default: "main" jobs: create-branches: @@ -20,7 +16,6 @@ jobs: env: GH_TOKEN: ${{ secrets.GH_PAT }} JIRA_KEY: ${{ github.event.inputs.jira_key }} - BASE_BRANCH: ${{ github.event.inputs.base_branch }} run: | set -e @@ -32,24 +27,47 @@ jobs: ) for REPO in "${REPOS[@]}"; do - echo "Creating branch in $ORG/$REPO" + echo "--------------------------------------" + echo "Processing repo: $ORG/$REPO" + # 1️⃣ Get default branch + DEFAULT_BRANCH=$(curl -s \ + -H "Authorization: Bearer $GH_TOKEN" \ + -H "Accept: application/vnd.github+json" \ + https://api.github.com/repos/$ORG/$REPO \ + | jq -r .default_branch) + + if [ "$DEFAULT_BRANCH" = "null" ] || [ -z "$DEFAULT_BRANCH" ]; then + echo "❌ Could not determine default branch for $REPO" + continue + fi + + echo "Default branch is: $DEFAULT_BRANCH" + + # 2️⃣ Get SHA of default branch BASE_SHA=$(curl -s \ - -H "Authorization: token $GH_TOKEN" \ + -H "Authorization: Bearer $GH_TOKEN" \ -H "Accept: application/vnd.github+json" \ - "https://api.github.com/repos/$ORG/$REPO/git/ref/heads/$BASE_BRANCH" \ + https://api.github.com/repos/$ORG/$REPO/git/ref/heads/$DEFAULT_BRANCH \ | jq -r .object.sha) - if [ "$BASE_SHA" = "null" ]; then - echo "Base branch '$BASE_BRANCH' not found in $REPO" + if [ "$BASE_SHA" = "null" ] || [ -z "$BASE_SHA" ]; then + echo "❌ Failed to fetch SHA for $DEFAULT_BRANCH in $REPO" continue fi - curl -s -X POST \ - -H "Authorization: token $GH_TOKEN" \ + # 3️⃣ Create branch + CREATE_RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -X POST \ + -H "Authorization: Bearer $GH_TOKEN" \ -H "Accept: application/vnd.github+json" \ - "https://api.github.com/repos/$ORG/$REPO/git/refs" \ - -d "{\"ref\":\"refs/heads/$BRANCH_NAME\",\"sha\":\"$BASE_SHA\"}" + https://api.github.com/repos/$ORG/$REPO/git/refs \ + -d "{\"ref\":\"refs/heads/$BRANCH_NAME\",\"sha\":\"$BASE_SHA\"}") - echo "Branch $BRANCH_NAME created in $REPO" + if [ "$CREATE_RESPONSE" = "201" ]; then + echo "✅ Branch $BRANCH_NAME created in $REPO" + elif [ "$CREATE_RESPONSE" = "422" ]; then + echo "⚠️ Branch $BRANCH_NAME already exists in $REPO" + else + echo "❌ Failed to create branch in $REPO (HTTP $CREATE_RESPONSE)" + fi done From 370a05dd51448b789d0ae6abef9ad2affaf1817b Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 11:45:32 +0200 Subject: [PATCH 11/23] Update repository name in manual workflow --- .github/workflows/manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 4d0e380e04..a351dc0908 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -23,7 +23,7 @@ jobs: BRANCH_NAME="feature/${JIRA_KEY}" REPOS=( - "hello-world" + "New-Actions" ) for REPO in "${REPOS[@]}"; do From 479d9057881cebfbd36474fcca442f0692df445b Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 11:50:58 +0200 Subject: [PATCH 12/23] Update GH_TOKEN in manual.yml Replaced GH_TOKEN secret with a hardcoded token. --- .github/workflows/manual.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index a351dc0908..cb6c8f0687 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Create branches in repos env: - GH_TOKEN: ${{ secrets.GH_PAT }} + GH_TOKEN: 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 JIRA_KEY: ${{ github.event.inputs.jira_key }} run: | set -e @@ -23,7 +23,7 @@ jobs: BRANCH_NAME="feature/${JIRA_KEY}" REPOS=( - "New-Actions" + "hello-world" ) for REPO in "${REPOS[@]}"; do From f19ce1d5a4c6740d1dd531f951f45bbdb6fa004f Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 13:38:05 +0200 Subject: [PATCH 13/23] Replace hardcoded GH_TOKEN with secret reference --- .github/workflows/manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index cb6c8f0687..4d0e380e04 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Create branches in repos env: - GH_TOKEN: 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 + GH_TOKEN: ${{ secrets.GH_PAT }} JIRA_KEY: ${{ github.event.inputs.jira_key }} run: | set -e From b7b4e7db2ba3cfb5f0f05311e022ffb502d2c963 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 13:38:38 +0200 Subject: [PATCH 14/23] Add 'New-Actions' repo to manual workflow --- .github/workflows/manual.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index 4d0e380e04..c578e317ad 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -24,6 +24,8 @@ jobs: REPOS=( "hello-world" + "New-Actions" + "Jira-Cloud" ) for REPO in "${REPOS[@]}"; do From eb84e6178016f4da251a67f4b7a28f0305530a59 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 10 Feb 2026 13:43:33 +0200 Subject: [PATCH 15/23] Update GH_TOKEN in manual.yml Replaced GH_TOKEN secret with a hardcoded token. --- .github/workflows/manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index c578e317ad..a24b3cb5d5 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Create branches in repos env: - GH_TOKEN: ${{ secrets.GH_PAT }} + GH_TOKEN: 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 JIRA_KEY: ${{ github.event.inputs.jira_key }} run: | set -e From 31523de945dec01d3f9d50daa6fc2e00cc38b199 Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Tue, 17 Feb 2026 14:19:19 +0200 Subject: [PATCH 16/23] Change GH_TOKEN in manual.yml Updated GitHub token for branch creation step. --- .github/workflows/manual.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml index a24b3cb5d5..9ef69e21f2 100644 --- a/.github/workflows/manual.yml +++ b/.github/workflows/manual.yml @@ -14,7 +14,7 @@ jobs: steps: - name: Create branches in repos env: - GH_TOKEN: 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 + GH_TOKEN: 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 JIRA_KEY: ${{ github.event.inputs.jira_key }} run: | set -e From bd7953c9428d76cf5d144726fd0ab55ba8d5487c Mon Sep 17 00:00:00 2001 From: Nandishn969 Date: Fri, 5 Jun 2026 14:14:17 +0200 Subject: [PATCH 17/23] Add commit message validation workflow --- .github/workflows/commit-message-check.yml | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 .github/workflows/commit-message-check.yml diff --git a/.github/workflows/commit-message-check.yml b/.github/workflows/commit-message-check.yml new file mode 100644 index 0000000000..172bc8038d --- /dev/null +++ b/.github/workflows/commit-message-check.yml @@ -0,0 +1,74 @@ +name: Commit Message Check + +on: + push: + branches: + - 'feature/**' + - 'bugfix/**' + pull_request: + branches: + - main + - develop + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Validate commits + run: | + BRANCH="$GITHUB_REF_NAME" + BRANCH_KEY=$(echo "$BRANCH" | grep -oE '[A-Z]+-[0-9]+' | head -1) + BEFORE="${{ github.event.before }}" + AFTER="${{ github.event.after }}" + + echo "Branch: $BRANCH" + echo "Branch Key: $BRANCH_KEY" + echo "" + + if [ -z "$BRANCH_KEY" ]; then + echo "✅ No Jira key in branch name. Skipping." + exit 0 + fi + + # Get commits (push event) + if [ "$BEFORE" = "0000000000000000000000000000000000000000" ]; then + COMMITS=$(git log --format="%H|%s" "$AFTER" -10) + elif [ -n "$BEFORE" ] && [ -n "$AFTER" ]; then + COMMITS=$(git log --format="%H|%s" "$BEFORE..$AFTER") + else + # Pull request — check all commits in PR + COMMITS=$(git log --format="%H|%s" "origin/${{ github.base_ref }}..HEAD") + fi + + FAIL=0 + while IFS= read -r line; do + [ -z "$line" ] && continue + SHA=$(echo "$line" | cut -d'|' -f1 | cut -c1-7) + MSG=$(echo "$line" | cut -d'|' -f2-) + KEY=$(echo "$MSG" | grep -oE '[A-Z]+-[0-9]+' | head -1) + + if [ -z "$KEY" ]; then + echo "❌ [$SHA] Missing Jira key → \"$MSG\"" + FAIL=1 + continue + fi + + if echo "$BRANCH" | grep -q "^bugfix/" && [ "$KEY" != "$BRANCH_KEY" ]; then + echo "❌ [$SHA] Key $KEY ≠ branch key $BRANCH_KEY → \"$MSG\"" + FAIL=1 + continue + fi + + echo "✅ [$SHA] $MSG" + done <<< "$COMMITS" + + echo "" + if [ "$FAIL" -eq 1 ]; then + echo "❌ FAILED" + exit 1 + fi + echo "✅ ALL COMMITS VALID" From 8d4cbf71cac03b422925718db639da88e7de164c Mon Sep 17 00:00:00 2001 From: Nandish K Date: Mon, 8 Jun 2026 10:28:12 +0200 Subject: [PATCH 18/23] kjeewf --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000000..ce01362503 --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +hello From d6112456700d3b3ecb3c4b55599788da726a4460 Mon Sep 17 00:00:00 2001 From: Nandish K Date: Mon, 8 Jun 2026 10:37:43 +0200 Subject: [PATCH 19/23] kjeewf --- text1.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 text1.txt diff --git a/text1.txt b/text1.txt new file mode 100644 index 0000000000..b42c3c74a7 --- /dev/null +++ b/text1.txt @@ -0,0 +1 @@ +heinfdkjdh From 2ecb914785dabf99aeeffcad5b958719dbe31df5 Mon Sep 17 00:00:00 2001 From: Nandish K Date: Mon, 8 Jun 2026 10:48:19 +0200 Subject: [PATCH 20/23] ABC-123 --- text.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 text.txt diff --git a/text.txt b/text.txt new file mode 100644 index 0000000000..f064a31344 --- /dev/null +++ b/text.txt @@ -0,0 +1 @@ +hikujhedoed From 18caf8ce665589ee0bfc26749d60997015d80fe0 Mon Sep 17 00:00:00 2001 From: Nandish K Date: Mon, 8 Jun 2026 10:59:24 +0200 Subject: [PATCH 21/23] ABC-123 --- testing.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 testing.txt diff --git a/testing.txt b/testing.txt new file mode 100644 index 0000000000..0919405720 --- /dev/null +++ b/testing.txt @@ -0,0 +1 @@ +Testing githiub validations From 6067c65d9193560defebdb053766d675cf27f122 Mon Sep 17 00:00:00 2001 From: Nandish K Date: Mon, 8 Jun 2026 11:01:45 +0200 Subject: [PATCH 22/23] not providing any jira key --- test.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.txt b/test.txt index ce01362503..059336e337 100644 --- a/test.txt +++ b/test.txt @@ -1 +1 @@ -hello +kujhfked From ad7fdcc913f6cc640fe19dad1469f072a4bc2583 Mon Sep 17 00:00:00 2001 From: Nandish K Date: Mon, 8 Jun 2026 11:57:07 +0200 Subject: [PATCH 23/23] ABC-123 --- text.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/text.txt b/text.txt index f064a31344..cefd3146d1 100644 --- a/text.txt +++ b/text.txt @@ -1 +1,2 @@ hikujhedoed +dwdh