diff --git a/actions/setup/js/create_missing_data_issue.cjs b/actions/setup/js/create_missing_data_issue.cjs
index d40de3922bd..b04fa7bad63 100644
--- a/actions/setup/js/create_missing_data_issue.cjs
+++ b/actions/setup/js/create_missing_data_issue.cjs
@@ -1,11 +1,7 @@
// @ts-check
///
-const { getErrorMessage } = require("./error_helpers.cjs");
-const { renderTemplate } = require("./messages_core.cjs");
-const { createExpirationLine, generateFooterWithExpiration } = require("./ephemerals.cjs");
-const fs = require("fs");
-const { sanitizeContent } = require("./sanitize_content.cjs");
+const { buildMissingIssueHandler } = require("./missing_issue_helpers.cjs");
/**
* @typedef {import('./types/handler-factory').HandlerFactoryFunction} HandlerFactoryFunction
@@ -19,209 +15,27 @@ const HANDLER_TYPE = "create_missing_data_issue";
* Returns a message handler function that processes individual create_missing_data_issue messages
* @type {HandlerFactoryFunction}
*/
-async function main(config = {}) {
- // Extract configuration
- const titlePrefix = config.title_prefix || "[missing data]";
- const envLabels = config.labels ? (Array.isArray(config.labels) ? config.labels : config.labels.split(",")).map(label => String(label).trim()).filter(label => label) : [];
- const maxCount = config.max || 1; // Default to 1 to create only one issue per workflow run
-
- core.info(`Title prefix: ${titlePrefix}`);
- if (envLabels.length > 0) {
- core.info(`Default labels: ${envLabels.join(", ")}`);
- }
- core.info(`Max count: ${maxCount}`);
-
- // Track how many items we've processed for max limit
- let processedCount = 0;
-
- // Track created/updated issues
- const processedIssues = [];
-
- /**
- * Create or update an issue for missing data
- * @param {string} workflowName - Name of the workflow
- * @param {string} workflowSource - Source path of the workflow
- * @param {string} workflowSourceURL - URL to the workflow source
- * @param {string} runUrl - URL to the workflow run
- * @param {Array