From 2739bb121ce1d6b4210291415f6ee194a919863c Mon Sep 17 00:00:00 2001 From: tkgstrator Date: Tue, 23 Jun 2026 16:47:49 +0000 Subject: [PATCH] ci: guard master against non-develop source branches Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/integration.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/integration.yaml b/.github/workflows/integration.yaml index c95d6e0..51bfe19 100644 --- a/.github/workflows/integration.yaml +++ b/.github/workflows/integration.yaml @@ -16,6 +16,18 @@ env: IOS_SDK_VERSION: "16.5" jobs: + guard-source-branch: + name: Guard master source branch + if: github.event_name == 'pull_request' && github.base_ref == 'master' + runs-on: ubuntu-latest + steps: + - name: Reject non-develop source for master PRs + run: | + if [ "${{ github.head_ref }}" != "develop" ]; then + echo "::error::PRs to master must come from the develop branch (got: ${{ github.head_ref }})" + exit 1 + fi + commitlint: name: Commit Lint if: github.event.action != 'closed' || github.event.pull_request.merged != true