Skip to content

ci: support Pro in release-tag-creation action [ED-25747] - #60

Merged
davseve merged 8 commits into
mainfrom
ci/ED-25747-release-tag-creation-pro
Oct 8, 2026
Merged

davseve merged 8 commits into
mainfrom
ci/ED-25747-release-tag-creation-pro

Conversation

@davseve

@davseve davseve commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Lets the release-tag-creation action release Elementor Pro as well as Core, selected by one new input.

  • New input plugin: core | pro (default core). It replaces plugin_file, version_constant, update_readme and update_elementor_tested_up_to. The mapping is in plugin-config.ts:

    plugin Plugin file Version constant readme.txt "Elementor tested up to"
    core elementor.php ELEMENTOR_VERSION updated not touched
    pro elementor-pro.php ELEMENTOR_PRO_VERSION not touched set from Core release/<channel>
  • Pro "Elementor tested up to". The action fetches elementor.php from Core's matching release/<channel> branch, reads its Version: and writes it as X.Y.Z, with any beta suffix removed (elementor-tested-up-to.ts).

  • Shared utils (version-files.ts). patchPhpVersion takes the constant to update, typed as VersionConstant (ELEMENTOR_VERSION or ELEMENTOR_PRO_VERSION). A new patchPhpHeaderField updates any * Field: value header line. Both now throw if the expected line is missing, instead of silently committing an unchanged file.

  • The commit step and the job summary now read plugin_file and update_readme from the version-update step's outputs, not from inputs.

Compatibility

  • Core: no change needed. Core's workflow doesn't pass the old inputs, and plugin defaults to core, which matches the old defaults (elementor.php, ELEMENTOR_VERSION, readme updated).
  • Pro: must pass plugin: pro. If it's forgotten, the run fails reading elementor.php, which doesn't exist in the Pro repo, before anything is committed or tagged.

Testing

  • vitest in actions/release-tag-creation and packages/editor-github-actions-utils passes.
  • tsc and eslint are clean.
  • Not yet run end to end in a workflow.

✨ PR Description

1. Problem & Context

Extends the release-tag-creation action to support Elementor Pro ED-25747. This enables automated version bumping for Pro and synchronizes the "Elementor tested up to" header with the latest Core release version.

2. What Changed (Where)

File Change
elementor-tested-up-to.ts New logic to fetch and sanitize Core versions via GitHub API.
plugin-config.ts Configuration mapping for 'core' vs 'pro' plugins.
update-version-files.ts Refactored run() to handle dynamic plugin config and header patching.
version-files.ts Generic PHP header and constant patching utilities in @elementor/editor-github-actions-utils.
action.yml Added plugin and github_token inputs; updated outputs and commit logic.
*.test.ts Comprehensive test coverage for new utilities and the main execution loop.

3. How It Works

The action now accepts a plugin input ('core' or 'pro'). For 'pro', it fetches the current version of the specified Core channel (stable/beta) using the GitHub Contents API, strips pre-release tags via semver, and patches both the ELEMENTOR_PRO_VERSION constant and the "Elementor tested up to" header in elementor-pro.php.

4. Risks

API rate limits on Core version fetching; mitigated by the optional github_token input.

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

Replace plugin_file, version_constant, update_readme and update_elementor_tested_up_to with a single required plugin input (core | pro). Pro bumps elementor-pro.php / ELEMENTOR_PRO_VERSION and sets the "Elementor tested up to" header from Core release/<channel>; Core keeps bumping elementor.php and readme.txt.

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

wiz-9a149474ff Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 4 Medium
Software Management Finding Software Management Findings -
Total 4 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

davseve and others added 3 commits October 6, 2026 14:51
…25747]

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
max-zu
max-zu previously approved these changes Oct 6, 2026
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>

@Ntnelbaba Ntnelbaba 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.

Review

Re-checked at df341e32 (not from zero).

Still open:

  1. Medium — fetchCoreReleaseVersion raw.githubusercontent fetch has no cache-bust (inline).
  2. Low — plugin_file / update_readme outputs are set before the PHP write succeeds (inline).
  3. Low — no unit/integration test for run() in update-version-files.ts.

plugin default core, plugin-config mapping, and throw-on-missing header/define behavior look good.

Comment-only; not approving.

Comment thread actions/release-tag-creation/elementor-tested-up-to.ts Outdated
Comment thread actions/release-tag-creation/update-version-files.ts Outdated
…ut after file writes, add tests [ED-25747]

Co-authored-by: Davids Seveloff <davseve@users.noreply.github.com>
…oduction risk [ED-25747]

Co-authored-by: Davids Seveloff <davseve@users.noreply.github.com>
@davseve
davseve requested a review from Ntnelbaba October 8, 2026 09:09
@davseve
davseve enabled auto-merge (squash) October 8, 2026 09:10
maintain_email:
required: true
description: 'Git user.email for the version-bump commit.'
plugin:

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.

And if the value is "koko"?

@Ntnelbaba
Ntnelbaba disabled auto-merge October 8, 2026 09:18
@davseve
davseve merged commit c9eb200 into main Oct 8, 2026
19 checks passed
@davseve
davseve deleted the ci/ED-25747-release-tag-creation-pro branch October 8, 2026 09:34
davseve added a commit that referenced this pull request Oct 11, 2026
Address code review comment from PR #60: validate the plugin input
('core' or 'pro') in the 'Handle version input' step before any git
branch operations occur. This ensures invalid plugin values like 'koko'
fail fast with a clear error message, preventing wasted work and
avoiding branch checkout mutations.

Changes:
- Import and call resolvePluginConfig() at the start of main.ts run()
- Add INPUT_PLUGIN env var to 'Handle version input' step in action.yml
- Add getPlugin() helper to read INPUT_PLUGIN (defaults to 'core')
- Add unit tests for plugin validation behavior
- Extend plugin-config.test.ts to explicitly test 'koko' case

Ref: #60

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Davids Seveloff <davseve@users.noreply.github.com>
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.

4 participants