Skip to content

fix: enhance README and GitHub workflows for clarity and functionality#1

Merged
soderlind merged 1 commit intomainfrom
update
Mar 9, 2026
Merged

fix: enhance README and GitHub workflows for clarity and functionality#1
soderlind merged 1 commit intomainfrom
update

Conversation

@soderlind
Copy link
Copy Markdown
Owner

This pull request introduces a major refactor and modernization of the WordPress GitHub plugin updater, focusing on a clearer API, improved documentation, and robust workflow automation. The most significant changes are the introduction of a canonical static API (GitHubUpdater::init), a streamlined and more informative README.md, enhanced error handling, and improved GitHub Actions workflows for building release assets.

Key changes include:

API Modernization & Code Refactor

  • Introduced a new GitHubUpdater class with a static init method as the canonical API for plugin update registration, deferring initialization safely to the WordPress init hook and improving error handling and type safety. The legacy GitHub_Plugin_Updater is now a wrapper for backward compatibility. (class-github-plugin-updater.php)
  • Refactored the legacy updater to delegate to the new static API, improved type casting for configuration parameters, and removed redundant setup logic. (class-github-plugin-updater.php)
  • Added a guard to prevent direct file access by checking ABSPATH. (class-github-plugin-updater.php)

Documentation Overhaul

  • Completely rewrote README.md for clarity: emphasizes the new static API, provides concise setup instructions, details requirements and troubleshooting, and documents workflow integration for release assets. Also clarifies backward compatibility and best practices. (README.md)

Workflow Improvements

  • Updated the release workflow (on-release-add.zip.yml) to use a parameterized plugin zip name, optimized Composer install, and added a verification step to ensure the required dependency is included in the zip. (on-release-add.zip.yml)
  • Added a new manual workflow (manually-build-zip.yml) for building and releasing plugin zips on demand for a specific tag, mirroring the improvements in the release workflow. (manually-build-zip.yml)

…y; update features, requirements, and usage examples; add manual build workflow and improve release zip verification
@soderlind soderlind merged commit 4e7ec43 into main Mar 9, 2026
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.

1 participant