Skip to content

Commit 7d84dd1

Browse files
committed
Microsoft Teams Integration description improvements
1 parent e38c4d5 commit 7d84dd1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

AzureDevopsTracker/Integrations/MicrosoftTeamsIntegration.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ internal override void Send(ChangeLog changeLog)
4545
type = MicrosoftTeamsStatics.Type,
4646
context = MicrosoftTeamsStatics.Context,
4747
themeColor = MicrosoftTeamsStatics.ThemeColor,
48-
summary = GetTitle(changeLog),
48+
summary = GetTitle(),
4949
sections = new Section[1]
5050
{
5151
new Section()
@@ -83,20 +83,20 @@ private string GetWorkItemsDescriptionSection(string sectionName, IEnumerable<Ch
8383
text.AppendLine("\n");
8484

8585
text.Append($"\n # **{ sectionName }**\n");
86+
text.Append("<br>");
8687
foreach (var workItem in changeLogItems)
8788
{
8889
text.Append(GetWorkItemDescriptionLine(workItem));
8990
}
9091

91-
text.Append("<br>");
9292
text.AppendLine("\n");
9393
return text.ToString();
9494
}
9595

9696
private string GetWorkItemDescriptionLine(ChangeLogItem workItem)
9797
{
9898
var description = GetDescription(workItem.Description);
99-
var descriptionLine = $"<em>**{ workItem.WorkItemId }**</em> - { description }";
99+
var descriptionLine = $"<em>**{ workItem.WorkItemId }**</em> - { description } <br>";
100100
if (description.Length > MicrosoftTeamsStatics.TEXT_SIZE_TO_BREAK_LINE)
101101
return $"<br>{ descriptionLine }<br>";
102102
return descriptionLine;
@@ -106,7 +106,7 @@ private string GetDescription(string description)
106106
{
107107
if (description.StartsWith("<div>"))
108108
description = description[MicrosoftTeamsStatics.OPENING_DIV_SIZE..];
109-
if(description.EndsWith("</div>"))
109+
if (description.EndsWith("</div>"))
110110
description = description[0..^MicrosoftTeamsStatics.CLOSING_DIV_SIZE];
111111
return description;
112112
}

0 commit comments

Comments
 (0)