Skip to content

Commit 6397b92

Browse files
authored
Export temporary ID map from safe output handler manager (#12450)
1 parent c8ad891 commit 6397b92

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

actions/setup/js/safe_output_handler_manager.cjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,9 @@ async function main() {
801801
const agentOutput = loadAgentOutput();
802802
if (!agentOutput.success) {
803803
core.info("No agent output available - nothing to process");
804+
// Set empty outputs for downstream steps
805+
core.setOutput("temporary_id_map", "{}");
806+
core.setOutput("processed_count", 0);
804807
return;
805808
}
806809

@@ -811,6 +814,9 @@ async function main() {
811814

812815
if (messageHandlers.size === 0) {
813816
core.info("No handlers loaded - nothing to process");
817+
// Set empty outputs for downstream steps
818+
core.setOutput("temporary_id_map", "{}");
819+
core.setOutput("processed_count", 0);
814820
return;
815821
}
816822

@@ -871,6 +877,14 @@ async function main() {
871877
core.warning(`${skippedNoHandlerResults.length} message(s) were skipped because no handler was loaded. Check your workflow's safe-outputs configuration.`);
872878
}
873879

880+
// Export temporary ID map as output for downstream steps (e.g., assign_to_agent)
881+
const temporaryIdMapJson = JSON.stringify(processingResult.temporaryIdMap);
882+
core.setOutput("temporary_id_map", temporaryIdMapJson);
883+
core.info(`Exported temporary ID map with ${Object.keys(processingResult.temporaryIdMap).length} mapping(s)`);
884+
885+
// Export processed count for consistency with project handler
886+
core.setOutput("processed_count", successCount);
887+
874888
core.info("Safe Output Handler Manager completed");
875889
} catch (error) {
876890
core.setFailed(`Handler manager failed: ${getErrorMessage(error)}`);

0 commit comments

Comments
 (0)