mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-23 08:00:45 +00:00
feat: set deploy source to 'merge' during fork merge UI flow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
KafkaTriggerService,
|
||||
MqttTriggerService,
|
||||
NatsTriggerService,
|
||||
OpenAPI,
|
||||
PostgresTriggerService,
|
||||
ScheduleService,
|
||||
ScriptService,
|
||||
@@ -420,20 +421,31 @@
|
||||
return 0
|
||||
})
|
||||
let anyFailed = false
|
||||
for (const itemKey of sortedItems) {
|
||||
const deployable = deployableItems.find((d) => d.key === itemKey)
|
||||
|
||||
if (!deployable) {
|
||||
sendUserToast(`Undeployable item: ${itemKey}`, true)
|
||||
continue
|
||||
}
|
||||
// Mark these API calls as coming from a fork merge
|
||||
const prevHeaders = OpenAPI.HEADERS
|
||||
OpenAPI.HEADERS = {
|
||||
...((prevHeaders as Record<string, string>) ?? {}),
|
||||
'X-Windmill-Deploy-Source': 'merge'
|
||||
}
|
||||
try {
|
||||
for (const itemKey of sortedItems) {
|
||||
const deployable = deployableItems.find((d) => d.key === itemKey)
|
||||
|
||||
const to = mergeIntoParent ? parent : current
|
||||
const from = mergeIntoParent ? current : parent
|
||||
await deploy(deployable.kind, deployable.path, to, from, itemKey, deployable.trigger)
|
||||
if (deploymentStatus[itemKey]?.status === 'failed') {
|
||||
anyFailed = true
|
||||
if (!deployable) {
|
||||
sendUserToast(`Undeployable item: ${itemKey}`, true)
|
||||
continue
|
||||
}
|
||||
|
||||
const to = mergeIntoParent ? parent : current
|
||||
const from = mergeIntoParent ? current : parent
|
||||
await deploy(deployable.kind, deployable.path, to, from, itemKey, deployable.trigger)
|
||||
if (deploymentStatus[itemKey]?.status === 'failed') {
|
||||
anyFailed = true
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
OpenAPI.HEADERS = prevHeaders
|
||||
}
|
||||
deploying = false
|
||||
deselectAll()
|
||||
|
||||
Reference in New Issue
Block a user