I am working on implementing an audit workflow within WordPress Playground using the Plugin Check Plugin (PCP). The goal is to allow users to run a plugin audit, identify files that need fixing, edit those files directly in the Playground's file browser, and then submit the fixes via the "Export to GitHub" feature.
The Problem:
Currently, when creating a Pull Request (PR) from the Playground using the "Export to GitHub" feature, the resulting PR includes a massive diff. It appears that all files in the plugin are being processed (and sometimes minified/reformatted), so even if I modify only a single line in a specific file, every file in the plugin shows up as changed in the PR diff. This makes the PRs unusable for actual contribution.
Proposed Solution:
To make the "Export to GitHub" feature viable for this workflow, the Playground needs a way to verify and isolate genuine user modifications.
Suggested improvements:
Accurate Diffing: The system should compare the current state of the files against the original cloned state to identify exactly which files were manually changed by the user, ignoring automatic reformatting/minification of untouched files.
Selective Staging UI: Before creating the PR, present the user with a UI (e.g., a modal with checkboxes) listing all the modified files.
Steps to Reproduce (Current Behavior):
- Load a plugin into Playground.
- Edit a single file using a file browser.
- Use the "Export to GitHub" feature to create a PR.
- View the PR on GitHub – observe that the diff includes many/all files rather than just the single edited file.
Expected Behavior:
When clicking "Export to GitHub", I should be prompted with a list of specifically altered files and be able to select exactly which ones to push to the GitHub PR.
I am working on implementing an audit workflow within WordPress Playground using the Plugin Check Plugin (PCP). The goal is to allow users to run a plugin audit, identify files that need fixing, edit those files directly in the Playground's file browser, and then submit the fixes via the "Export to GitHub" feature.
The Problem:
Currently, when creating a Pull Request (PR) from the Playground using the "Export to GitHub" feature, the resulting PR includes a massive diff. It appears that all files in the plugin are being processed (and sometimes minified/reformatted), so even if I modify only a single line in a specific file, every file in the plugin shows up as changed in the PR diff. This makes the PRs unusable for actual contribution.
Proposed Solution:
To make the "Export to GitHub" feature viable for this workflow, the Playground needs a way to verify and isolate genuine user modifications.
Suggested improvements:
Accurate Diffing: The system should compare the current state of the files against the original cloned state to identify exactly which files were manually changed by the user, ignoring automatic reformatting/minification of untouched files.
Selective Staging UI: Before creating the PR, present the user with a UI (e.g., a modal with checkboxes) listing all the modified files.
Steps to Reproduce (Current Behavior):
Expected Behavior:
When clicking "Export to GitHub", I should be prompted with a list of specifically altered files and be able to select exactly which ones to push to the GitHub PR.