Exemple #1
0
        public void ProcessMessage(JObject message, SlackMessageSubject subject)
        {
            var slackMessage = JsonConvert.DeserializeObject <SlackMessage>(message.ToString());

            if (slackMessage == null)
            {
                _logger.Log(LogLevel.Warning, $"Invalid message received {message}");
                return;
            }

            foreach (var teamConfiguration in _configuration.TeamConfigurations)
            {
                _logger.Log(LogLevel.Information, $"Checking filters for team {teamConfiguration.Name}...");
                ProcessMessageByTeam(subject, slackMessage, teamConfiguration);
            }
        }
Exemple #2
0
        public void BuildCompleted([FromBody] JObject message)
        {
            _logger.Log(LogLevel.Information, $"Build completed:\n {message}!");

            _slackMessageProcessor.ProcessMessage(message, SlackMessageSubject.BuildCompleted);
        }