コード例 #1
0
        private void CheckForPullRequestsAndNotifyUsers()
        {
            _logger.LogInformation("CheckForPullRequestsAndNotifyUsers");
            using (var repoContext = _repositoryConnectionProvider.GetRepositoryConnection())
            {
                var openPullRequests = repoContext.GetOpenPullRequests();

                var filteredPullRequests = FilterPullRequests(openPullRequests);
                if (filteredPullRequests.Count > 0)
                {
                    _logger.LogInformation("Notifying users there is still open {count} pull requests", filteredPullRequests.Count);
                    _userNotifier.NotifyAboutOpenPullRequests(filteredPullRequests);
                }
            }
        }