build: build custom header implement

- c873eaf
- test it
This commit is contained in:
marocchino 2020-02-04 17:24:40 +09:00
parent c873eaf14f
commit 033d20d120
No known key found for this signature in database
GPG key ID: AFF521DBDB122570
5 changed files with 21 additions and 14 deletions

View file

@ -1,3 +1,7 @@
function headerComment(header) {
return `<!-- Sticky Pull Request Comment${header} -->`;
}
export async function findPreviousComment(octokit, repo, issue_number, header) {
const { data: comments } = await octokit.issues.listComments({
...repo,
@ -20,7 +24,3 @@ export async function createComment(octokit, repo, issue_number, body, header) {
body: `${headerComment(header)}\n${body}`
});
}
function headerComment(header) {
return `<!-- Sticky Pull Request Comment${header} -->`;
}