Skip to content

Commit 12bd567

Browse files
Merge pull request #128 from devtron-labs/bypass-approval
feat: provide support for notification when an exception user has triggered deployment
2 parents 527c8c1 + b405fbf commit 12bd567

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

src/common/mustacheHelper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ export class MustacheHelper {
159159
deploymentHistoryLink: deploymentHistoryLink,
160160
deploymentWindowComment: event.payload.timeWindowComment ?? '',
161161
deploymentWindowCommentStyle: event.payload.timeWindowComment ? 'block' : 'none',
162+
triggeredWithoutApproval: event.isDeploymentDoneWithoutApproval ? 'Deployment triggered without approval' : '',
163+
triggeredWithoutApprovalStyle: event.isDeploymentDoneWithoutApproval ? 'block' : 'none'
162164
}
163165
}
164166
else if (event.eventTypeId===EVENT_TYPE.Approval){

src/common/types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ export interface ParsedCDEvent {
136136
dockerImg: string;
137137
deploymentWindowComment?: string;
138138
deploymentWindowCommentStyle?: string;
139+
triggeredWithoutApproval?: string;
140+
triggeredWithoutApprovalStyle?: string;
139141
}
140142
export enum EVENT_TYPE {
141143
Trigger = 1,

src/notification/service/notificationService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,5 +257,6 @@ class Event {
257257
isProdEnv: boolean
258258
baseUrl?: string
259259
envIdsForCiPipeline?: number[]
260+
isDeploymentDoneWithoutApproval?: boolean
260261
}
261262
export {NotificationService, Event}

0 commit comments

Comments
 (0)