Skip to content

ci: Retarget PRs opened against main to dev - #39

Merged
hisenb3rg merged 1 commit into
devfrom
ci/retarget-main-prs
Sep 5, 2026
Merged

ci: Retarget PRs opened against main to dev#39
hisenb3rg merged 1 commit into
devfrom
ci/retarget-main-prs

Conversation

@hisenb3rg

Copy link
Copy Markdown
Collaborator

Summary

Adds a tiny workflow that fires when a PR is opened (or reopened/edited) with base main, retargets it to dev, and comments that all merges must go to dev (main is the stable release channel, fast-forwarded only by the release workflow). A dev → main PR can't be retargeted (base would equal head), so it just gets the explanatory comment.

Complements the "Protect main" ruleset (restrict updates), which already makes such PRs unmergeable — this adds the friendly UX on top.

Notes:

  • Uses pull_request_target so the token can edit fork PRs too; the PR's code is never checked out or executed.
  • pull_request_target runs the workflow from the default branch, so this activates once it reaches main with the next stable release.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@hisenb3rg
hisenb3rg merged commit 5b8fa52 into dev Sep 5, 2026
6 checks passed
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.

1 participant