From 8f5e5b0d2420afafffd8228fcbbe5971b11784a7 Mon Sep 17 00:00:00 2001 From: Gerard Nguyen Date: Fri, 5 Jun 2026 14:16:17 +1000 Subject: [PATCH] add notifyUsers for release promote --- src/releases.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/releases.ts b/src/releases.ts index b077298..cbd0924 100644 --- a/src/releases.ts +++ b/src/releases.ts @@ -213,15 +213,15 @@ function isSupportedExt(ext: string): boolean { return supportedExts.includes(ext); } -export async function promoteRelease(vendorPortalApi: VendorPortalApi, appSlug: string, channelId: string, releaseSequence: number, version: string, releaseNotes?: string) { +export async function promoteRelease(vendorPortalApi: VendorPortalApi, appSlug: string, channelId: string, releaseSequence: number, version: string, releaseNotes?: string, notifyUsers?: boolean) { // 1. get the app id from the app slug const app = await getApplicationDetails(vendorPortalApi, appSlug); // 2. promote the release - await promoteReleaseByAppId(vendorPortalApi, app.id, channelId, releaseSequence, version, releaseNotes); + await promoteReleaseByAppId(vendorPortalApi, app.id, channelId, releaseSequence, version, releaseNotes, notifyUsers); } -async function promoteReleaseByAppId(vendorPortalApi: VendorPortalApi, appId: string, channelId: string, releaseSequence: number, version: string, releaseNotes?: string) { +async function promoteReleaseByAppId(vendorPortalApi: VendorPortalApi, appId: string, channelId: string, releaseSequence: number, version: string, releaseNotes?: string, notifyUsers?: boolean) { const http = await vendorPortalApi.client(); const reqBody = { versionLabel: version, @@ -230,6 +230,9 @@ async function promoteReleaseByAppId(vendorPortalApi: VendorPortalApi, appId: st if (releaseNotes) { reqBody["releaseNotesGzip"] = gzipData(releaseNotes); } + if (notifyUsers !== undefined) { + reqBody["notifyUsers"] = notifyUsers; + } const uri = `${vendorPortalApi.endpoint}/app/${appId}/release/${releaseSequence}/promote`; const res = await http.post(uri, JSON.stringify(reqBody)); if (res.message.statusCode != 200) {