-
Notifications
You must be signed in to change notification settings - Fork 1
v1.10.0 #695
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
Open
aristath
wants to merge
371
commits into
main
Choose a base branch
from
develop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+22,221
−5,746
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
Contributor
|
Test on Playground |
The file-level coverage changes (new files, improved, degraded) are now wrapped in a <details> element to keep the PR comment concise by default. The summary shows the total number of files with changes, and users can expand to see the full breakdown. Example: "📊 File-level Coverage Changes (42 files)" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
PHPUnit outputs class names and coverage stats on separate lines: - Line 1: "Progress_Planner\Activity" - Line 2: " Methods: 55.56% ( 5/ 9) Lines: 91.92% ( 91/ 99)" The previous grep approach was only capturing the stats line without the class name, resulting in empty coverage comparisons. The fix uses awk to: 1. Capture lines starting with class names (^[A-Za-z_]) 2. Look for the following stats line 3. Combine them into a single line for parsing 4. Strip ANSI color codes from both parts This enables the Python comparison script to properly parse class names and show file-level coverage changes in the collapsible details section. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The Python regex was expecting leading whitespace before class names, but the AWK script outputs class names at the start of lines without leading whitespace. Changed regex from: r'^\s+([\w\\]+)\s+Methods:...' To: r'^([\w\\]+)\s+Methods:...' This allows the parser to correctly extract coverage data from lines like: "Progress_Planner\Activity Methods: 55.56% ( 5/ 9) Lines: 91.92% ( 91/ 99)" With base coverage at 0%, all files with coverage should now appear as "new files" in the collapsible details section of the PR comment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The regex was incorrectly trying to match the Methods percentage without capturing it. Since the match groups were off by one, line_percent was getting the wrong value. Changed from: r'^([\w\\]+)\s+Methods:\s+[\d.]+%.*Lines:\s+([\d.]+)%...' To: r'^([\w\\]+)\s+Methods:\s+([\d.]+)%.*Lines:\s+([\d.]+)%...' Now the groups are: - Group 1: Class name - Group 2: Methods percentage (unused but captured) - Group 3: Lines percentage - Groups 4-5: Covered/total lines 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The regex now captures Methods percentage in group 2, which shifted all subsequent group numbers: - Group 1: Class name - Group 2: Methods percentage (captured but not used) - Group 3: Lines percentage - Group 4: Covered lines count - Group 5: Total lines count Updated the Python code to use the correct group numbers (3, 4, 5) instead of the old numbers (2, 3, 4). This fixes the ValueError: invalid literal for int() with base 10: '91.92' 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The coverage changes JSON was being corrupted when passed through
GitHub Actions expression syntax ${{ }}. The expression parser was
mangling the multiline JSON with curly braces.
Solution: Pass the JSON through an environment variable instead.
This avoids the expression parser and preserves the JSON intact.
Before: const changesStr = `${{ steps.coverage_diff.outputs.coverage_changes }}`;
After: const changesStr = process.env.COVERAGE_CHANGES || '{}';
This should now properly display the file-level coverage changes
in the collapsible <details> section of the PR comment.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Show all files in the file-level coverage changes section instead of limiting to 10 files per category. This provides complete visibility into coverage changes across the entire codebase. Changes: - Removed .slice(0, 10) limits from new_files, improved, and degraded loops - Removed "... and X more" messages - All 146 files will now be shown in the details table 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…251031 Add PHPUnit Coverage workflow
Contributor
Composer package changes
|
Contributor
✅ Code Coverage Report
🎉 Great job maintaining/improving code coverage! 📊 File-level Coverage Changes (156 files)🆕 New Files
ℹ️ About this report
|
Fixed 4 test failures identified in GitHub Actions CI: 1. Ajax_Security_AIOSEO_Test::test_uses_base_trait - Changed from getTraitNames() to hasMethod() checks - getTraitNames() only returns direct traits, not nested traits - Now verifies base trait methods are available 2. Ajax_Security_Yoast_Test::test_uses_base_trait - Same fix as AIOSEO test - Checks for verify_nonce_or_fail, verify_capability_or_fail, verify_ajax_security 3. Input_Sanitizer_Test::test_get_sanitized_post_sanitization (special_chars) - Fixed expected value for ampersand test - sanitize_text_field() does not encode ampersands - Changed expectation from 'Test & Value' to 'Test & Value' 4. Input_Sanitizer_Test::test_get_sanitized_get_sanitization (special_chars) - Same fix as above for GET method All tests now properly reflect WordPress function behavior. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The tests were catching WPAjaxDieStopException but wp_send_json_error() actually throws WPAjaxDieContinueException. Fixed in: - test-class-ajax-security-base.php (2 occurrences) - test-class-ajax-security-aioseo.php (1 occurrence) - test-class-ajax-security-yoast.php (1 occurrence) This fixes the 4 test errors: - Ajax_Security_Base_Test::test_verify_nonce_or_fail_invalid - Ajax_Security_Base_Test::test_verify_capability_or_fail_non_admin - Ajax_Security_AIOSEO_Test::test_verify_aioseo_active_or_fail_not_active - Ajax_Security_Yoast_Test::test_verify_yoast_active_or_fail_not_active 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…ion-with-traits Reduce code duplication using traits
…ctive-task-load Dont enqueue assets or add popover if interactive task is not published
…grid-as-dependency Dont enqueue grid script on WP Dashboard page
Fix WP CLI get task command & add tests
Delete user meta, which redirects to PP dashboard page
New user onboarding
New onboarding tweaks
Reverse logic for "Show Onboarding" filter
Delay onboarding init a bit
…e-access-check Exclude direct_file_access check from plugin-check
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.
No description provided.