Ejemplo n.º 1
0
        public async Task <IActionResult> OnWebHookTriggerAsync(WorkItem workItem)
        {
            // Maps incoming workitem payload to release management model.
            var releaseManagementTask = await devOpsHelper.MapToReleaseManagementTask(workItem);

            taskDetails.AddOrUpdate(Constant.TaskDetails, releaseManagementTask, (key, newValue) => releaseManagementTask);

            if (releaseManagementTask.GroupChatMembers.Count() > 1)
            {
                var groupChatId = await graphHelper.CreateGroupChatAsync(releaseManagementTask.GroupChatMembers, releaseManagementTask.TaskTitle);

                await graphHelper.AppinstallationforGroupAsync(groupChatId);

                return(this.Ok());
            }

            return(this.BadRequest());
        }