Skip to content

Improve the pull request flow for plugins #3613

@fellyph

Description

@fellyph

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):

  1. Load a plugin into Playground.
  2. Edit a single file using a file browser.
  3. Use the "Export to GitHub" feature to create a PR.
  4. View the PR on GitHub – observe that the diff includes many/all files rather than just the single edited file.
Image

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions