mirror of
https://github.com/marocchino/sticky-pull-request-comment.git
synced 2025-12-16 05:06:31 +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() => {
|
it("without comment body and previousbody", async() => {
|
||||||
expect(
|
expect(
|
||||||
await updateComment(octokit, repo, 456, "", "")
|
await updateComment(octokit, repo, 456, "", null)
|
||||||
).toBeUndefined();
|
).toBeUndefined();
|
||||||
expect(octokit.issues.updateComment).not.toBeCalled();
|
expect(octokit.issues.updateComment).not.toBeCalled();
|
||||||
expect(core.warning).toBeCalledWith('Comment body cannot be blank');
|
expect(core.warning).toBeCalledWith('Comment body cannot be blank');
|
||||||
|
|
@ -136,7 +136,7 @@ describe("createComment", () => {
|
||||||
})
|
})
|
||||||
it("without comment body and previousBody", async () => {
|
it("without comment body and previousBody", async () => {
|
||||||
expect(
|
expect(
|
||||||
await createComment(octokit, repo, 456, "", "")
|
await createComment(octokit, repo, 456, "", null)
|
||||||
).toBeUndefined();
|
).toBeUndefined();
|
||||||
expect(octokit.issues.createComment).not.toBeCalled();
|
expect(octokit.issues.createComment).not.toBeCalled();
|
||||||
expect(core.warning).toBeCalledWith('Comment body cannot be blank');
|
expect(core.warning).toBeCalledWith('Comment body cannot be blank');
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ async function run() {
|
||||||
let body;
|
let body;
|
||||||
|
|
||||||
if (path) {
|
if (path) {
|
||||||
body = readFileSync(path);
|
body = readFileSync(path, 'utf-8');
|
||||||
} else {
|
} else {
|
||||||
body = message;
|
body = message;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue