Skip to content

feat: add force-push-beta-to-stable action [ED-26219] - #67

Merged
davseve merged 1 commit into
mainfrom
ED-26219-force-push-beta-to-stable
Nov 9, 2026
Merged

davseve merged 1 commit into
mainfrom
ED-26219-force-push-beta-to-stable

Conversation

@davseve

@davseve davseve commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Composite action that force pushes release/beta onto release/stable (with lease) and lists the PRs in release/stable that are not in release/beta in the job summary and the prs / count / rollback-sha outputs. Commits whose patch is already in beta are skipped, and cherry-picks of PRs that are in beta are flagged. Dry run is the default.

Jira: ED-26219

Made with Cursor

✨ PR Description

1. Problem & Context

Implements ED-26219 to synchronize release/stable with release/beta via force-push, automating the replacement of the stable branch while auditing lost commits.

2. What Changed (Where)

File Change
action.yml Defines composite action inputs, outputs, and execution step.
force-push-beta-to-stable.sh Main logic for branch validation, force-pushing, and summary generation.
list-stable-only-prs.sh Git logic to identify and describe commits present only in stable.
force-push-beta-to-stable.test.sh Integration tests using a mock git repository.
package.json Action metadata and test script definition.

3. How It Works

The action fetches both branches, identifies commits in the target not present in the source (filtering cherry-picks), and outputs a JSON list of dropped PRs. If dry-run is false, it executes git push --force-with-lease to overwrite the target branch and prints a rollback command in the GitHub Job Summary.

4. Risks

  • Data Loss: Force-pushing permanently drops commits unique to release/stable. Mitigated by force-with-lease and providing a specific rollback SHA in the summary.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

Co-authored-by: Cursor <cursoragent@cursor.com>

@Svitlana-Dykun Svitlana-Dykun left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A few things before this is run for real:

  1. Dry run fails open. force-push-beta-to-stable.sh only skips the push when DRY_RUN is exactly "true", so "True", "yes" or "1" force-push release/stable. The Core and Pro triggers pass a boolean, so they're fine today, but since this is a shared action, please push only on an exact "false" and fail on anything else.

  2. No guard against a stale beta. If it runs when release/beta is older than release/stable (for example between cycles), stable goes back in time, and the only safeguard is the person approving in release-owners. Suggest reading the plugin version from both branches and refusing to push when beta's is lower.

Minor:

  • Only Cherry-pick PR N titles are recognised as cherry-picks. CP - … titles (e.g. elementor/elementor#37660) aren't.
  • The prs output includes cherry-picks of PRs that are already in beta (the test expects [301,400]), so anything reading it counts them as lost. Maybe exclude them, or add a second output.
  • fetch-depth: 0 is documented but not checked. A git rev-parse --is-shallow-repository guard would catch a shallow checkout.
  • The description still says "Made with Cursor".

@davseve
davseve merged commit 1c4a0e1 into main Nov 9, 2026
18 of 19 checks passed
@davseve
davseve deleted the ED-26219-force-push-beta-to-stable branch November 9, 2026 11:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants