@@ -466,7 +466,10 @@ public IEnumerable<AzureDevOpsCommit> GetCommits()
466
466
/// <summary>
467
467
/// Gets the files modified by the pull request.
468
468
/// </summary>
469
- /// <returns>The collection of the modified files paths.</returns>
469
+ /// <returns>The collection of the modified files paths or an empty list if no pull request could be found and
470
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>false</c>..</returns>
471
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
472
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
470
473
public IEnumerable < FilePath > GetModifiedFiles ( )
471
474
{
472
475
if ( ! this . ValidatePullRequest ( ) )
@@ -526,7 +529,10 @@ public IEnumerable<FilePath> GetModifiedFiles()
526
529
/// <summary>
527
530
/// Gets the pull request comment threads.
528
531
/// </summary>
529
- /// <returns>The list of comment threads of the pull request.</returns>
532
+ /// <returns>The list of comment threads of the pull request or an empty list if no pull request could be found and
533
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>false</c>.</returns>
534
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
535
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
530
536
public IEnumerable < AzureDevOpsPullRequestCommentThread > GetCommentThreads ( )
531
537
{
532
538
if ( ! this . ValidatePullRequest ( ) )
@@ -550,6 +556,8 @@ public IEnumerable<AzureDevOpsPullRequestCommentThread> GetCommentThreads()
550
556
/// Sets the pull request comment thread status to <see cref="CommentThreadStatus.Fixed"/>.
551
557
/// </summary>
552
558
/// <param name="threadId">The Id of the comment thread.</param>
559
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
560
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
553
561
public void ResolveCommentThread ( int threadId )
554
562
{
555
563
this . SetCommentThreadStatus ( threadId , CommentThreadStatus . Fixed ) ;
@@ -559,6 +567,8 @@ public void ResolveCommentThread(int threadId)
559
567
/// Sets the pull request comment thread to <see cref="CommentThreadStatus.Active"/>.
560
568
/// </summary>
561
569
/// <param name="threadId">The Id of the comment thread.</param>
570
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
571
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
562
572
public void ActivateCommentThread ( int threadId )
563
573
{
564
574
this . SetCommentThreadStatus ( threadId , CommentThreadStatus . Active ) ;
@@ -568,6 +578,8 @@ public void ActivateCommentThread(int threadId)
568
578
/// Sets the pull request comment thread to <see cref="CommentThreadStatus.Closed"/>.
569
579
/// </summary>
570
580
/// <param name="threadId">The Id of the comment thread.</param>
581
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
582
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
571
583
public void CloseCommentThread ( int threadId )
572
584
{
573
585
this . SetCommentThreadStatus ( threadId , CommentThreadStatus . Closed ) ;
@@ -577,7 +589,10 @@ public void CloseCommentThread(int threadId)
577
589
/// Creates a new comment thread with a single comment in the pull request.
578
590
/// </summary>
579
591
/// <param name="comment">Comment which should be added.</param>
580
- /// <returns>A newly created comment thread, or null if it can't be created.</returns>
592
+ /// <returns>A newly created comment thread, or <see langword="null"/> if no pull request could be found and
593
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>false</c>..</returns>
594
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
595
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
581
596
public AzureDevOpsPullRequestCommentThread CreateComment ( string comment )
582
597
{
583
598
comment . NotNullOrWhiteSpace ( nameof ( comment ) ) ;
@@ -606,7 +621,10 @@ public AzureDevOpsPullRequestCommentThread CreateComment(string comment)
606
621
/// <param name="filePath">Path to the file to create the comment for.</param>
607
622
/// <param name="lineNumber">The line number of a thread's position. Starts at 1.</param>
608
623
/// <param name="offset">The character offset of a thread's position inside of a line. Starts at 0.</param>
609
- /// <returns>A newly created comment thread, or null if it can't be created.</returns>
624
+ /// <returns>A newly created comment thread, or <see langword="null"/> if no pull request could be found and
625
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>false</c>..</returns>
626
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
627
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
610
628
public AzureDevOpsPullRequestCommentThread CreateComment ( string comment , FilePath filePath , int lineNumber , int offset )
611
629
{
612
630
comment . NotNullOrWhiteSpace ( nameof ( comment ) ) ;
@@ -673,7 +691,10 @@ public void DeleteComment(AzureDevOpsComment comment)
673
691
/// Updates the comment.
674
692
/// </summary>
675
693
/// <param name="comment">The updated comment.</param>
676
- /// <returns>The updated comment, or <c>null</c> if it can't be updated.</returns>
694
+ /// <returns>The updated comment, or <see langword="null"/> if no pull request could be found and
695
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>false</c>..</returns>
696
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
697
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
677
698
public AzureDevOpsComment UpdateComment ( AzureDevOpsComment comment )
678
699
{
679
700
comment . NotNull ( nameof ( comment ) ) ;
@@ -710,7 +731,10 @@ public AzureDevOpsComment UpdateComment(AzureDevOpsComment comment)
710
731
/// Creates a new comment thread in the pull request.
711
732
/// </summary>
712
733
/// <param name="thread">The instance of the thread.</param>
713
- /// <returns>A newly created comment thread, or <c>null</c> if it can't be created.</returns>
734
+ /// <returns>A newly created comment thread, or <see langword="null"/> if no pull request could be found and
735
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>false</c>..</returns>
736
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
737
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
714
738
public AzureDevOpsPullRequestCommentThread CreateCommentThread ( AzureDevOpsPullRequestCommentThread thread )
715
739
{
716
740
thread . NotNull ( nameof ( thread ) ) ;
@@ -743,7 +767,10 @@ public AzureDevOpsPullRequestCommentThread CreateCommentThread(AzureDevOpsPullRe
743
767
/// <summary>
744
768
/// Gets the Id of the latest pull request iteration.
745
769
/// </summary>
746
- /// <returns>The Id of the pull request iteration. Returns -1 in case the pull request is not valid.</returns>
770
+ /// <returns>The Id of the pull request iteration or <c>-1</c> if no pull request could be found and
771
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>false</c>..</returns>
772
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
773
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
747
774
/// <exception cref="AzureDevOpsException">If it is not possible to obtain a collection of <see cref="GitPullRequestIteration"/>.</exception>
748
775
public int GetLatestIterationId ( )
749
776
{
@@ -771,7 +798,10 @@ public int GetLatestIterationId()
771
798
/// Gets all the pull request changes of the given iteration.
772
799
/// </summary>
773
800
/// <param name="iterationId">The id of the iteration.</param>
774
- /// <returns>The collection of the iteration changes of the given id. Returns an empty collection if pull request is not valid.</returns>
801
+ /// <returns>The collection of the iteration changes of the given id or an empty list if no pull request could be found and
802
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>false</c>..</returns>
803
+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
804
+ /// <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
775
805
public IEnumerable < AzureDevOpsPullRequestIterationChange > GetIterationChanges ( int iterationId )
776
806
{
777
807
if ( ! this . ValidatePullRequest ( ) )
@@ -905,7 +935,7 @@ private void SetCommentThreadStatus(int threadId, CommentThreadStatus status)
905
935
/// <summary>
906
936
/// Validates if a pull request could be found.
907
937
/// Depending on <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/>
908
- /// the pull request instance can be null for subsequent calls.
938
+ /// the pull request instance can be <see langword=" null"/> for subsequent calls.
909
939
/// </summary>
910
940
/// <returns>True if a valid pull request instance exists.</returns>
911
941
/// <exception cref="AzureDevOpsPullRequestNotFoundException">If <see cref="AzureDevOpsPullRequestSettings.ThrowExceptionIfPullRequestCouldNotBeFound"/>
0 commit comments