From 5170ed227ac1bd3fe1e54daf66e3f623b60c5fd0 Mon Sep 17 00:00:00 2001 From: mbeisel Date: Mon, 22 Jul 2024 14:19:32 +0200 Subject: [PATCH] remove code duplicate and add auto qrm update after patternselection --- .../pattern/ui/pattern-selection/PatternSelectionPlugin.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/components/bpmn-q/modeler-component/extensions/pattern/ui/pattern-selection/PatternSelectionPlugin.js b/components/bpmn-q/modeler-component/extensions/pattern/ui/pattern-selection/PatternSelectionPlugin.js index 71302ce0..d40cbdf3 100644 --- a/components/bpmn-q/modeler-component/extensions/pattern/ui/pattern-selection/PatternSelectionPlugin.js +++ b/components/bpmn-q/modeler-component/extensions/pattern/ui/pattern-selection/PatternSelectionPlugin.js @@ -34,7 +34,7 @@ import NotificationHandler from "../../../../editor/ui/notifications/Notificatio import { findSplittingCandidates } from "../../../quantme/ui/splitting/CandidateDetector"; import { rewriteWorkflow } from "../../../quantme/ui/splitting/WorkflowRewriter"; import { invokeScriptSplitter } from "../../../quantme/ui/splitting/splitter/ScriptSplitterHandler"; -import { generateQrms } from "../../../quantme/utilities/Utilities"; +import {generateQrms, handleQrmUpload} from "../../../quantme/utilities/Utilities"; import { uploadMultipleToGitHub } from "../../../quantme/qrm-manager/git-handler"; const defaultState = { @@ -220,11 +220,8 @@ export default class PatternSelectionPlugin extends PureComponent { ); qrmsActivities = result.qrmActivities; if (qrmsActivities.length > 0) { - let qrmsToUpload = await generateQrms(qrmsActivities); - console.log(qrmsToUpload); + handleQrmUpload(qrmsActivities, this.modeler); - // upload the generated QRMS to the upload repository - uploadMultipleToGitHub(this.modeler.config, qrmsToUpload); } } else { let collapsedSubprocessStartEvent = elementFactory.createShape({