mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2026-05-16 08:15:53 +00:00
run build
This commit is contained in:
parent
1ec19bd242
commit
97f736d3a4
2 changed files with 34 additions and 12 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue