Skip to content

Commit b771b6c

Browse files
authored
GetIterationChanges should return empty collection instead of null (#459)
1 parent e9c8015 commit b771b6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Cake.AzureDevOps/Repos/PullRequest/AzureDevOpsPullRequest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,12 +771,12 @@ public int GetLatestIterationId()
771771
/// Gets all the pull request changes of the given iteration.
772772
/// </summary>
773773
/// <param name="iterationId">The id of the iteration.</param>
774-
/// <returns>The collection of the iteration changes of the given id. Returns <c>null</c> if pull request is not valid.</returns>
774+
/// <returns>The collection of the iteration changes of the given id. Returns an empty collection if pull request is not valid.</returns>
775775
public IEnumerable<AzureDevOpsPullRequestIterationChange> GetIterationChanges(int iterationId)
776776
{
777777
if (!this.ValidatePullRequest())
778778
{
779-
return null;
779+
return [];
780780
}
781781

782782
using (var gitClient = this.gitClientFactory.CreateGitClient(this.CollectionUrl, this.credentials))

0 commit comments

Comments
 (0)