Skip to content

Commit

Permalink
Add CodeReviewId property to pull request description
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalberger committed Aug 22, 2018
1 parent fa73192 commit 808b344
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Cake.Tfs/PullRequest/TfsPullRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,26 @@ public int PullRequestId
}
}

/// <summary>
/// Gets the ID of the code review.
/// Returns 0 if no pull request could be found and
/// <see cref="TfsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>false</c>.
/// </summary>
/// <exception cref="TfsException">If pull request could not be found and
/// <see cref="TfsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
public int CodeReviewId
{
get
{
if (!this.ValidatePullRequest())
{
return 0;
}

return this.pullRequest.CodeReviewId;
}
}

/// <summary>
/// Gets the hash of the latest commit on the source branch.
/// Returns <see cref="string.Empty"/> if no pull request could be found and
Expand Down

0 comments on commit 808b344

Please sign in to comment.