Skip to content

Commit

Permalink
Merge pull request #36 from keyoke/keyoke/features
Browse files Browse the repository at this point in the history
Keyoke/features
  • Loading branch information
keyoke authored Sep 16, 2021
2 parents 550fb96 + 08da194 commit 3705c32
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
24 changes: 19 additions & 5 deletions 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 package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"author": "Gareth Emslie",
"license": "MIT",
"dependencies": {
"Buffer": "0.0.0",
"buffer": "6.0.3",
"azure-devops-extension-api": "^1.158.0",
"azure-devops-extension-sdk": "^2.0.11",
"csvtojson": "^2.0.10",
Expand Down
6 changes: 3 additions & 3 deletions src/import-csv-discussions-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ class ImportCSVDiscussionsAction implements IContributedMenuSource {
a.download = "import-failed.csv";
a.href = `data:text/plain;base64,${base64}`;
a.click();

} catch (error) {
this._logger.error(error);
}
Expand Down Expand Up @@ -299,21 +298,22 @@ class ImportCSVDiscussionsAction implements IContributedMenuSource {
}).then(async (response: Response) => {
if (response.status >= 200 && response.status < 300) {
let json: string = await response.json();
this._logger.info(`Successfully added comment for id '${record.WorkItemId}'`);
// log any JSON to debug
this._logger.debug("json", json);
resolve(true);
}
else {
this._logger.info(`Failed adding comment for id '${record.WorkItemId}'`);
this._failures.push(Object.assign({}, record));
resolve(false);
}
}).catch((error: Error) => {
// Save this failure for later
this._logger.error(`Unhandled Error.`, error);
this._failures.push(Object.assign({}, record));
reject(error);
});

this._logger.info(`Successfully added comment for id '${record.WorkItemId}'`);
});
};

Expand Down

0 comments on commit 3705c32

Please sign in to comment.