Skip to content

ci: guard master against non-develop source branches#8

Merged
tkgstrator merged 1 commit into
developfrom
ci/guard-master-source-branch
Jun 23, 2026
Merged

ci: guard master against non-develop source branches#8
tkgstrator merged 1 commit into
developfrom
ci/guard-master-source-branch

Conversation

@tkgstrator

Copy link
Copy Markdown
Contributor

Adds a guard job that fails any PR targeting master whose head branch is not develop, enforcing the feature → develop → master flow at CI level.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 23, 2026 16:47
@tkgstrator
tkgstrator merged commit d86756b into develop Jun 23, 2026
4 checks passed
@tkgstrator
tkgstrator deleted the ci/guard-master-source-branch branch June 23, 2026 16:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a CI guard in the existing integration GitHub Actions workflow to enforce the repo’s intended promotion flow by failing PRs that target master unless they originate from develop.

Changes:

  • Introduces a new guard-source-branch job that runs on pull_request events targeting master
  • Fails the workflow early when the PR head branch is not develop

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +21 to +29
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants