Repository navigation
Conversation
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 Scan Summary
To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio. |
…25747] Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Ntnelbaba
left a comment
There was a problem hiding this comment.
Review
Re-checked at df341e32 (not from zero).
Still open:
- Medium —
fetchCoreReleaseVersionraw.githubusercontent fetch has no cache-bust (inline). - Low —
plugin_file/update_readmeoutputs are set before the PHP write succeeds (inline). - Low — no unit/integration test for
run()inupdate-version-files.ts.
plugin default core, plugin-config mapping, and throw-on-missing header/define behavior look good.
Comment-only; not approving.
| channel: ReleaseChannel, | ||
| ): Promise<string> { | ||
| const url = coreReleasePluginFileUrl(channel); | ||
| const response = await fetch(url); |
There was a problem hiding this comment.
fetch(url) against raw.githubusercontent.com has no cache-bust (Cache-Control, ?t=, or authenticated GitHub Contents API).
CDN/cache can return a stale elementor.php / Version: for Pro’s “Elementor tested up to”, so a release tag can bake an outdated Core version.
Suggestion: Add a cache-buster query param (e.g. run id / timestamp), send Cache-Control: no-cache, or read via the GitHub API / git checkout of release/<channel> instead of raw.
| console.log('Update readme', shouldUpdateReadme); | ||
| console.log('Update Elementor tested up to', shouldUpdateTestedUpTo); | ||
|
|
||
| setOutput('plugin_file', pluginFile); |
There was a problem hiding this comment.
✨ Low: plugin_file / update_readme are written to $GITHUB_OUTPUT before readFileSync / patchPhpVersion / writeFileSync.
If the patch fails afterward the step exits non-zero (so commit won’t run), but outputs are already emitted. Prefer setting those outputs only after a successful write.
Summary
Lets the
release-tag-creationaction release Elementor Pro as well as Core, selected by one new input.New input
plugin: core | pro(defaultcore). It replacesplugin_file,version_constant,update_readmeandupdate_elementor_tested_up_to. The mapping is inplugin-config.ts:plugincoreelementor.phpELEMENTOR_VERSIONproelementor-pro.phpELEMENTOR_PRO_VERSIONrelease/<channel>Pro "Elementor tested up to". The action fetches
elementor.phpfrom Core's matchingrelease/<channel>branch, reads itsVersion:and writes it asX.Y.Z, with any beta suffix removed (elementor-tested-up-to.ts).Shared utils (
version-files.ts).patchPhpVersiontakes the constant to update, typed asVersionConstant(ELEMENTOR_VERSIONorELEMENTOR_PRO_VERSION). A newpatchPhpHeaderFieldupdates any* Field: valueheader 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_fileandupdate_readmefrom the version-update step's outputs, not from inputs.Compatibility
plugindefaults tocore, which matches the old defaults (elementor.php,ELEMENTOR_VERSION, readme updated).plugin: pro. If it's forgotten, the run fails readingelementor.php, which doesn't exist in the Pro repo, before anything is committed or tagged.Testing
vitestinactions/release-tag-creationandpackages/editor-github-actions-utilspasses.tscandeslintare clean.✨ PR Description
1. Problem & Context
Support for releasing Elementor Pro via the
release-tag-creationaction ED-25747. The action now differentiates between 'core' and 'pro' plugins to apply specific version constants and handle the "Elementor tested up to" header for Pro.2. What Changed (Where)
elementor-tested-up-to.tsplugin-config.tsupdate-version-files.tsrun()to use dynamic plugin config and conditional header patching.action.ymlplugininput and updated outputs/commit logic to be plugin-aware.version-files.tspatchPhpHeaderFieldand parameterizedpatchPhpVersionfor custom constants.*.test.ts3. How It Works
Action reads$\rightarrow$ resolves config (file path/constant) $\rightarrow$ patches version in PHP $\rightarrow$ if Pro, fetches latest Core version via HTTP to update "Elementor tested up to" header $\rightarrow$ conditionally updates
INPUT_PLUGINreadme.txtfor Core.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