Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Commit

Permalink
Show package emoji in Pull request title for Azure DevOps. (#842)
Browse files Browse the repository at this point in the history
* Show package emoji in Pull request title for Azure DevOps.

* Fixed implementation. Fixed tests.
  • Loading branch information
MaxMommersteeg authored and shep1987 committed Jul 5, 2019
1 parent a7d08c0 commit 8a4c636
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions NuKeeper.AzureDevOps/AzureDevOpsCommitWorder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ public string MakePullRequestTitle(IReadOnlyCollection<PackageUpdateSet> updates
return PackageTitle(updates.First());
}

return $"Automatic update of {updates.Count} packages";
return $"{CommitEmoji} Automatic update of {updates.Count} packages";
}

private static string PackageTitle(PackageUpdateSet updates)
{
return $"Automatic update of {updates.SelectedId} to {updates.SelectedVersion}";
return $"{CommitEmoji} Automatic update of {updates.SelectedId} to {updates.SelectedVersion}";
}

public string MakeCommitMessage(PackageUpdateSet updates)
{
return $"{CommitEmoji} {PackageTitle(updates)}";
return $"{PackageTitle(updates)}";
}

public string MakeCommitDetails(IReadOnlyCollection<PackageUpdateSet> updates)
Expand Down
2 changes: 1 addition & 1 deletion Nukeeper.AzureDevOps.Tests/AzureDevOpsCommitWorderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void MarkPullRequestTitle_UpdateIsCorrect()

Assert.That(report, Is.Not.Null);
Assert.That(report, Is.Not.Empty);
Assert.That(report, Is.EqualTo("Automatic update of foo.bar to 1.2.3"));
Assert.That(report, Is.EqualTo($"{CommitEmoji} Automatic update of foo.bar to 1.2.3"));
}

[Test]
Expand Down

0 comments on commit 8a4c636

Please sign in to comment.