Plugin Directory: Attribute SVN changes to the plugin each path belongs to - #804
Closed
obenland wants to merge 2 commits into
Closed
Plugin Directory: Attribute SVN changes to the plugin each path belongs to#804obenland wants to merge 2 commits into
obenland wants to merge 2 commits into
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
obenland
force-pushed
the
fix/svn-watcher-multi-plugin-commit
branch
from
August 13, 2026 13:42
c307115 to
fb14639
Compare
…gs to. SVN_Watcher derived the plugin slug from the first path of a commit and then folded every path in that commit into that one plugin. A commit spanning several plugins — a "Tested up to" sweep across a committer's portfolio, for instance — therefore credited every plugin's tags to whichever plugin sorted first, and queued no import at all for the rest. The first plugin then tried to build ZIPs for tags it doesn't have, logging `URL '...' doesn't exist` warnings from Zip\Builder, while the other plugins in the commit never made it into the directory at all. Determine the slug per path instead, and record each revision once per plugin. The summarising is extracted into SVN_Watcher::summarize_plugin_changes() so it can be exercised without shelling out to SVN. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The root ruleset runs the full WordPress standard, which the deployed public_html/phpcs.xml relaxes, so the new test file tripped a number of PEAR.Functions.FunctionCallSignature sniffs. Reformats the nested calls with phpcbf, documents the test class and its summarize() helper, and terminates the readme_touched comment that moved into the path loop. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
obenland
force-pushed
the
fix/svn-watcher-multi-plugin-commit
branch
from
August 18, 2026 21:25
fb14639 to
218453f
Compare
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.
Problem
SVN_Watcher::get_plugin_changes_between()assumed one commit touches one plugin. It derived the slug from only the first path of the commit:…and then walked every path in that commit, appending each tag to that single plugin's
tags_touched.A commit spanning multiple plugins — e.g. a committer bumping "Tested up to" across their whole portfolio — is therefore misread completely.
Observed impact
r3644696 on plugins.svn touched nine plugins in one commit.
autoclosesorted first, so it absorbed everything:4.4.0is better-search's tag,4.3.0contextual-related-posts',4.4.2top-10's.autoclosehas never had a 4.x release.Two consequences beyond the log noise:
3.1.1also exists as anautoclosetag, so that ZIP was re-exported and re-committed for no reason — no warning, invisible in the logs.post_modifiedstill predated the commit: better-search, contextual-related-posts, knowledgebase, popular-authors, webberzone-code-block-highlighting, webberzone-link-warnings and where-did-they-go-from-here all missed the readme change entirely. (top-10 only recovered because a separate top-10-only commit landed three minutes later.)Fix
Determine the slug from each path rather than from the commit, and record each revision once per plugin. The per-plugin flags (
readme_touched,code_touched,assets_touched) now describe that plugin's own paths instead of the whole commit's.The summarising is extracted into
SVN_Watcher::summarize_plugin_changes(), which is pure — it takes the log array and returns the grouped result — so it can be tested without shelling out to SVN.Tests
Adds
tests/SVN_Watcher_Log_Summary_Test.php(6 tests, 23 assertions), covering the multi-plugin commit, per-plugin flag isolation, revision de-duplication, ordering by earliest revision, tag-deletion vs. file-deletion-inside-a-tag, and bare plugin-root paths.Verified they fail against the previous logic and pass with the fix:
Note
One intentional behaviour change: a commit whose only path for a plugin is the bare plugin root (
/plugin-name, with no/trunk,/tagsor/assetsbelow it) no longer produces an entry. Previously it created one with an empty tag list and nothing to import. New-repo commits are unaffected — they're filtered by thePLUGIN_SVN_MANAGEMENT_USERcheck, and carry/trunkanyway.No Meta Trac ticket yet — happy to open one and reference it if that's preferred.