Exemple #1
0
        public async Task <bool> HandleUpdatedPullRequest(PullRequest update, string identifier)
        {
            var profilePicture = await GetAuthorProfilePictureUrl(update).ConfigureAwait(false);

            var payload = profilePicture != null
                ? SlackMessageFormatter.FormatUpdatedPullRequestWithImage(update, _configuration.Channel, identifier, profilePicture)
                : SlackMessageFormatter.FormatUpdatedPullRequest(update, _configuration.Channel, identifier);

            var success = await _client.UpdateMessage(payload).ConfigureAwait(false);

            return(success.Ok);
        }