File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 APP_BRANCH="${{ inputs.app_branch }}"
3131 INPUT_BRANCH="${{ inputs.e2e_branch_input }}"
3232 TEST_REPO="synonymdev/bitkit-e2e-tests"
33+ CALLER_REPO="${{ github.repository }}"
34+
35+ # Platform-specific base branch overrides.
36+ # When a platform needs a different base than 'main', update it here.
37+ # Set both back to 'main' once platforms are aligned again.
38+ declare -A BASE_OVERRIDES=(
39+ ["ios"]="feat/home-redesign"
40+ ["android"]="main"
41+ )
42+
43+ PLATFORM=""
44+ if [[ "$CALLER_REPO" == */bitkit-ios ]]; then
45+ PLATFORM="ios"
46+ elif [[ "$CALLER_REPO" == */bitkit-android ]]; then
47+ PLATFORM="android"
48+ fi
49+ BASE_BRANCH="${BASE_OVERRIDES[$PLATFORM]:-main}"
3350
3451 echo "🧭 App branch: $APP_BRANCH"
3552 echo "🧭 Input branch: $INPUT_BRANCH"
53+ echo "🧭 Caller repo: $CALLER_REPO (platform: ${PLATFORM:-unknown})"
54+ echo "🧭 Base branch: $BASE_BRANCH"
3655 echo "🧭 Checking repo: $TEST_REPO"
3756
3857 if [[ "$INPUT_BRANCH" == "main" ]]; then
4261 BRANCH="$APP_BRANCH"
4362 echo "✅ Found matching branch: $BRANCH"
4463 else
45- BRANCH="main "
46- echo "⚠️ No '$APP_BRANCH' branch in $TEST_REPO, using 'main '."
64+ BRANCH="$BASE_BRANCH "
65+ echo "⚠️ No '$APP_BRANCH' branch in $TEST_REPO, using '$BASE_BRANCH '."
4766 fi
4867 else
4968 if git ls-remote --exit-code https://github.com/$TEST_REPO.git "refs/heads/$INPUT_BRANCH" >/dev/null 2>&1; then
You can’t perform that action at this time.
0 commit comments