Skip to content

Commit dac15d3

Browse files
authored
fix: Get the same behavior described in Docs(#71) (#85)
Now trying read body path first then falling back on body
1 parent affa18e commit dac15d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

__tests__/util.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ describe("util", () => {
5858
})
5959
);
6060
});
61-
it("defaults to body when both body and body path are provided", () => {
61+
it("defaults to body path when both body and body path are provided", () => {
6262
assert.equal(
63-
"foo",
63+
"bar",
6464
releaseBody({
6565
github_ref: "",
6666
github_repository: "",

src/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ export interface Config {
1919

2020
export const releaseBody = (config: Config): string | undefined => {
2121
return (
22-
config.input_body ||
2322
(config.input_body_path &&
24-
readFileSync(config.input_body_path).toString("utf8"))
23+
readFileSync(config.input_body_path).toString("utf8")) ||
24+
config.input_body
2525
);
2626
};
2727

0 commit comments

Comments
 (0)