Fixes #37 Add discussion category action argument.

This commit is contained in:
Nick Cipollo
2021-04-07 17:28:14 -04:00
parent 8f0b206fd3
commit a43fb1aa82
11 changed files with 132 additions and 38 deletions

View File

@@ -11,6 +11,7 @@ export interface Inputs {
readonly commit: string
readonly createdReleaseBody?: string
readonly createdReleaseName?: string
readonly discussionCategory?: string
readonly draft: boolean
readonly owner: string
readonly prerelease: boolean
@@ -66,7 +67,7 @@ export class CoreInputs implements Inputs {
return core.getInput('omitBody') == 'true'
}
private get body() : string | undefined {
private get body(): string | undefined {
const body = core.getInput('body')
if (body) {
return body
@@ -89,6 +90,14 @@ export class CoreInputs implements Inputs {
return this.name
}
get discussionCategory(): string | undefined {
const category = core.getInput('discussionCategory')
if (category) {
return category
}
return undefined
}
private static get omitName(): boolean {
return core.getInput('omitName') == 'true'
}
@@ -162,7 +171,7 @@ export class CoreInputs implements Inputs {
}
get updatedReleaseName(): string | undefined {
if (CoreInputs.omitName || CoreInputs.omitNameDuringUpdate) return undefined
if (CoreInputs.omitName || CoreInputs.omitNameDuringUpdate) return undefined
return this.name
}