Skip to content
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

GitDirectoryResource: Accept "/", "", "." as root paths #1860

Merged
merged 1 commit into from
Oct 8, 2024

Conversation

adamziel
Copy link
Collaborator

@adamziel adamziel commented Oct 8, 2024

GitDirectoryResource was merged in #1858. Unfortunately, it didn't provide an easy way of saying "checkout all the files from the repo". This PR adds support for three root path syntaxes:

  • "path": "/"
  • "path": "."
  • "path": ""

Testing instructions

Run this Blueprint locally and confirm it installs the blocky formats plugin:

{
	"$schema": "https://playground.wordpress.net/blueprint-schema.json",
	"login": true,
	"landingPage": "/wp-admin/",
    "steps": [
        {
            "step": "installPlugin",
            "pluginData": {
                "resource": "git:directory",
                "url": "https://github.com/dmsnell/blocky-formats.git",
                "ref": "trunk",
                "path": "/"
            }
        }
    ]
}

GitDirectoryResource was merged in #1858. Unfortunately,
it didn't provide an easy way of saying "checkout all the files from the
repo". This PR adds support for three root path syntaxes:

* `"path": "/"`
* `"path": "."`
* `"path": ""`

 ## Testing instructions

Run this Blueprint locally and confirm it installs the blocky formats
plugin:

```json
{
	"$schema": "https://playground.wordpress.net/blueprint-schema.json",
	"login": true,
	"landingPage": "/wp-admin/",
    "steps": [
        {
            "step": "installPlugin",
            "pluginData": {
                "resource": "git:directory",
                "url": "https://github.com/dmsnell/blocky-formats.git",
                "ref": "trunk",
                "path": "/"
            }
        }
    ]
}
```
@adamziel adamziel merged commit 1732f77 into trunk Oct 8, 2024
9 checks passed
@adamziel adamziel deleted the fix-paper-cuts-in-git-directory branch October 8, 2024 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant