mirror of
https://github.com/mshick/add-pr-comment.git
synced 2025-12-31 22:29:45 +11:00
Issue number (#64)
* Major code reorg * Add issue arg * Paginate existing comment list
This commit is contained in:
parent
e8076c64f7
commit
8645f3f0ea
17 changed files with 2187 additions and 1968 deletions
13
lib/proxy.js
Normal file
13
lib/proxy.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createCommentProxy = void 0;
|
||||
const http_client_1 = require("@actions/http-client");
|
||||
async function createCommentProxy(params) {
|
||||
const { repoToken, owner, repo, issueNumber, body, commentId, proxyUrl } = params;
|
||||
const http = new http_client_1.HttpClient('http-client-add-pr-comment');
|
||||
const response = await http.postJson(`${proxyUrl}/repos/${owner}/${repo}/issues/${issueNumber}/comments`, { comment_id: commentId, body }, {
|
||||
['temporary-github-token']: repoToken,
|
||||
});
|
||||
return response.result;
|
||||
}
|
||||
exports.createCommentProxy = createCommentProxy;
|
||||
Loading…
Add table
Add a link
Reference in a new issue