Skip to content

ci: add PR target branch check workflow#573

Merged
belleklaviyo merged 6 commits intomasterfrom
ci/pr-target-check
May 6, 2026
Merged

ci: add PR target branch check workflow#573
belleklaviyo merged 6 commits intomasterfrom
ci/pr-target-check

Conversation

@belleklaviyo
Copy link
Copy Markdown
Contributor

Summary

Adds a required status check that enforces our branching strategy: only rel/* and ci/* branches may open PRs against master.

  • PRs from any other branch (hotfixes, dependabot, personal, feat) are blocked from merging and receive a one-time comment explaining how to retarget to the appropriate rel/* branch
  • ci/* branches pass through freely (internal tooling doesn't need a release)
  • Comment deduplication: the workflow checks for an existing marker comment before posting, so retargeting an already-commented PR won't spam it

Related

Part of the SDK branch guardrails work. Companion PR for klaviyo-android-sdk is also open.

Test plan

Adds a required status check that blocks PRs targeting master from
any branch that isn't rel/* or ci/*. Posts a one-time comment on
blocked PRs explaining how to retarget.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
belleklaviyo and others added 4 commits May 6, 2026 11:13
Remove label automatically when PR is retargeted to rel/* or ci/*.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@belleklaviyo belleklaviyo marked this pull request as ready for review May 6, 2026 15:48
@belleklaviyo belleklaviyo requested a review from a team as a code owner May 6, 2026 15:48
@klaviyoit klaviyoit requested a review from ndurell May 6, 2026 15:49
@ndurell
Copy link
Copy Markdown
Contributor

ndurell commented May 6, 2026

should we update AGENTS.md so agents open prs against some release branch?

@belleklaviyo
Copy link
Copy Markdown
Contributor Author

@ndurell good point, adding that

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@belleklaviyo belleklaviyo merged commit 313b403 into master May 6, 2026
15 of 18 checks passed
@belleklaviyo belleklaviyo deleted the ci/pr-target-check branch May 6, 2026 18:12
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.

3 participants