This is an automated email from the ASF dual-hosted git repository.

adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new c7183f1ed4 FINERACT-2081: breaking api change test merge base instead 
of develop to prevent false flags
c7183f1ed4 is described below

commit c7183f1ed462c111f3410b9ece62f35d02dbbc15
Author: Attila Budai <[email protected]>
AuthorDate: Thu Feb 26 14:00:32 2026 +0100

    FINERACT-2081: breaking api change test merge base instead of develop to 
prevent false flags
---
 .../verify-api-backward-compatibility.yml          | 34 +++++++++++++++++-----
 1 file changed, 26 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/verify-api-backward-compatibility.yml 
b/.github/workflows/verify-api-backward-compatibility.yml
index 4b2a059cec..3e4ce5fcd2 100644
--- a/.github/workflows/verify-api-backward-compatibility.yml
+++ b/.github/workflows/verify-api-backward-compatibility.yml
@@ -23,6 +23,32 @@ jobs:
           fetch-depth: 0
           path: baseline
 
+      - name: Checkout PR branch
+        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
+        with:
+          repository: ${{ github.event.pull_request.head.repo.full_name }}
+          ref: ${{ github.event.pull_request.head.sha }}
+          fetch-depth: 0
+          path: current
+
+      - name: Compute merge-base commit
+        id: merge-base
+        run: |
+          cd baseline
+          # For fork PRs, fetch PR head from the local current/ checkout
+          git fetch "${GITHUB_WORKSPACE}/current" HEAD --no-tags 2>/dev/null 
|| true
+          MERGE_BASE=$(git merge-base ${{ github.event.pull_request.base.ref 
}} ${{ github.event.pull_request.head.sha }})
+          echo "Merge-base commit: ${MERGE_BASE}"
+          echo "sha=${MERGE_BASE}" >> "$GITHUB_OUTPUT"
+          BASE_HEAD=$(git rev-parse ${{ github.event.pull_request.base.ref }})
+          if [ "${MERGE_BASE}" != "${BASE_HEAD}" ]; then
+            echo "::notice::PR is not rebased on latest ${{ 
github.event.pull_request.base.ref }}. Using merge-base ${MERGE_BASE} as 
baseline (branch HEAD: ${BASE_HEAD})."
+          fi
+
+      - name: Reset baseline to merge-base
+        working-directory: baseline
+        run: git checkout ${{ steps.merge-base.outputs.sha }}
+
       - name: Set up JDK 21
         uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
         with:
@@ -33,14 +59,6 @@ jobs:
         working-directory: baseline
         run: ./gradlew :fineract-provider:resolve --no-daemon
 
-      - name: Checkout PR branch
-        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v5
-        with:
-          repository: ${{ github.event.pull_request.head.repo.full_name }}
-          ref: ${{ github.event.pull_request.head.sha }}
-          fetch-depth: 0
-          path: current
-
       - name: Generate PR spec
         working-directory: current
         run: ./gradlew :fineract-provider:resolve --no-daemon

Reply via email to