run build

This commit is contained in:
Jake Hiller 2020-06-24 09:50:07 -04:00
parent 1ec19bd242
commit 97f736d3a4
2 changed files with 34 additions and 12 deletions

View file

@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
});
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.deleteComment = exports.createComment = exports.updateComment = exports.findPreviousComment = void 0;
function headerComment(header) {
return `<!-- Sticky Pull Request Comment${header} -->`;
}
@ -26,9 +27,15 @@ function updateComment(octokit, repo, comment_id, body, header, previousBody) {
});
}
exports.updateComment = updateComment;
function createComment(octokit, repo, issue_number, body, header) {
function createComment(octokit, repo, issue_number, body, header, previousBody) {
return __awaiter(this, void 0, void 0, function* () {
yield octokit.issues.createComment(Object.assign(Object.assign({}, repo), { issue_number, body: `${headerComment(header)}\n${body}` }));
yield octokit.issues.createComment(Object.assign(Object.assign({}, repo), { issue_number, body: previousBody ? `${previousBody}\n${body}` : `${headerComment(header)}\n${body}` }));
});
}
exports.createComment = createComment;
function deleteComment(octokit, repo, comment_id) {
return __awaiter(this, void 0, void 0, function* () {
yield octokit.issues.deleteComment(Object.assign(Object.assign({}, repo), { comment_id }));
});
}
exports.deleteComment = deleteComment;