diff --git a/SSW.Rules.AzFuncs/Domain/FrontMatter.cs b/SSW.Rules.AzFuncs/Domain/FrontMatter.cs index 7017803..3d2a1f9 100644 --- a/SSW.Rules.AzFuncs/Domain/FrontMatter.cs +++ b/SSW.Rules.AzFuncs/Domain/FrontMatter.cs @@ -7,6 +7,7 @@ public class FrontMatter public string Type { get; set; } [YamlMember(Alias = "archivedreason", ApplyNamingConventions = false)] + public string ArchivedReason { get; set; } public string Title { get; set; } @@ -17,6 +18,10 @@ public class FrontMatter public List Related { get; set; } public List Redirects { get; set; } + [YamlMember(Alias = "SeoDescription", ApplyNamingConventions = false)] + public string SeoDescription { get; set; } + + public FrontMatter() { Authors = new List(); diff --git a/SSW.Rules.AzFuncs/Functions/Widget/UpdateLatestRules.cs b/SSW.Rules.AzFuncs/Functions/Widget/UpdateLatestRules.cs index e54c324..0806bb7 100644 --- a/SSW.Rules.AzFuncs/Functions/Widget/UpdateLatestRules.cs +++ b/SSW.Rules.AzFuncs/Functions/Widget/UpdateLatestRules.cs @@ -36,8 +36,6 @@ public async Task Run( StartPage = 1 }; - _logger.LogInformation("Getting pull requests"); - var pullRequests = await gitHubClient.PullRequest.GetAllForRepository(repositoryOwner, repositoryName, request, apiOptions); @@ -47,7 +45,6 @@ await gitHubClient.PullRequest.GetAllForRepository(repositoryOwner, repositoryNa throw new Exception("No Pull Requests found"); } - _logger.LogInformation("Getting sync history hash"); var syncHistoryHash = await context.SyncHistory.GetAll(); var existingCommitHashes = new HashSet(syncHistoryHash.Select(sh => sh.CommitHash)); HttpClient httpClient = new HttpClient(); @@ -60,18 +57,11 @@ await gitHubClient.PullRequest.GetAllForRepository(repositoryOwner, repositoryNa _logger.LogInformation($"Scanning PR {pr.Number}"); if (existingCommitHashes.Contains(pr.MergeCommitSha)) break; if (!pr.Merged) continue; - _logger.LogInformation($"PR {pr.Number} - changed files {pr.ChangedFiles}"); - _logger.LogInformation($"Too big? {pr.ChangedFiles > 100}"); - if (pr.ChangedFiles > 100) // Skips big PRs as these will fail - { - _logger.LogInformation($"Skipping PR {pr.Number}"); - continue; - }; var files = await gitHubClient.PullRequest.Files(repositoryOwner, repositoryName, pr.Number); - if (files.Count > 100) // Skips big PRs as these will fail + if (files.Count > 100) // Skips big PRs as these will fail https://github.com/SSWConsulting/SSW.Rules/issues/1367 { - _logger.LogInformation($"Skipping PR {pr.Number} (2nd check)"); + _logger.LogInformation($"Skipping PR {pr.Number} because there are too many files changed"); continue; };