string CreateTitleText(ProvisionatorProfile oldProfile, ProvisionatorProfile newProfile) { var products = new List <string> (); for (int i = 0; i < oldProfile.Dependencies.Count; i++) { if (oldProfile.Dependencies [i].GitSha != newProfile.Dependencies [i].GitSha) { products.Add(oldProfile.Dependencies [i].Name); } } return($"[{Client.BranchName}] Bump {string.Join (", ", products)}."); }
string CreateBodyText(ProvisionatorProfile oldProfile, ProvisionatorProfile newProfile) { var lines = new List <string> (); for (int i = 0; i < oldProfile.Dependencies.Count; i++) { var oldDep = oldProfile.Dependencies [i]; var newDep = newProfile.Dependencies [i]; if (newDep.GitSha != oldDep.GitSha) { lines.Add($"{oldDep.Name}: {oldDep.GitHubUrl}/compare/{oldDep.GitSha}...{newDep.GitSha}"); } } return(string.Join("\r\n", lines)); }