mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-10 10:44:19 +00:00
run fmt change
Signed-off-by: Rui Chen <rui@chenrui.dev>
This commit is contained in:
parent
5ed9b1497e
commit
5e1d6ba652
2 changed files with 10 additions and 6 deletions
|
@ -95,8 +95,10 @@ export class GitHubReleaser implements Releaser {
|
|||
generate_release_notes: boolean | undefined;
|
||||
make_latest: "true" | "false" | "legacy" | undefined;
|
||||
}): Promise<{ data: Release }> {
|
||||
|
||||
if (typeof params.make_latest === 'string' && !["true", "false", "legacy"].includes(params.make_latest)) {
|
||||
if (
|
||||
typeof params.make_latest === "string" &&
|
||||
!["true", "false", "legacy"].includes(params.make_latest)
|
||||
) {
|
||||
params.make_latest = undefined;
|
||||
}
|
||||
|
||||
|
@ -117,8 +119,10 @@ export class GitHubReleaser implements Releaser {
|
|||
generate_release_notes: boolean | undefined;
|
||||
make_latest: "true" | "false" | "legacy" | undefined;
|
||||
}): Promise<{ data: Release }> {
|
||||
|
||||
if (typeof params.make_latest === 'string' && !["true", "false", "legacy"].includes(params.make_latest)) {
|
||||
if (
|
||||
typeof params.make_latest === "string" &&
|
||||
!["true", "false", "legacy"].includes(params.make_latest)
|
||||
) {
|
||||
params.make_latest = undefined;
|
||||
}
|
||||
|
||||
|
|
|
@ -76,13 +76,13 @@ export const parseConfig = (env: Env): Config => {
|
|||
};
|
||||
|
||||
const parseMakeLatest = (
|
||||
value: string | undefined
|
||||
value: string | undefined,
|
||||
): "true" | "false" | "legacy" | undefined => {
|
||||
if (value === "true" || value === "false" || value === "legacy") {
|
||||
return value;
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
export const paths = (patterns: string[]): string[] => {
|
||||
return patterns.reduce((acc: string[], pattern: string): string[] => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue