Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "plugin-approved",
"name": "package-approved",
"description": null,
"nodes": [
{
Expand All @@ -13,15 +13,15 @@
],
"parameters": {
"httpMethod": "POST",
"path": "strapi/plugin-approved",
"path": "strapi/package-approved",
"authentication": "headerAuth",
"responseMode": "onReceived",
"responseData": "noData",
"options": {}
},
"onError": "continueRegularOutput",
"alwaysOutputData": true,
"notes": "Fired by the CMS moderation plugin after plugin-submission.promoteToPackage. Payload includes package_id + package_slug (may be null).",
"notes": "Fired by the CMS moderation plugin after package-submission.promoteToPackage. Payload includes package_id + package_slug (may be null).",
"webhookId": "5b4adc60-df90-4ca1-aca8-c2ea4ca513d7"
},
{
Expand Down Expand Up @@ -98,7 +98,7 @@
"id": "b1",
"name": "template_key",
"type": "string",
"value": "plugin-approved"
"value": "package-approved"
},
{
"id": "b2",
Expand Down Expand Up @@ -165,7 +165,7 @@
"id": "s1",
"name": "text",
"type": "string",
"value": "=:white_check_mark: *Plugin* approved & published: *{{ $json.package_name }}* by {{ $json.author_name }}\nLive: {{ $json.marketplace_link }}"
"value": "=:white_check_mark: *Package* approved & published: *{{ $json.package_name }}* by {{ $json.author_name }}\nLive: {{ $json.marketplace_link }}"
}
]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "plugin-changes-requested",
"name": "package-changes-requested",
"description": null,
"nodes": [
{
Expand All @@ -13,15 +13,15 @@
],
"parameters": {
"httpMethod": "POST",
"path": "strapi/plugin-changes-requested",
"path": "strapi/package-changes-requested",
"authentication": "headerAuth",
"responseMode": "onReceived",
"responseData": "noData",
"options": {}
},
"onError": "continueRegularOutput",
"alwaysOutputData": true,
"notes": "Fired by the CMS moderation plugin after plugin-submission.rejectOrRequestChanges with status='changes_requested'. Payload: flat { submissionId, plugin_name, owner_email, reason, feedback, dashboard_link, ... }.",
"notes": "Fired by the CMS moderation plugin after package-submission.rejectOrRequestChanges with status='changes_requested'. Payload: flat { submissionId, package_name, owner_email, reason, feedback, dashboard_link, ... }.",
"webhookId": "2f6e1cec-6e97-4e6d-b9f6-8b3fbda1e310"
},
{
Expand Down Expand Up @@ -98,7 +98,7 @@
"id": "b1",
"name": "template_key",
"type": "string",
"value": "plugin-changes-requested"
"value": "package-changes-requested"
},
{
"id": "b2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "plugin-declined",
"name": "package-declined",
"description": null,
"nodes": [
{
Expand All @@ -13,15 +13,15 @@
],
"parameters": {
"httpMethod": "POST",
"path": "strapi/plugin-declined",
"path": "strapi/package-declined",
"authentication": "headerAuth",
"responseMode": "onReceived",
"responseData": "noData",
"options": {}
},
"onError": "continueRegularOutput",
"alwaysOutputData": true,
"notes": "Fired by the CMS moderation plugin after plugin-submission.rejectOrRequestChanges with status='rejected'. Payload: flat { submissionId, plugin_name, owner_email, reason, feedback, ... }.",
"notes": "Fired by the CMS moderation plugin after package-submission.rejectOrRequestChanges with status='rejected'. Payload: flat { submissionId, package_name, owner_email, reason, feedback, ... }.",
"webhookId": "37f3f735-2a1c-4c22-89e0-237bb2b5a245"
},
{
Expand Down Expand Up @@ -86,7 +86,7 @@
"id": "b1",
"name": "template_key",
"type": "string",
"value": "plugin-declined"
"value": "package-declined"
},
{
"id": "b2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "plugin-submission-received",
"name": "package-submission-received",
"description": null,
"nodes": [
{
Expand All @@ -13,15 +13,15 @@
],
"parameters": {
"httpMethod": "POST",
"path": "strapi/plugin-submission-received",
"path": "strapi/package-submission-received",
"authentication": "headerAuth",
"responseMode": "onReceived",
"responseData": "noData",
"options": {}
},
"onError": "continueRegularOutput",
"alwaysOutputData": true,
"notes": "Fired by the CMS moderation plugin after plugin-submission.createSubmission. Payload: flat { submissionId, plugin_name, owner_name, owner_email, repository_url, dashboard_link, ... }.",
"notes": "Fired by the CMS moderation plugin after package-submission.createSubmission. Payload: flat { submissionId, package_name, owner_name, owner_email, repository_url, dashboard_link, ... }.",
"webhookId": "e9741c13-e5b0-40a4-99a5-9a30031ea8a7"
},
{
Expand Down Expand Up @@ -98,7 +98,7 @@
"id": "b1",
"name": "template_key",
"type": "string",
"value": "plugin-submission-received"
"value": "package-submission-received"
},
{
"id": "b2",
Expand Down Expand Up @@ -166,7 +166,7 @@
"id": "s1",
"name": "text",
"type": "string",
"value": "=:package: New *plugin* submission received: *{{ $json.package_name }}* by {{ $json.author_name }}\nRepo: {{ $json.git_repository }}\nReview: {{ $json.dashboard_link }}"
"value": "=:package: New *package* submission received: *{{ $json.package_name }}* by {{ $json.author_name }}\nRepo: {{ $json.git_repository }}\nReview: {{ $json.dashboard_link }}"
}
]
},
Expand Down
12 changes: 6 additions & 6 deletions apps/automation/workflows/scan-timeout-sweeper/workflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
60
],
"parameters": {
"content": "## Scan Timeout Sweeper\n\nRuns every 15 minutes. Finds submissions whose `security_scan_status='running'` with `updatedAt` older than 30 minutes \u2014 assumes they're stuck (workflow killed mid-run, n8n container restart, unrecoverable crash) \u2014 and PATCHes each to `security_scan_status='failed'` via the moderation content-api write-back route.\n\nHandles both plugin-submissions and template-submissions. Posts a Slack summary to `#integration-marketplace` when any stuck scans are swept, silent otherwise.\n\n**Required n8n env vars:**\n- `STRAPI_API_URL`\n\n**Required credentials:**\n- `httpHeaderAuth` \u2014 Strapi API token (shared with security-scan)",
"content": "## Scan Timeout Sweeper\n\nRuns every 15 minutes. Finds submissions whose `security_scan_status='running'` with `updatedAt` older than 30 minutes \u2014 assumes they're stuck (workflow killed mid-run, n8n container restart, unrecoverable crash) \u2014 and PATCHes each to `security_scan_status='failed'` via the moderation content-api write-back route.\n\nHandles both package-submissions and template-submissions. Posts a Slack summary to `#integration-marketplace` when any stuck scans are swept, silent otherwise.\n\n**Required n8n env vars:**\n- `STRAPI_API_URL`\n\n**Required credentials:**\n- `httpHeaderAuth` \u2014 Strapi API token (shared with security-scan)",
"height": 300,
"width": 760,
"color": 6
Expand Down Expand Up @@ -54,8 +54,8 @@
"onError": "continueRegularOutput"
},
{
"id": "fetch-plugins-1",
"name": "Find Stale Plugin Scans",
"id": "fetch-packages-1",
"name": "Find Stale Package Scans",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
Expand Down Expand Up @@ -159,7 +159,7 @@
],
"parameters": {
"language": "javaScript",
"jsCode": "try {\n const pluginRes = $('Find Stale Plugin Scans').first().json || {};\n const templateRes = $('Find Stale Template Scans').first().json || {};\n\n function extract(res, kind) {\n const items = Array.isArray(res?.data) ? res.data : [];\n return items\n .map((item) => ({\n kind,\n documentId: item.documentId || item.id,\n name: item.plugin_name || item.template_name || 'unknown',\n started_at: item.security_scan_started_at || null,\n }))\n .filter((x) => x.documentId);\n }\n\n const stuck = [\n ...extract(pluginRes, 'plugin'),\n ...extract(templateRes, 'template'),\n ];\n\n if (stuck.length === 0) return [];\n return stuck.map((s) => ({ json: s }));\n} catch (err) {\n return [{ json: { _node_error: err.message || String(err) } }];\n}"
"jsCode": "try {\n const pluginRes = $('Find Stale Package Scans').first().json || {};\n const templateRes = $('Find Stale Template Scans').first().json || {};\n\n function extract(res, kind) {\n const items = Array.isArray(res?.data) ? res.data : [];\n return items\n .map((item) => ({\n kind,\n documentId: item.documentId || item.id,\n name: item.name || item.template_name || 'unknown',\n started_at: item.security_scan_started_at || null,\n }))\n .filter((x) => x.documentId);\n }\n\n const stuck = [\n ...extract(pluginRes, 'package'),\n ...extract(templateRes, 'template'),\n ];\n\n if (stuck.length === 0) return [];\n return stuck.map((s) => ({ json: s }));\n} catch (err) {\n return [{ json: { _node_error: err.message || String(err) } }];\n}"
},
"onError": "continueRegularOutput",
"notes": "Returns one item per stuck submission so downstream runs once per. Returns [] (no items) when everything's healthy \u2014 downstream branches short-circuit."
Expand Down Expand Up @@ -258,7 +258,7 @@
"main": [
[
{
"node": "Find Stale Plugin Scans",
"node": "Find Stale Package Scans",
"type": "main",
"index": 0
},
Expand All @@ -270,7 +270,7 @@
]
]
},
"Find Stale Plugin Scans": {
"Find Stale Package Scans": {
"main": [
[
{
Expand Down
Loading
Loading