mirror of
https://github.com/softprops/action-gh-release.git
synced 2024-11-27 14:02:53 +03:00
Now trying read body path first then falling back on body
This commit is contained in:
parent
affa18ef97
commit
dac15d39e4
@ -58,9 +58,9 @@ describe("util", () => {
|
||||
})
|
||||
);
|
||||
});
|
||||
it("defaults to body when both body and body path are provided", () => {
|
||||
it("defaults to body path when both body and body path are provided", () => {
|
||||
assert.equal(
|
||||
"foo",
|
||||
"bar",
|
||||
releaseBody({
|
||||
github_ref: "",
|
||||
github_repository: "",
|
||||
|
@ -19,9 +19,9 @@ export interface Config {
|
||||
|
||||
export const releaseBody = (config: Config): string | undefined => {
|
||||
return (
|
||||
config.input_body ||
|
||||
(config.input_body_path &&
|
||||
readFileSync(config.input_body_path).toString("utf8"))
|
||||
readFileSync(config.input_body_path).toString("utf8")) ||
|
||||
config.input_body
|
||||
);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user