1
1
const https = require ( 'https' ) ;
2
2
3
- const generateWordpressPlaygroundBlueprint = ( prNumber , artifactUrl ) => {
3
+ const generateWordpressPlaygroundBlueprint = ( prNumber ) => {
4
4
const defaultSchema = {
5
5
meta : {
6
6
title : `Remote Data Blocks - PR #${ prNumber } ` ,
@@ -41,7 +41,7 @@ const generateWordpressPlaygroundBlueprint = ( prNumber, artifactUrl ) => {
41
41
pluginData : {
42
42
caption : 'Installing Remote Data Blocks' ,
43
43
resource : 'url' ,
44
- url : `${ artifactUrl } ` ,
44
+ url : `https://playground.wordpress.net/plugin-proxy.php?org=Automattic&repo=remote-data-blocks&workflow=Build%20Live%20Branch&artifact=remote-data-blocks- ${ prNumber } &pr= ${ prNumber } ` ,
45
45
} ,
46
46
options : {
47
47
activate : true ,
@@ -54,7 +54,7 @@ const generateWordpressPlaygroundBlueprint = ( prNumber, artifactUrl ) => {
54
54
return defaultSchema ;
55
55
} ;
56
56
57
- async function run ( { github, context, core , artifactUrl } ) {
57
+ async function run ( { github, context } ) {
58
58
const commentInfo = {
59
59
owner : context . repo . owner ,
60
60
repo : context . repo . repo ,
@@ -74,9 +74,9 @@ async function run( { github, context, core, artifactUrl } ) {
74
74
}
75
75
}
76
76
77
- const defaultSchema = generateWordpressPlaygroundBlueprint ( context . issue . number , artifactUrl ) ;
77
+ const defaultSchema = generateWordpressPlaygroundBlueprint ( context . issue . number ) ;
78
78
79
- const url = `https://playground.wordpress.net/#${ JSON . stringify ( defaultSchema ) } ` ;
79
+ const url = `https://playground.wordpress.net/#${ encodeURIComponent ( JSON . stringify ( defaultSchema ) ) } ` ;
80
80
81
81
const body = `
82
82
## Test using WordPress Playground
0 commit comments