Support non-force branch update strategy for protected automation branches #2

Closed
opened 2026-06-16 17:54:53 +00:00 by stephen · 0 comments
Owner

Why

The action always force-pushes the head branch when updating an existing PR. Some repos protect automation branches or require linear history without force updates.

Verified

  • MIGRATION.md says the branch update strategy is force-push and has no separate strategy input.
  • src/main.js update path works on the target branch and pushes, with no update-strategy option visible.
  • No existing create-pull-request-action issues are filed.

Build

  • Add an input for branch-update-strategy such as force, rebase, or fail-if-diverged.
  • Fail clearly when branch protection rejects the selected mode.
  • Add tests for existing PR update behavior.
## Why The action always force-pushes the head branch when updating an existing PR. Some repos protect automation branches or require linear history without force updates. ## Verified - `MIGRATION.md` says the branch update strategy is force-push and has no separate strategy input. - `src/main.js` update path works on the target branch and pushes, with no update-strategy option visible. - No existing create-pull-request-action issues are filed. ## Build - Add an input for `branch-update-strategy` such as `force`, `rebase`, or `fail-if-diverged`. - Fail clearly when branch protection rejects the selected mode. - Add tests for existing PR update behavior.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
rasterstate/create-pull-request-action#2
No description provided.