chore: upgrade repository scaffolding (step 1)#148
Closed
milindmore22 wants to merge 8 commits into
Closed
Conversation
milindmore22
force-pushed
the
migrate/scaffold
branch
from
July 3, 2026 05:58
f7a6b1a to
ceab152
Compare
milindmore22
marked this pull request as ready for review
July 3, 2026 06:53
Contributor
There was a problem hiding this comment.
Pull request overview
This PR performs Step 1 of a repo scaffolding migration, updating build/test tooling and CI/CD workflows to match newer project standards (WordPress scripts, modular reusable workflows, automated release/dependency/coverage plumbing), while keeping functional code changes minimal.
Changes:
- Introduces modular GitHub Actions CI (lint/test/build/e2e) plus release automation via release-please.
- Modernizes JS/PHP tooling configs (ESLint flat config, Jest, Playwright, TS config split, PHPCS ruleset, PHPStan/PHPUnit config).
- Adds/updates local dev + test scaffolding (wp-env variants, PHPUnit bootstrap/TestCase, Jest setup/mocks, test helper plugin).
Reviewed changes
Copilot reviewed 88 out of 98 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| webpack.config.js | Updates WP Scripts webpack integration and empty-script cleanup behavior. |
| uninstall.php | Formatting-only strict_types declaration style update. |
| tsconfig.json | Switches to base tsconfig + adjusts compiler options and include/exclude. |
| tsconfig.base.json | Adds shared TypeScript baseline config for the repo. |
| tests/phpunit/TestCase.php | Adds a shared WP_UnitTestCase base with PHPUnit 11.5 compatibility helpers. |
| tests/phpunit/bootstrap.php | Adds PHPUnit bootstrap for wp-phpunit + plugin activation. |
| tests/phpstan/stubs/wordpress-extended.php | Adds WP stubs to improve PHPStan analysis. |
| tests/js/tsconfig.json | Adds TS config for JS tests (extends root tsconfig). |
| tests/js/setup.ts | Adds Jest setup (fetch mock, globals, clipboard mock). |
| tests/js/mocks/@wordpress/api-fetch.ts | Adds a Jest mock for @wordpress/api-fetch. |
| tests/_data/plugins/localhost-helper.php | Adds a dev/test helper MU plugin for localhost URL rewriting in wp-env. |
| release-please-config.json | Adds release-please configuration for automated releases. |
| playwright.config.ts | Adds Playwright config extending WP Scripts defaults and routes artifacts. |
| phpunit.xml.dist | Updates PHPUnit config for newer schema and coverage output paths. |
| phpstan.neon.dist | Reworks PHPStan config structure and adds stub file wiring. |
| phpcs.xml.dist | Removes legacy PHPCS ruleset file (replaced by new one). |
| package.json | Updates scripts/deps for new tooling + WP Scripts workflow. |
| oneupdate.php | Updates plugin header/scaffolding and changes bootstrap/init behavior. |
| jest.config.js | Adds Jest config extending WP Scripts defaults with repo-specific settings. |
| inc/Modules/Settings/Settings.php | Minor formatting adjustment in constants section. |
| inc/Modules/Settings/Admin.php | Adds strict_types declaration near file top. |
| inc/Modules/Rest/Workflow_Controller.php | Adds strict_types + minor PHP 8+ null-coalescing cleanup. |
| inc/Modules/Rest/S3_Controller.php | Adds strict_types declaration near file top. |
| inc/Modules/Rest/Governing_Controller.php | Adds strict_types declaration near file top. |
| inc/Modules/Rest/GH_Pull_Request_Controller.php | Adds strict_types declaration near file top. |
| inc/Modules/Rest/Basic_Options_Controller.php | Adds strict_types declaration near file top. |
| inc/Modules/Rest/Abstract_REST_Controller.php | Minor whitespace/docblock cleanup. |
| inc/Modules/Plugin/VIP_Activation.php | Docblock cleanup (removes redundant @return). |
| inc/Modules/Plugin/Settings.php | Docblock cleanup (removes redundant @return). |
| inc/Modules/Plugin/S3.php | Docblock/whitespace cleanup. |
| inc/Modules/Plugin/Cache.php | Docblock cleanup (removes redundant @return). |
| inc/Modules/Plugin/Admin.php | Docblock cleanup (removes redundant @return). |
| inc/Modules/Jobs/Scheduler.php | Whitespace/docblock cleanup. |
| inc/Modules/Core/Rest.php | Whitespace/docblock cleanup. |
| inc/Modules/Core/DB.php | Adds strict_types declaration near file top. |
| inc/Modules/Core/Assets.php | Adds strict_types declaration near file top. |
| inc/Contracts/Interfaces/Registrable.php | Whitespace/docblock cleanup. |
| eslint.config.mjs | Adds ESLint flat config with WP + TS/Jest overrides. |
| composer.json | Updates Composer metadata, repos, dev tooling deps, and autoload config. |
| blueprint.json | Adds WP Playground blueprint for demo/preview setup. |
| babel.config.js | Minor formatting update to exported function signature. |
| assets/src/js/utils.ts | Adds import grouping comment for external dependency. |
| assets/src/components/SiteTable.tsx | Formatting/refactor for readability and lint compliance. |
| assets/src/components/SiteSettings.tsx | Formatting/refactor for readability and lint compliance. |
| assets/src/components/SiteModal.tsx | Formatting/refactor for readability and lint compliance. |
| assets/src/components/S3Credentials.tsx | Formatting/refactor for readability and lint compliance. |
| assets/src/components/PluginGrid.js | Formatting/refactor for readability and lint compliance. |
| assets/src/components/PluginCard.js | Formatting/refactor for readability and lint compliance. |
| assets/src/components/icons/View.js | JSX formatting for readability/lint compliance. |
| assets/src/components/icons/Merge.js | JSX formatting for readability/lint compliance. |
| assets/src/components/icons/Close.js | JSX formatting for readability/lint compliance. |
| assets/src/components/GitHubRepoToken.tsx | Formatting/refactor for readability and lint compliance. |
| assets/src/admin/settings/page.tsx | Formatting/refactor + minor typing cleanup. |
| assets/src/admin/settings/index.tsx | Adds import grouping comment for external dependency. |
| assets/src/admin/pull-requests/index.js | Formatting/refactor for readability and lint compliance. |
| assets/src/admin/onboarding/page.tsx | Formatting/refactor for readability and lint compliance. |
| assets/src/admin/onboarding/index.tsx | Adds import grouping comment for external dependency. |
| AGENTS.md | Adds agent-facing pointers and common wp-env commands. |
| actions/oneupdate-pr-creation.yml | Whitespace normalization in custom GH Action workflow script. |
| actions/oneupdate-pr-creation-private.yml | Whitespace normalization in custom GH Action workflow script. |
| .wp-env.test.json | Adds dedicated wp-env config for test runs. |
| .wp-env.json | Simplifies/modernizes wp-env config + adds helper plugin. |
| .wp-env.child.json | Adds secondary wp-env instance config. |
| .stylelintrc.json | Removes legacy Stylelint JSON config (replaced by JS config). |
| .stylelint.config.js | Adds Stylelint JS config extending WP defaults. |
| .release-please-manifest.json | Adds release-please manifest for version tracking. |
| .prettierrc.js | Adds Prettier config extending WP preset with overrides. |
| .prettierignore | Adds ignore patterns for build/vendor/test output and lockfiles. |
| .phpcs.xml.dist | Adds new PHPCS ruleset using rtCamp coding standards. |
| .lintstagedrc.mjs | Adds lint-staged configuration for pre-commit autofixes. |
| .lefthook.yml | Adds lefthook config stub (currently commented out). |
| .gitignore | Replaces gitignore with a more complete WordPress/tooling-focused set. |
| .github/workflows/test.yml | Removes legacy monolithic CI workflow. |
| .github/workflows/reusable-wp-playground-pr-preview.yml | Adds reusable workflow for WP Playground PR previews. |
| .github/workflows/reusable-phpunit.yml | Adds reusable PHPUnit workflow (matrix-ready, coverage-aware). |
| .github/workflows/reusable-phpstan.yml | Adds reusable PHPStan workflow with caching and PR annotations. |
| .github/workflows/reusable-phpcs.yml | Adds reusable PHPCS workflow with caching and PR annotations. |
| .github/workflows/reusable-lint-css-js.yml | Adds reusable JS/CSS lint workflow (eslint/stylelint/prettier/tsc). |
| .github/workflows/reusable-jest.yml | Adds reusable Jest workflow with Codecov upload. |
| .github/workflows/reusable-e2e.yml | Adds reusable Playwright E2E workflow. |
| .github/workflows/reusable-build.yml | Adds reusable build workflow producing a plugin zip artifact. |
| .github/workflows/release.yml | Switches to release-please driven release + artifact upload flow. |
| .github/workflows/README.md | Documents the new modular workflow architecture. |
| .github/workflows/pr-title.yml | Adds PR title conventional-commit enforcement workflow. |
| .github/workflows/copilot-setup-steps.yml | Adds/updates Copilot coding agent environment setup workflow. |
| .github/workflows/ci.yml | Adds new modular CI entrypoint workflow that fans out to reusables. |
| .github/PULL_REQUEST_TEMPLATE.md | Updates PR template structure and adds AI disclosure section. |
| .github/dependabot.yml | Updates dependabot grouping and schedules across ecosystems. |
| .github/.codecov.yml | Adds Codecov config for status checks + path fixes. |
| .gitattributes | Adds export-ignore rules for distribution + linguist hints. |
| .eslintrc.json | Removes legacy ESLint config (replaced by flat config). |
| .eslintignore | Removes legacy ESLint ignore file (handled via flat config ignores). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+70
to
73
| // Load the plugin. | ||
| if ( class_exists( '\OneUpdate\Main' ) ) { | ||
| \OneUpdate\Main::instance(); | ||
|
|
||
| //phpcs:ignore PluginCheck.CodeAnalysis.DiscouragedFunctions.load_plugin_textdomainFound -- @todo remove before submitting to .org. | ||
| load_plugin_textdomain( 'oneupdate', false, dirname( plugin_basename( __FILE__ ) ) . '/languages/' ); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This PR upgrades the repository scaffolding to the latest standards, introduces modular CI/CD workflows, automates dependency and coverage management, and modernizes project documentation and configurations.
Note: This PR exclusively handles Step 1 of the migration runbook. Subsequent runbook steps will be addressed in their own separate PRs.
Why
This update is necessary to align the repository with the latest best practices established by
plugin-skeleton-din oneSearch and replicating same in oneUpdate. By upgrading the repository files and adopting modernized automation, we significantly reduce future migration and maintenance times, enforce consistent code quality, and make the project easier to navigate and contribute to.Related Issue(s):
How
Following Step 1 of the migration runbook, the following implementation details were executed:
inc/andassets/src/) with the latest scaffold and meticulously reapplied plugin-specific configurations (ensuring properOneUpdate/oneupdatenomenclature).ci.yml(for conditional PHP, JS, CSS linting, and testing),pr-title.yml(to enforce Conventional Commits), andcopilot-setup-steps.yml.dependabot.ymlfor streamlined GitHub Actions, Composer, and NPM updates. Added a.codecov.ymlfile to manage coverage reporting..eslintrc.jsonand.eslintignorein favor of the new centralized CI configurations.npm run format,npm run lint:css:fix,npm run lint:js:fix, andnpm run lint:php:fixto address automatically resolvable code smells..gitattributesfile, an updated PR template, and a detailed README specifically for the new GitHub workflows.Testing Instructions
rm -rf package-lock.json composer.lock vendor node_modules.wp-env(e.g.,npm run wp-env:cli -- composer install).npm run formatnpm run lint:cssnpm run lint:jsnpm run lint:phppr-title.ymlenforces the Conventional Commit format.ci.ymljobs are properly triggered and running.Screenshots
N/A - This PR focuses on backend configuration, tooling, and CI/CD workflows.
Additional Info
Important Migration Context: This PR only fulfills Step 1: Upgrade the repo files. While autofixable lints were run, we are not manually remediating underlying code smells in this step. Any failing CI checks caused by pre-existing code smells or adoption of the new tooling are expected for now.
The remaining phases of the runbook will be tackled in separate, dedicated PRs:
Checklist