Skip to content

Commit bbe6eac

Browse files
committed
Amendments after QA feedback
1 parent 49f4eb1 commit bbe6eac

File tree

6 files changed

+29
-9
lines changed

6 files changed

+29
-9
lines changed

components/wordpress_com/actions/create-post/create-post.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "wordpress_com-create-post",
55
name: "Create New Post",
66
description: "Creates a new post on a WordPress.com site. [See the documentation](https://developer.wordpress.com/docs/api/1.1/post/sites/%24site/posts/new/)",
7-
version: "0.0.1",
7+
version: "0.0.6",
88
type: "action",
99
props: {
1010
wordpress,
@@ -80,7 +80,9 @@ export default {
8080
wordpress.throwCustomError("Could not create post", error, warnings);
8181
};
8282

83-
$.export("$summary", `Post successfully created. ID = ${response?.ID}` + "\n- " + warnings.join("\n- "));
83+
$.export("$summary",
84+
`Post “${this.title}” is successfully created with ID “${response?.ID}”` +
85+
"\n- " + warnings.join("\n- "));
8486
},
8587
};
8688

components/wordpress_com/actions/delete-post/delete-post.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "wordpress_com-delete-post",
55
name: "Delete Post",
66
description: "Deletes a post. [See the documentation](https://developer.wordpress.com/docs/api/1.1/post/sites/%24site/posts/%24post_ID/delete/)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
wordpress,
@@ -48,7 +48,8 @@ export default {
4848
wordpress.throwCustomError("Could not delete post", error, warnings);
4949
};
5050

51-
$.export("$summary", `Post ID = ${response?.ID} successfully deleted.` + "\n- " + warnings.join("\n- "));
51+
$.export("$summary", `Post ID “${response?.ID}” has been successfully deleted` +
52+
"\n- " + warnings.join("\n- "));
5253
},
5354
};
5455

components/wordpress_com/actions/upload-media/upload-media.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "wordpress_com-upload-media",
66
name: "Upload Media",
77
description: "Uploads a media file from a URL to the specified WordPress.com site. [See the documentation](https://developer.wordpress.com/docs/api/1.1/post/sites/%24site/media/new/)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
wordpress,
@@ -74,7 +74,9 @@ export default {
7474

7575
const media = response.media[0];
7676

77-
$.export("$summary", `Media "${media.title}" uploaded successfully (ID: ${media.ID})` + "\n- " + warnings.join("\n- "));
77+
`Media ID “${media.ID})” has been successfully uploaded`;
78+
$.export("$summary", `Media ID “${media.ID})” has been successfully uploaded` +
79+
"\n- " + warnings.join("\n- "));
7880

7981
console.log(response);
8082
return response;

components/wordpress_com/sources/new-comment/new-comment.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "wordpress_com-new-comment",
55
name: "New Comment",
66
description: "Emit new event for each new comment added since the last run. If no new comments, emit nothing.",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "source",
99
dedupe: "unique",
1010
props: {
@@ -36,6 +36,11 @@ export default {
3636
min: 1,
3737
max: 100,
3838
},
39+
timer: {
40+
type: "$.interface.timer",
41+
label: "Timer",
42+
description: "How often to poll WordPress for new comments.",
43+
},
3944
},
4045
async run({ $ }) {
4146
const warnings = [];

components/wordpress_com/sources/new-follower/new-follower.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "wordpress_com-new-follower",
55
name: "New Follower",
66
description: "Emit new event for each new follower that subscribes to the site.",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "source",
99
dedupe: "unique",
1010
props: {
@@ -16,6 +16,11 @@ export default {
1616
"siteId",
1717
],
1818
},
19+
timer: {
20+
type: "$.interface.timer",
21+
label: "Timer",
22+
description: "How often to poll WordPress for new followers.",
23+
},
1924
},
2025
async run({ $ }) {
2126
const warnings = [];

components/wordpress_com/sources/new-post/new-post.mjs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "wordpress_com-new-post",
55
name: "New Post",
66
description: "Emit new event for each new post published since the last run. If no new posts, emit nothing.",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "source",
99
dedupe: "unique",
1010
props: {
@@ -45,6 +45,11 @@ export default {
4545
min: 1,
4646
max: 100,
4747
},
48+
timer: {
49+
type: "$.interface.timer",
50+
label: "Timer",
51+
description: "How often to poll WordPress for new posts.",
52+
},
4853
},
4954
async run({ $ }) {
5055
const warnings = [];

0 commit comments

Comments
 (0)