@@ -97,8 +97,8 @@ public static AzureDevOpsPullRequest AzureDevOpsPullRequestUsingAzurePipelinesOA
9797 /// Make sure the build has the 'Allow Scripts to access OAuth token' option enabled.
9898 /// </summary>
9999 /// <param name="context">The context.</param>
100- /// <param name="throwExceptionIfPullRequestCouldNotBeFound ">Value indicating whether an exception
101- /// should be thrown if pull request could not be found.</param>
100+ /// <param name="throwException ">Value indicating whether an exception
101+ /// should be thrown if not running in Azure Pipelines or pull request could not be found.</param>
102102 /// <example>
103103 /// <para>Get a pull request:</para>
104104 /// <code>
@@ -109,32 +109,33 @@ public static AzureDevOpsPullRequest AzureDevOpsPullRequestUsingAzurePipelinesOA
109109 /// </code>
110110 /// </example>
111111 /// <returns>Description of the pull request.
112- /// Returns <c>null</c> if pull request could not be found and
113- /// <paramref name="throwExceptionIfPullRequestCouldNotBeFound"/> is set to <c>false</c>.</returns>
114- /// <exception cref="InvalidOperationException">If build is not running in Azure Pipelines,
115- /// build is not for a pull request or 'Allow Scripts to access OAuth token' option is not enabled
116- /// on the build definition.</exception>
117- /// <exception cref="AzureDevOpsPullRequestNotFoundException">If pull request could not be found and
118- /// <paramref name="throwExceptionIfPullRequestCouldNotBeFound"/> is set to <c>true</c>.</exception>
112+ /// Returns <c>null</c> if pull request could not be found or if not running in an Azure Pipelines build and
113+ /// <paramref name="throwException"/> is set to <c>false</c>.</returns>
114+ /// <exception cref="InvalidOperationException">If <paramref name="throwException"/>
115+ /// is set to <c>true</c> and build is not running in Azure Pipelines, build is not for a pull request or
116+ /// 'Allow Scripts to access OAuth token' option is not enabled on the build definition.</exception>
117+ /// <exception cref="AzureDevOpsPullRequestNotFoundException">If
118+ /// <paramref name="throwException"/> is set to <c>true</c> and pull request
119+ /// could not be found.</exception>
119120 [ CakeMethodAlias ]
120121 [ CakeAliasCategory ( "Pull Request" ) ]
121122 [ CakeNamespaceImport ( "Cake.AzureDevOps.Repos" ) ]
122123 [ CakeNamespaceImport ( "Cake.AzureDevOps.Repos.PullRequest" ) ]
123124 [ CakeNamespaceImport ( "Cake.AzureDevOps.Repos.PullRequest.CommentThread" ) ]
124125 public static AzureDevOpsPullRequest AzureDevOpsPullRequestUsingAzurePipelinesOAuthToken (
125126 this ICakeContext context ,
126- bool throwExceptionIfPullRequestCouldNotBeFound )
127+ bool throwException )
127128 {
128129 context . NotNull ( nameof ( context ) ) ;
129130
130- var settings = AzureDevOpsPullRequestSettings . UsingAzurePipelinesOAuthToken ( throwExceptionIfPullRequestCouldNotBeFound ) ;
131+ var settings = AzureDevOpsPullRequestSettings . UsingAzurePipelinesOAuthToken ( throwException ) ;
131132
132133 if ( settings == null )
133134 {
134135 return null ;
135136 }
136137
137- settings . ThrowExceptionIfPullRequestCouldNotBeFound = throwExceptionIfPullRequestCouldNotBeFound ;
138+ settings . ThrowExceptionIfPullRequestCouldNotBeFound = throwException ;
138139
139140 return AzureDevOpsPullRequest ( context , settings ) ;
140141 }
0 commit comments