From b34f12724aa142d0be21eac41abc2ecf551518d5 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 19 Dec 2023 13:52:20 -0700 Subject: [PATCH 1/5] Add a blueprint.json file that is used to generate a preview environment --- .wordpress-org/blueprints/blueprint.json | 33 ++++++++++ .wordpress-org/blueprints/demo-data.xml | 79 ++++++++++++++++++++++++ 2 files changed, 112 insertions(+) create mode 100644 .wordpress-org/blueprints/blueprint.json create mode 100644 .wordpress-org/blueprints/demo-data.xml diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json new file mode 100644 index 0000000..4c2e400 --- /dev/null +++ b/.wordpress-org/blueprints/blueprint.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://playground.wordpress.net/blueprint-schema.json", + "landingPage": "\/wp-admin\/edit.php", + "preferredVersions": { + "php": "7.4", + "wp": "latest" + }, + "phpExtensionBundles": ["kitchen-sink"], + "steps": [ + { + "step": "login", + "username": "admin", + "password": "password" + }, + { + "step": "installPlugin", + "pluginZipFile": { + "resource": "wordpress.org\/plugins", + "slug": "insecure-content-warning" + }, + "options": { + "activate": true + } + }, + { + "step": "importFile", + "file": { + "resource": "url", + "url": "https:\/\/raw.githubusercontent.com\/10up\/insecure-content-warning\/385fb9705624c2fe6822ac399ed08f09a5e80388\/.wordpress-org/blueprints\/demo-data.xml" + } + } + ] +} diff --git a/.wordpress-org/blueprints/demo-data.xml b/.wordpress-org/blueprints/demo-data.xml new file mode 100644 index 0000000..d19d65a --- /dev/null +++ b/.wordpress-org/blueprints/demo-data.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + My WordPress Website + https://playground.wordpress.net/ + + Tue, 19 Dec 2023 20:50:47 +0000 + en-US + 1.2 + https://playground.wordpress.net/ + https://playground.wordpress.net/ + + 1 + + + https://wordpress.org/?v=6.4.2 + + + <![CDATA[Insecure content demo]]> + https://playground.wordpress.net/?p=9 + + + https://playground.wordpress.net/?p=9 + + +

This post has an image that is using an insecure URL.

+ + + +

Try publishing this post to see this image get flagged and to fix it.

+ + + +
+]]>
+ + 9 + + + + + + + + + 0 + 0 + + + 0 + +
+
+
From 0d5ac50460c49d31b837fa75cd332e2f2db041fa Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 19 Dec 2023 13:54:18 -0700 Subject: [PATCH 2/5] Fix asset deploy workflow --- .../workflows/dotorg-asset-readme-update.yml | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dotorg-asset-readme-update.yml b/.github/workflows/dotorg-asset-readme-update.yml index a484115..1f5875a 100644 --- a/.github/workflows/dotorg-asset-readme-update.yml +++ b/.github/workflows/dotorg-asset-readme-update.yml @@ -4,15 +4,28 @@ on: push: branches: - trunk - + jobs: trunk: name: Push to trunk runs-on: ubuntu-latest steps: - - uses: actions/checkout@master + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup node version + uses: actions/setup-node@v4 + with: + node-version-file: .nvmrc + cache: npm + + - name: Build + run: | + npm install + npm run build + - name: WordPress.org plugin asset/readme update uses: 10up/action-wordpress-plugin-asset-update@stable env: SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }} - SVN_USERNAME: ${{ secrets.SVN_USERNAME }} \ No newline at end of file + SVN_USERNAME: ${{ secrets.SVN_USERNAME }} From 6102837ca26c1d0b05ba15ef9d1b7d63f5201ff9 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 19 Dec 2023 13:56:24 -0700 Subject: [PATCH 3/5] Update demo data --- .wordpress-org/blueprints/demo-data.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.wordpress-org/blueprints/demo-data.xml b/.wordpress-org/blueprints/demo-data.xml index d19d65a..e1de5f0 100644 --- a/.wordpress-org/blueprints/demo-data.xml +++ b/.wordpress-org/blueprints/demo-data.xml @@ -52,7 +52,7 @@ -

Try publishing this post to see this image get flagged and to fix it.

+

Try publishing this post to see this image get flagged.

From 431fbef660505394adc1c0fb122047a6c2abddaa Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 19 Dec 2023 13:57:46 -0700 Subject: [PATCH 4/5] Update landing page and import file --- .wordpress-org/blueprints/blueprint.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index 4c2e400..91fce88 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -1,6 +1,6 @@ { "$schema": "https://playground.wordpress.net/blueprint-schema.json", - "landingPage": "\/wp-admin\/edit.php", + "landingPage": "\/wp-admin\/post.php?post=9&action=edit", "preferredVersions": { "php": "7.4", "wp": "latest" @@ -26,7 +26,7 @@ "step": "importFile", "file": { "resource": "url", - "url": "https:\/\/raw.githubusercontent.com\/10up\/insecure-content-warning\/385fb9705624c2fe6822ac399ed08f09a5e80388\/.wordpress-org/blueprints\/demo-data.xml" + "url": "https:\/\/raw.githubusercontent.com\/10up\/insecure-content-warning\/6102837ca26c1d0b05ba15ef9d1b7d63f5201ff9\/.wordpress-org/blueprints\/demo-data.xml" } } ] From 53e56d12526a8509b83442ad869b66183f134f71 Mon Sep 17 00:00:00 2001 From: Darin Kotter Date: Tue, 19 Dec 2023 14:01:01 -0700 Subject: [PATCH 5/5] Allow external requests --- .wordpress-org/blueprints/blueprint.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.wordpress-org/blueprints/blueprint.json b/.wordpress-org/blueprints/blueprint.json index 91fce88..58dfc9d 100644 --- a/.wordpress-org/blueprints/blueprint.json +++ b/.wordpress-org/blueprints/blueprint.json @@ -6,6 +6,9 @@ "wp": "latest" }, "phpExtensionBundles": ["kitchen-sink"], + "features": { + "networking": true + }, "steps": [ { "step": "login",