-
Notifications
You must be signed in to change notification settings - Fork 1
Implement typical WordPress block structure following official documentation #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
…tion Co-authored-by: ashleyshaw <1805352+ashleyshaw@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implementing a Typical Block Structure in WordPress
Implement typical WordPress block structure following official documentation
Sep 17, 2025
Copilot stopped work on behalf of
ashleyshaw due to an error
September 17, 2025 14:49
Signed-off-by: Ash Shaw <ashley@lightspeedwp.agency>
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
ashleyshaw
pushed a commit
that referenced
this pull request
Nov 17, 2025
Implements all critical release automation components to fix blocking issues. ## Changes ### Release Agent (✅ Implemented) - Implement `.github/agents/release.agent.cjs` - Complete release automation - Validates VERSION and CHANGELOG.md - Bumps semantic versions (major/minor/patch) - Updates changelog with release date - Creates git tags - Publishes GitHub releases - Supports dry-run mode for testing - Handles both GitHub Actions and standalone execution ### Validation Scripts (✅ Implemented) - Implement `scripts/validate-version.cjs` - Semantic version validation - Validates VERSION file format - Parses version components (major.minor.patch[-prerelease][+build]) - Comprehensive error reporting - Implement `scripts/validate-changelog.cjs` - Changelog validation - Validates Keep a Changelog format - Checks version and date formats - Validates section structure - Reports detailed errors ### Utilities (✅ Implemented) - Implement `.github/agents/includes/changelogUtils.cjs` - Changelog parser - Parses Keep a Changelog format - Validates changelog structure - Extracts releases and sections - CLI tool with --validate, --parse, --latest, --unreleased modes ### Schemas (✅ Created) - Create `automation/schemas/changelog.schema.json` - Changelog validation - Create `automation/schemas/version.schema.json` - Version validation - Create `automation/schemas/frontmatter.schema.json` - Frontmatter validation ### Workflow Updates (✅ Updated) - Update `.github/workflows/release.yml` - Enable release agent - Update `.github/workflows/release-prep.yml` - Fix script references - Update `.github/workflows/changelog.yml` - Enable validation, add Node setup ## Issues Resolved - ✅ Critical Issue #1: Release agent not implemented (was placeholder) - ✅ Critical Issue #2: validate-changelog.js was placeholder (exit code 1) - ✅ Critical Issue #3: validate-version.js was empty - ✅ Critical Issue #4: changelogUtils.js missing - ✅ Critical Issue #5: Schema files missing ## Testing All components tested and working: - ✅ validate-version.cjs validates current VERSION file - ✅ validate-changelog.cjs validates current CHANGELOG.md - ✅ changelogUtils.cjs parses and validates changelog - ✅ release.agent.cjs runs successfully in dry-run mode ## Notes - All scripts renamed from .js to .cjs for CommonJS compatibility - Package.json contains "type": "module", so .cjs extension required - Release agent supports --scope=major|minor|patch and --dry-run flags - Follows LightSpeed coding standards and documentation requirements Refs: G-1, G-2 (release agent and changelog utils implementation)
ashleyshaw
pushed a commit
that referenced
this pull request
Nov 17, 2025
Completes the remaining medium-priority items from the release agent review. Adds PR automation, Release Notes Manager agent, and comprehensive scope parameter documentation. ## Changes ### 1. PR Automation for release-prep.yml (✅ Complete) **Created: `scripts/create-release-pr.cjs`** - Automatically creates release PRs from develop to main - Computes next version based on merged PR labels - Updates VERSION and CHANGELOG.md files - Creates release branch (release/vX.Y.Z) - Generates comprehensive PR description with: - Changelog summary - Release checklist - Version bump information - Uses gh CLI for PR creation **Updated: `.github/workflows/release-prep.yml`** - Added "Create Release PR" step - Calls create-release-pr.cjs script - Passes GITHUB_TOKEN for authentication - Removes TODO comment (now implemented) **Features:** - Validates unreleased changes exist before creating PR - Detects if release branch already exists - Computes semantic version bumps (major/minor/patch) - Commits and pushes changes automatically - Comprehensive error handling and logging ### 2. Release Notes Manager Agent (✅ Complete) **Created: `.github/agents/release-notes-manager.agent.cjs`** Comprehensive release notes generation agent that: - Compiles clean release notes from changelog - Generates highlights from key sections (Added, Changed, Security) - Detects and flags breaking changes automatically - Lists contributors with PR counts - Groups changes by type with emojis (✨ Added, 🐛 Fixed, etc.) - Formats output suitable for GitHub releases - Includes installation instructions - Links to full changelog comparison **CLI Usage:** ```bash # Generate notes for specific version node .github/agents/release-notes-manager.agent.cjs --version=1.0.0 # Generate notes for latest version node .github/agents/release-notes-manager.agent.cjs --latest # Output to file node .github/agents/release-notes-manager.agent.cjs --version=1.0.0 --output=RELEASE_NOTES.md ``` **Features:** - ✅ Highlights (top 5 important changes) - ✅ Breaking changes detection and warnings - ✅ Grouped sections with emojis - ✅ Contributor attribution - ✅ Installation instructions - ✅ Full changelog links - ✅ Graceful error handling for missing tags **Implements spec:** `.github/agents/TODO/release-notes-manager.agents.md` ### 3. Scope Parameter Documentation (✅ Complete) **Created: `docs/RELEASE-SCOPE-GUIDE.md`** Comprehensive 400+ line guide covering: **Overview:** - What the --scope parameter does - Semantic versioning primer - How it affects version bumping **Detailed Sections:** - When to use each scope (patch/minor/major) - Real-world examples for each scope type - Decision flowchart for scope selection - Release label system integration **Examples:** - Bug fix release (patch) - New feature release (minor) - Breaking change release (major) - Dry-run testing examples **Best Practices:** - Validation before release - Documentation requirements - Testing procedures - Communication guidelines **FAQ:** - Common questions and answers - Edge cases and troubleshooting - Pre-release versions - Reverting releases - Monorepo considerations **Related Documentation:** - Links to release process guide - Agent specifications - External SemVer reference - Support channels ## Testing All components tested and working: ✅ **create-release-pr.cjs** - Script executes without errors - Validates unreleased changes - Handles missing tags gracefully ✅ **release-notes-manager.agent.cjs** - Generates comprehensive release notes for 0.1.0 - Handles missing git tags gracefully - Formats output with proper markdown - Includes highlights, breaking changes, grouped sections - Lists contributors (when available) ✅ **RELEASE-SCOPE-GUIDE.md** - Well-structured and comprehensive - Clear examples and use cases - Proper YAML frontmatter - Links to related documentation ## Benefits 1. **Automated PR Creation** - Reduces manual work for maintainers - Ensures consistent PR format - Validates changelog before PR creation - Integrates with existing workflows 2. **Professional Release Notes** - User-friendly format - Highlights key changes - Warns about breaking changes - Credits contributors 3. **Clear Documentation** - Removes ambiguity about version bumping - Provides decision framework - Real-world examples - Answers common questions ## Standards Compliance - ✅ UK English throughout - ✅ LightSpeed coding standards - ✅ Comprehensive JSDoc comments - ✅ YAML frontmatter in documentation - ✅ Error handling and logging - ✅ CommonJS compatibility (.cjs extension) ## Related Issues - Addresses medium-priority item #1: PR automation - Addresses medium-priority item #2: Release Notes Manager - Addresses medium-priority item #3: Scope documentation - Completes TODO in release-prep.yml (line 25) ## Next Steps The release automation is now feature-complete for MVP: - ✅ All critical issues resolved - ✅ All medium-priority items completed - ⏳ Low-priority polish items remain (optional) --- **Dependencies:** Requires .cjs scripts from previous commit **Breaking Changes:** None **Migration Required:** None
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.
This PR implements a comprehensive WordPress block structure that follows the WordPress Block Editor documentation and adheres to LightSpeed coding standards.
What's Included
Complete Block Example (
examples/example-block/)block.json- Modern block configuration using API version 3 with support for colors, typography, and spacingedit.jsandsave.jscomponents following WordPress best practicesBlock Patterns (
examples/patterns/)Both patterns use theme.json variables for consistency and include proper pattern headers for discoverability.
Key Features
WordPress Standards Compliance:
LightSpeed Standards:
Developer Experience:
npm start)npm run build)Usage
Developers can use this as a template for creating new WordPress blocks:
The implementation demonstrates modern WordPress development practices while maintaining compatibility with LightSpeed's organizational standards and workflows.
Created from VS Code via the GitHub Pull Request extension.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.