mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-06-28 06:16:01 +00:00
Ignore null release body
Using the SOLIDSoftworks/semver-tags action will result in a release created that doesn't contain anything for the release body. The consequences is that the updated release body will appear to contain the string `null` followed by a newline and then the release body as specified for this action. In such a case it appears to make more sense to ignore the existing release body should it be currently `null` instead of implicitly converting it to a string for the updated release body.
This commit is contained in:
parent
9729932bfb
commit
175b44e02b
1 changed files with 5 additions and 1 deletions
|
@ -181,7 +181,11 @@ export const release = async (
|
|||
}
|
||||
const tag_name = tag;
|
||||
const name = config.input_name || tag;
|
||||
const body = `${existingRelease.data.body}\n${releaseBody(config)}`;
|
||||
let body: string = "";
|
||||
if (existingRelease.data.body != null) {
|
||||
body += `${existingRelease.data.body}\n`;
|
||||
}
|
||||
body += releaseBody(config);
|
||||
const draft = config.input_draft;
|
||||
const prerelease = config.input_prerelease;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue