Skip to content

Commit 0bbb9f8

Browse files
AnnaOparevaAnna OparevaSimonAlling
authored
Fix documentation, comment and condition for getEndpointAuthorization function (#790)
* fix doc, comment and condition * bumped version * bump version * fix documentation Co-authored-by: Anna Opareva <[email protected]> Co-authored-by: Simon Alling <[email protected]>
1 parent 96ad5c6 commit 0bbb9f8

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

node/docs/azure-pipelines-task-lib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ scheme | string | auth scheme such as OAuth or username/password etc...
616616

617617
### task.getEndpointAuthorization <a href="#index">(^)</a>
618618
Gets the authorization details for a service endpoint
619-
If the authorization was not set and is not optional, it will throw.
619+
If the authorization was not set and is not optional, it will set the task result to Failed.
620620

621621
@returns string
622622
```javascript

node/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "azure-pipelines-task-lib",
3-
"version": "3.1.8",
3+
"version": "3.1.9",
44
"description": "Azure Pipelines Task SDK",
55
"main": "./task.js",
66
"typings": "./task.d.ts",

node/task.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ export interface EndpointAuthorization {
407407

408408
/**
409409
* Gets the authorization details for a service endpoint
410-
* If the authorization was not set and is not optional, it will throw.
410+
* If the authorization was not set and is not optional, it will set the task result to Failed.
411411
*
412412
* @param id name of the service endpoint
413413
* @param optional whether the url is optional
@@ -420,7 +420,7 @@ export function getEndpointAuthorization(id: string, optional: boolean): Endpoin
420420
setResult(TaskResult.Failed, loc('LIB_EndpointAuthNotExist', id));
421421
}
422422

423-
debug(id + ' exists ' + (aval !== null));
423+
debug(id + ' exists ' + (!!aval));
424424

425425
var auth: EndpointAuthorization | undefined;
426426
try {

0 commit comments

Comments
 (0)