fix: Get the same behavior described in Docs(#71) (#85)

Now trying read body path first then falling back on body
This commit is contained in:
A1lo 2021-03-21 13:52:16 +08:00 committed by GitHub
parent affa18ef97
commit dac15d39e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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
);
};