From 526da79364f0363092d7c9ae3d94f8eeaab8eeaa Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:32:53 -0400 Subject: [PATCH 01/22] Update plugin-artifact-for-pr.yml --- .github/workflows/plugin-artifact-for-pr.yml | 33 +++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index 066e04c0..42a7e1ae 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -39,10 +39,35 @@ jobs: const runId = context.runId; const artifactUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`; const slug = process.env.PLUGIN_SLUG; - const body = `ℹ️ [Download the ${slug} plugin artifact from this workflow run](${artifactUrl}) (see the 'Artifacts' section at the bottom).`; - await github.rest.issues.createComment({ + const body = ` [Download the ${slug} plugin artifact from this workflow run](${artifactUrl}) (see the 'Artifacts' section at the bottom).`; + + // Find existing comment from this bot + const comments = await github.rest.issues.listComments({ issue_number: pr.number, owner: context.repo.owner, - repo: context.repo.repo, - body + repo: context.repo.repo }); + + const botComment = comments.data.find(comment => + comment.user.type === 'Bot' && + comment.user.login === 'github-actions[bot]' && + comment.body.includes(`Download the ${slug} plugin artifact`) + ); + + if (botComment) { + // Update existing comment + await github.rest.issues.updateComment({ + comment_id: botComment.id, + owner: context.repo.owner, + repo: context.repo.repo, + body + }); + } else { + // Create new comment + await github.rest.issues.createComment({ + issue_number: pr.number, + owner: context.repo.owner, + repo: context.repo.repo, + body + }); + } From 57636b5ce0e0d0c03e3d2152bdeb42eb8c100a8f Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:40:52 -0400 Subject: [PATCH 02/22] Update README.md --- plugins/wp-graphql-headless-webhooks/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index a3b09a08..27b91be6 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -25,3 +25,5 @@ Clone the repository or download the latest release and place it in your WordPre ## License WP GPL 2 + + From cf8f4926e03cd880fff623b374dbaead520ea02a Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:42:05 -0400 Subject: [PATCH 03/22] Update README.md --- plugins/wp-graphql-headless-webhooks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index 27b91be6..02d09f15 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -26,4 +26,4 @@ Clone the repository or download the latest release and place it in your WordPre ## License WP GPL 2 - + From eb7300ea9f7d13b60187d5353dbe95c376729a1c Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:44:44 -0400 Subject: [PATCH 04/22] Update plugin-artifact-for-pr.yml --- .github/workflows/plugin-artifact-for-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index 42a7e1ae..c86ea552 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -39,7 +39,7 @@ jobs: const runId = context.runId; const artifactUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`; const slug = process.env.PLUGIN_SLUG; - const body = ` [Download the ${slug} plugin artifact from this workflow run](${artifactUrl}) (see the 'Artifacts' section at the bottom).`; + const body = `ℹ️ [Download the latest ${slug} plugin artifact from this workflow run](${artifactUrl})\n\n(See the 'Artifacts' section at the bottom).`; // Find existing comment from this bot const comments = await github.rest.issues.listComments({ From 619dfbca8eb99b5e90622c20ee03bc483714fb94 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:50:00 -0400 Subject: [PATCH 05/22] Experiment with improved layout --- .github/workflows/plugin-artifact-for-pr.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index c86ea552..40382e15 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -39,7 +39,16 @@ jobs: const runId = context.runId; const artifactUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`; const slug = process.env.PLUGIN_SLUG; - const body = `ℹ️ [Download the latest ${slug} plugin artifact from this workflow run](${artifactUrl})\n\n(See the 'Artifacts' section at the bottom).`; + const body = `
+HWP Toolkit + + +**Download the latest ${slug} plugin artifact** + +🔗 [View workflow run with artifacts](${artifactUrl}) + +See the 'Artifacts' section at the bottom of the workflow run page. +
`; // Find existing comment from this bot const comments = await github.rest.issues.listComments({ From bf2e2d7cdd22a1e757cd0a78ef891c585abae445 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:50:46 -0400 Subject: [PATCH 06/22] Update README.md --- plugins/wp-graphql-headless-webhooks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index 02d09f15..db03f1e4 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -26,4 +26,4 @@ Clone the repository or download the latest release and place it in your WordPre ## License WP GPL 2 - + From 56cd033d98d0e5f5adc18b8d512d645f63e306a3 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:52:00 -0400 Subject: [PATCH 07/22] Update README.md --- plugins/wp-graphql-headless-webhooks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index db03f1e4..27b91be6 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -26,4 +26,4 @@ Clone the repository or download the latest release and place it in your WordPre ## License WP GPL 2 - + From 4cbab1e6ae85d63f5fa7931f1bdadc6c2a613381 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:53:03 -0400 Subject: [PATCH 08/22] Update README.md --- plugins/wp-graphql-headless-webhooks/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index 27b91be6..a3b09a08 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -25,5 +25,3 @@ Clone the repository or download the latest release and place it in your WordPre ## License WP GPL 2 - - From 7afa8677f02692dc62fd8f347fb4a2ec59fe21c8 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:54:27 -0400 Subject: [PATCH 09/22] Update layout --- .github/workflows/plugin-artifact-for-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index 40382e15..8a1023c9 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -40,7 +40,7 @@ jobs: const artifactUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`; const slug = process.env.PLUGIN_SLUG; const body = `
-HWP Toolkit +HWP Toolkit **Download the latest ${slug} plugin artifact** From 59aab21b4fceb87cea308e18119c5307a071a2c3 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:55:42 -0400 Subject: [PATCH 10/22] Update README.md --- plugins/wp-graphql-headless-webhooks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index a3b09a08..81a0c0d3 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -1,5 +1,5 @@ # WPGraphQL Headless Webhooks - + ## Overview A WordPress plugin that extends [WPGraphQL](https://www.wpgraphql.com/) to support webhook subscriptions and dispatching for headless WordPress environments. This allows external applications to listen and respond to WordPress content changes through GraphQL-driven webhook events. From 6fb6805ab58826fc9c6d286f811de9d9cd814744 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 12:58:11 -0400 Subject: [PATCH 11/22] Update plugin-artifact-for-pr.yml --- .github/workflows/plugin-artifact-for-pr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index 8a1023c9..42c34b15 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -60,7 +60,7 @@ jobs: const botComment = comments.data.find(comment => comment.user.type === 'Bot' && comment.user.login === 'github-actions[bot]' && - comment.body.includes(`Download the ${slug} plugin artifact`) + comment.body.includes(`Download the latest ${slug} plugin artifact`) ); if (botComment) { From cd240e5a9cf89b4aa9fc4f0112faf0d777492954 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:00:06 -0400 Subject: [PATCH 12/22] test: Trigger workflow with plugin file change --- plugins/wp-graphql-headless-webhooks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index 81a0c0d3..0b494b4c 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -1,5 +1,5 @@ # WPGraphQL Headless Webhooks - + ## Overview A WordPress plugin that extends [WPGraphQL](https://www.wpgraphql.com/) to support webhook subscriptions and dispatching for headless WordPress environments. This allows external applications to listen and respond to WordPress content changes through GraphQL-driven webhook events. From 2eebdd87269581d7bfc7ddc8c0f0641682674d18 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:09:56 -0400 Subject: [PATCH 13/22] Update plugin-artifact-for-pr.yml --- .github/workflows/plugin-artifact-for-pr.yml | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index 42c34b15..4e44036d 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -39,16 +39,7 @@ jobs: const runId = context.runId; const artifactUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`; const slug = process.env.PLUGIN_SLUG; - const body = `
-HWP Toolkit - - -**Download the latest ${slug} plugin artifact** - -🔗 [View workflow run with artifacts](${artifactUrl}) - -See the 'Artifacts' section at the bottom of the workflow run page. -
`; + const body = `ℹ️ [Download the latest ${slug} plugin artifact from this workflow run](${artifactUrl})\n\n(See the 'Artifacts' section at the bottom).`; // Find existing comment from this bot const comments = await github.rest.issues.listComments({ From 43b688d2aab6a29856300244f4e5ece2cce6d13a Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:12:47 -0400 Subject: [PATCH 14/22] Update README.md --- plugins/wp-graphql-headless-webhooks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index 0b494b4c..a3b09a08 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -1,5 +1,5 @@ # WPGraphQL Headless Webhooks - + ## Overview A WordPress plugin that extends [WPGraphQL](https://www.wpgraphql.com/) to support webhook subscriptions and dispatching for headless WordPress environments. This allows external applications to listen and respond to WordPress content changes through GraphQL-driven webhook events. From e128a11d13e31c521239e376086ae4f33115dcb1 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:15:29 -0400 Subject: [PATCH 15/22] Update plugin-artifact-for-pr.yml --- .github/workflows/plugin-artifact-for-pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index 4e44036d..e11a8949 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -39,7 +39,7 @@ jobs: const runId = context.runId; const artifactUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`; const slug = process.env.PLUGIN_SLUG; - const body = `ℹ️ [Download the latest ${slug} plugin artifact from this workflow run](${artifactUrl})\n\n(See the 'Artifacts' section at the bottom).`; + const body = `ℹ️ [Download the latest ${slug} plugin zip from this PR](${artifactUrl})\n\n(See the 'Artifacts' section at the bottom)`; // Find existing comment from this bot const comments = await github.rest.issues.listComments({ @@ -51,7 +51,7 @@ jobs: const botComment = comments.data.find(comment => comment.user.type === 'Bot' && comment.user.login === 'github-actions[bot]' && - comment.body.includes(`Download the latest ${slug} plugin artifact`) + comment.body.includes(`Download the latest ${slug} plugin zip for this PR`) ); if (botComment) { From c622082da6b2d519d07b2bec5686fdb6df97aeea Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:15:49 -0400 Subject: [PATCH 16/22] Update README.md --- plugins/wp-graphql-headless-webhooks/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index a3b09a08..9ba8d66a 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -25,3 +25,5 @@ Clone the repository or download the latest release and place it in your WordPre ## License WP GPL 2 + + \ No newline at end of file From 26939d58c8b3128cdd12d530405755c2fe75299a Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:17:35 -0400 Subject: [PATCH 17/22] Trigger workflow --- .github/workflows/plugin-artifact-for-pr.yml | 2 +- plugins/wp-graphql-headless-webhooks/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index e11a8949..7558dfc8 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -39,7 +39,7 @@ jobs: const runId = context.runId; const artifactUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`; const slug = process.env.PLUGIN_SLUG; - const body = `ℹ️ [Download the latest ${slug} plugin zip from this PR](${artifactUrl})\n\n(See the 'Artifacts' section at the bottom)`; + const body = `ℹ️ [Download the latest ${slug} plugin zip from this PR](${artifactUrl})\n(See the 'Artifacts' section at the bottom)`; // Find existing comment from this bot const comments = await github.rest.issues.listComments({ diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index 9ba8d66a..8f0458b2 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -26,4 +26,4 @@ Clone the repository or download the latest release and place it in your WordPre ## License WP GPL 2 - \ No newline at end of file + \ No newline at end of file From e3f6e5d011738a8bbb1426b3572bba9768e21505 Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:18:28 -0400 Subject: [PATCH 18/22] Update README.md --- plugins/wp-graphql-headless-webhooks/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index 8f0458b2..8ad5a8f7 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -26,4 +26,4 @@ Clone the repository or download the latest release and place it in your WordPre ## License WP GPL 2 - \ No newline at end of file + \ No newline at end of file From 90bfc4c86d3c6f653e207b92980f54e9b4958d2c Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:20:44 -0400 Subject: [PATCH 19/22] Trigger workflow --- .github/workflows/plugin-artifact-for-pr.yml | 2 +- plugins/wp-graphql-headless-webhooks/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index 7558dfc8..c1d56820 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -51,7 +51,7 @@ jobs: const botComment = comments.data.find(comment => comment.user.type === 'Bot' && comment.user.login === 'github-actions[bot]' && - comment.body.includes(`Download the latest ${slug} plugin zip for this PR`) + comment.body.includes(`ℹ️ [Download the latest ${slug} plugin zip from this PR]`) ); if (botComment) { diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index 8ad5a8f7..3e8be5f1 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -26,4 +26,4 @@ Clone the repository or download the latest release and place it in your WordPre ## License WP GPL 2 - \ No newline at end of file + \ No newline at end of file From 5598ba1666a5ef72816dd072a84a2e2e3ffd86cd Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:37:24 -0400 Subject: [PATCH 20/22] Whitelist filetypes to run workflow against --- .github/workflows/plugin-artifact-for-pr.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index c1d56820..e2cd7ff6 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -3,7 +3,10 @@ name: Plugin Artifact for PR on: pull_request: paths: - - 'plugins/**' + - 'plugins/**.php' + - 'plugins/**.js' + - 'plugins/**.css' + - 'plugins/**.json' jobs: create-plugin-artifact: From 3cafd822ccbee6f03aec40ac398946963068cdfe Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:39:09 -0400 Subject: [PATCH 21/22] Update .github/workflows/plugin-artifact-for-pr.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .github/workflows/plugin-artifact-for-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/plugin-artifact-for-pr.yml b/.github/workflows/plugin-artifact-for-pr.yml index e2cd7ff6..0ed36382 100644 --- a/.github/workflows/plugin-artifact-for-pr.yml +++ b/.github/workflows/plugin-artifact-for-pr.yml @@ -59,6 +59,7 @@ jobs: if (botComment) { // Update existing comment + core.info(`Updating existing comment with ID: ${botComment.id}`); await github.rest.issues.updateComment({ comment_id: botComment.id, owner: context.repo.owner, From 1c30b8e2e10545e7627263ee85e4e2c6ab2f259d Mon Sep 17 00:00:00 2001 From: Joe Fusco Date: Thu, 12 Jun 2025 13:41:21 -0400 Subject: [PATCH 22/22] Remove test code --- plugins/wp-graphql-headless-webhooks/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/wp-graphql-headless-webhooks/README.md b/plugins/wp-graphql-headless-webhooks/README.md index 3e8be5f1..a3b09a08 100644 --- a/plugins/wp-graphql-headless-webhooks/README.md +++ b/plugins/wp-graphql-headless-webhooks/README.md @@ -25,5 +25,3 @@ Clone the repository or download the latest release and place it in your WordPre ## License WP GPL 2 - - \ No newline at end of file