Skip to content

feat: two step release tag creation [ED-24451] - #41

Merged
Ntnelbaba merged 42 commits into
mainfrom
ED-24451
Jul 15, 2026
Merged

feat: two step release tag creation [ED-24451]#41
Ntnelbaba merged 42 commits into
mainfrom
ED-24451

Conversation

@davseve

@davseve davseve commented Jun 24, 2026

Copy link
Copy Markdown
Member

No description provided.

@davseve
davseve requested a review from asafdl June 24, 2026 12:25
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread actions/release-tag-creation/action.yml Outdated
Comment thread actions/release-tag-creation/main.ts Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
@davseve
davseve requested a review from Ntnelbaba June 25, 2026 09:28
@wiz-9a149474ff

wiz-9a149474ff Bot commented Jul 5, 2026

Copy link
Copy Markdown

Wiz Scan Summary

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

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

Comment thread actions/release-tag-creation/action.yml Outdated
Comment thread actions/release-tag-creation/main.ts
Comment thread actions/release-tag-creation/main.ts Outdated
Comment thread actions/release-tag-creation/main.ts Outdated
Comment thread actions/release-tag-creation/action.yml Outdated
Comment thread actions/release-tag-creation/action.yml Outdated
Comment thread actions/release-tag-creation/action.yml Fixed
davseve and others added 2 commits July 8, 2026 21:40
- action.yml: move all ${{ expr }} references out of inline shell scripts
  into env: vars so they are never interpolated by the shell
- main.ts: replace execSync with interpolated string with spawnSync
  and an args array to prevent command injection via INPUT_VERSION

Ref: ED-24451
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread actions/release-tag-creation/action.yml Fixed
Comment thread actions/release-tag-creation/action.yml Fixed
@davseve
davseve requested review from Ntnelbaba and Copilot and removed request for asafdl July 9, 2026 05:13

Copilot AI 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.

Pull request overview

Adds a new “two-step” release tag creation flow by introducing a dedicated GitHub Action and shared utilities for patching version-related files, along with a CI test pipeline to validate the behavior.

Changes:

  • Introduces actions/release-tag-creation action (validation, tag derivation, version-file updates) plus tests.
  • Adds version-file patching/tag-parsing helpers to @elementor/editor-github-actions-utils with Vitest coverage.
  • Adds a test Turbo task and a PR workflow test job; adjusts TS config and Node engine requirements.

Reviewed changes

Copilot reviewed 14 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
turbo.json Adds a test task to the Turbo pipeline.
tsconfig.json Enables importing .ts extensions (affects module resolution/typecheck).
packages/editor-github-actions-utils/src/version-files.ts Adds helpers for patching version markers and parsing latest tags from ls-remote.
packages/editor-github-actions-utils/src/version-files.test.ts Adds Vitest coverage for the new utils helpers.
packages/editor-github-actions-utils/src/index.ts Re-exports the new version-files module.
packages/editor-github-actions-utils/package.json Adds Vitest scripts/dependency for the utils package tests.
package.json Adds root test script and bumps Node engine requirement.
package-lock.json Updates lockfile for new workspace/package dependencies and version bumps.
actions/trickle-down-changelog/main.ts Tweaks PR message formatting (removes v prefix).
actions/release-tag-creation/update-version-files.ts Implements readme/elementor.php patching + output capture for the action.
actions/release-tag-creation/package.json Adds the new action package manifest and Vitest config.
actions/release-tag-creation/main.ts Implements version input parsing/validation and derives channel/branch/companion tag.
actions/release-tag-creation/current-version-validation.ts Implements “next version” validation based on remote tags.
actions/release-tag-creation/current-version-validation.test.ts Adds unit tests for “next version” validation.
actions/release-tag-creation/action.yml Defines the composite action steps (install, validate, patch, commit, tag).
.github/workflows/pr.yml Adds a dedicated test job to PR checks.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread actions/release-tag-creation/action.yml Outdated
Comment on lines +45 to +52
- name: Handle version input
id: handle-version-input
shell: bash
env:
INPUT_VERSION: ${{ inputs.version }}
ACTION_PATH: ${{ github.action_path }}
run: node "$ACTION_PATH/main.ts"

Comment thread actions/release-tag-creation/package.json
Comment thread package.json
Comment on lines +53 to +71
const tags = lsRemoteOutput
.split('\n')
.map((line) => line.split('\t')[1] ?? '')
.map((ref) => ref.replace(/^refs\/tags\/v?/, ''))
.filter((tag) => pattern.test(tag))
.sort((a, b) => {
// Semantic version sort: split on dots and numeric pre-release parts
const toparts = (v: string) =>
v.split(/[.\-]/).map((p) => (isNaN(Number(p)) ? p : Number(p)));
const ap = toparts(a);
const bp = toparts(b);
for (let i = 0; i < Math.max(ap.length, bp.length); i++) {
const ai = ap[i] ?? 0;
const bi = bp[i] ?? 0;
if (ai < bi) return -1;
if (ai > bi) return 1;
}
return 0;
});

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.

See if this is valid as well

Comment thread actions/release-tag-creation/current-version-validation.ts
cursoragent and others added 2 commits July 9, 2026 05:21
Apply Prettier formatting to release-tag-creation files and version-files
utilities. Remove unnecessary regex escape in version-files.ts. Activate
Elementor plugin in setup-elementor-env instead of only validating it,
fixing the Performance flow CI job where wp-env installs but does not
auto-activate plugins.

Ref: ED-24451

Co-authored-by: Netanel Baba <Ntnelbaba@users.noreply.github.com>
Latest Elementor from wordpress.org requires WordPress 6.8 minimum.
Update the Test Actions workflow to match.

Ref: ED-24451

Co-authored-by: Netanel Baba <Ntnelbaba@users.noreply.github.com>
Comment thread package.json
Comment on lines +53 to +71
const tags = lsRemoteOutput
.split('\n')
.map((line) => line.split('\t')[1] ?? '')
.map((ref) => ref.replace(/^refs\/tags\/v?/, ''))
.filter((tag) => pattern.test(tag))
.sort((a, b) => {
// Semantic version sort: split on dots and numeric pre-release parts
const toparts = (v: string) =>
v.split(/[.\-]/).map((p) => (isNaN(Number(p)) ? p : Number(p)));
const ap = toparts(a);
const bp = toparts(b);
for (let i = 0; i < Math.max(ap.length, bp.length); i++) {
const ai = ap[i] ?? 0;
const bi = bp[i] ?? 0;
if (ai < bi) return -1;
if (ai > bi) return 1;
}
return 0;
});

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.

See if this is valid as well

Comment thread packages/editor-github-actions-utils/src/version-files.ts
Comment thread .github/workflows/pr.yml
const channel = getEnv('INPUT_CHANNEL');
const companionTag = getEnv('INPUT_COMPANION_TAG');

// ── elementor.php ────────────────────────────────────────────────────────

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.

if exists or if pro exists

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We will handle pro in a seperate PR

@@ -0,0 +1,93 @@
import { readFileSync, writeFileSync, appendFileSync } from 'node:fs';

function patchPhpVersion(content: string, version: string): string {

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.

I saw this function already 🫨

Comment thread actions/release-tag-creation/package.json
@Ntnelbaba
Ntnelbaba self-requested a review July 15, 2026 07:48
Ntnelbaba
Ntnelbaba previously approved these changes Jul 15, 2026
@Ntnelbaba
Ntnelbaba marked this pull request as ready for review July 15, 2026 07:55
davseve and others added 2 commits July 15, 2026 11:10
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@Ntnelbaba
Ntnelbaba merged commit 5fe795a into main Jul 15, 2026
15 checks passed
@Ntnelbaba
Ntnelbaba deleted the ED-24451 branch July 15, 2026 08:17
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.

5 participants