mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-14 20:41:15 +00:00
Convert buffer to string
This commit is contained in:
parent
f3bbb83000
commit
f6651c5728
2 changed files with 3 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ describe("updateComment", () => {
|
|||
|
||||
it("without comment body and previousbody", async() => {
|
||||
expect(
|
||||
await updateComment(octokit, repo, 456, "", "")
|
||||
await updateComment(octokit, repo, 456, "", null)
|
||||
).toBeUndefined();
|
||||
expect(octokit.issues.updateComment).not.toBeCalled();
|
||||
expect(core.warning).toBeCalledWith('Comment body cannot be blank');
|
||||
|
|
@ -136,7 +136,7 @@ describe("createComment", () => {
|
|||
})
|
||||
it("without comment body and previousBody", async () => {
|
||||
expect(
|
||||
await createComment(octokit, repo, 456, "", "")
|
||||
await createComment(octokit, repo, 456, "", null)
|
||||
).toBeUndefined();
|
||||
expect(octokit.issues.createComment).not.toBeCalled();
|
||||
expect(core.warning).toBeCalledWith('Comment body cannot be blank');
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ async function run() {
|
|||
let body;
|
||||
|
||||
if (path) {
|
||||
body = readFileSync(path);
|
||||
body = readFileSync(path, 'utf-8');
|
||||
} else {
|
||||
body = message;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue