Skip to content

Select plugin version#345

Open
sandyfzu wants to merge 9 commits into
developfrom
select-version-prototype
Open

Select plugin version#345
sandyfzu wants to merge 9 commits into
developfrom
select-version-prototype

Conversation

@sandyfzu

@sandyfzu sandyfzu commented Mar 3, 2026

Copy link
Copy Markdown
Member

Description

Fixes #6 and #315

This code uses https://github.com/wp-media/automation-plugin-version-manager to build plugins from Git refs (tags, branches, and commits) and Github refs (PRs and releases). The repo is written in safe Rust but exposed to NodeJS JavaScript/TypeScript through napi.rs leveraging Rust safety from NodeJS with all TypeScript types defined.

To test this, just try the following:
(Make sure to do npm i just after checking out to this branch for dependencies to be installed)

For WP Rocket:

E2E_WPR_PREV_REF=v3.20.4 E2E_WPR_NEW_REF=v3.20.5 npm run test:e2e

For BackWPup:

E2E_BWPUP_REF=develop npm run test:bwpup

Passing existing Git tags to the environment variables.

For private repositories like BackWPup, the method createWithTokenResolution will attempt to resolve any git/github authentication in the environment (SSH keys, Github tokens, etc)

Recording: https://jmp.sh/rjkYUTaF

Type of change

  • New feature (non-breaking change which adds functionality).
  • Bug fix (non-breaking change which fixes an issue).
  • Enhancement (non-breaking change which improves an existing functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as before).
  • Sub-task of #(issue number)
  • Chore
  • Release

Detailed scenario

What was tested

Plugin building before E2E test.

How to test

Pass any gitref or GitHub ref to the environment variables (tags, branches, commits, or PR numbers), the tool will build the plugins from there:

For WP Rocket:

E2E_WPR_PREV_REF=v3.20.4 E2E_WPR_NEW_REF=v3.20.5 npm run test:e2e

For BackWPup:

E2E_BWPUP_REF=develop npm run test:bwpup

Affected Features & Quality Assurance Scope

N/A

Technical description

Documentation

Used APVM in a BeforeAll hook.

New dependencies

    "apvm-napi": "github:wp-media/automation-plugin-version-manager#cli/v2.0.1",

Risks

N/A

Mandatory Checklist

Code validation

N/A

Code style

N/A

Unticked items justification

N/A

@sandyfzu sandyfzu requested review from a team March 3, 2026 15:52
@sandyfzu sandyfzu self-assigned this Mar 3, 2026
Copilot AI review requested due to automatic review settings March 3, 2026 15:52
@sandyfzu sandyfzu added the enhancement New feature or request label Mar 3, 2026

This comment was marked as outdated.

@Mai-Saad

Mai-Saad commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Comment thread src/support/hooks.ts Outdated
@sandyfzu sandyfzu changed the title Select plugin version prototype (Not meant to be merged) Select plugin version prototype May 19, 2026
@sandyfzu sandyfzu changed the title Select plugin version prototype Select plugin versio May 19, 2026
@sandyfzu sandyfzu requested a review from Copilot May 19, 2026 17:52

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.

Comment thread utils/plugin-builder.ts
Comment thread package.json Outdated

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

Comment thread utils/plugin-builder.ts Outdated

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

Comment thread utils/plugin-builder.ts
@sandyfzu sandyfzu requested a review from jeawhanlee May 19, 2026 18:26
@sandyfzu sandyfzu changed the title Select plugin versio Select plugin version May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

As a QA engineer, I want the plugin versions to be automatically handled so that I can easily run tests on a selected version

4 participants