This commit is contained in:
2018-07-23 17:36:47 +05:30
parent 88eac3d247
commit 7c40e1e4b1
5 changed files with 110 additions and 20 deletions

View File

@@ -234,8 +234,6 @@ module.exports = class Github {
}
displayLastComment(repoName, issueNumber) {
repoName = "stack_route_prj7";
issueNumber = 2;
let url = 'https://api.github.com/repos/mohiit1502/' + repoName + '/issues/' + issueNumber + "/comments";
var comments = [];
var latestComment = "";
@@ -248,13 +246,13 @@ module.exports = class Github {
}
)
.then(function(response) {
response.json().then(function(body){
comments = body;
latestComment = githubHelper.getLatestComment(comments);
console.log(comments);
console.log(latestComment);
return latestComment;
});
dom.toggleModals(response);
// response.json().then(function(body){
// comments = body;
// latestComment = githubHelper.getLatestComment(comments);
// console.log(comments);
// console.log(latestComment);
// });
})
.catch(error => console.error('Fetch Error =\n', error));
}