Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix documentation, comment and condition for getEndpointAuthorization function #790

Merged
merged 6 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion node/docs/azure-pipelines-task-lib.md
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ scheme | string | auth scheme such as OAuth or username/password etc...

### task.getEndpointAuthorization <a href="#index">(^)</a>
Gets the authorization details for a service endpoint
If the authorization was not set and is not optional, it will throw.
If the authorization was not set and is not optional, it will specify task result as failed in case of exception.

@returns string
```javascript
Expand Down
2 changes: 1 addition & 1 deletion node/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "azure-pipelines-task-lib",
"version": "3.1.8",
"version": "3.1.9",
AnnaOpareva marked this conversation as resolved.
Show resolved Hide resolved
"description": "Azure Pipelines Task SDK",
"main": "./task.js",
"typings": "./task.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions node/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ export interface EndpointAuthorization {

/**
* Gets the authorization details for a service endpoint
* If the authorization was not set and is not optional, it will throw.
* If the authorization was not set and is not optional, it will specify task result as failed in case of exception.
AnnaOpareva marked this conversation as resolved.
Show resolved Hide resolved
*
* @param id name of the service endpoint
* @param optional whether the url is optional
Expand All @@ -420,7 +420,7 @@ export function getEndpointAuthorization(id: string, optional: boolean): Endpoin
setResult(TaskResult.Failed, loc('LIB_EndpointAuthNotExist', id));
}

debug(id + ' exists ' + (aval !== null));
debug(id + ' exists ' + (!!aval));
AnnaOpareva marked this conversation as resolved.
Show resolved Hide resolved

var auth: EndpointAuthorization | undefined;
try {
Expand Down