mirror of
https://github.com/tj-actions/changed-files
synced 2024-12-16 09:27:57 +00:00
rename: unsupported REST API inputs constant name (#1872)
This commit is contained in:
parent
6c9dcea443
commit
cbd59070e8
4 changed files with 7 additions and 5 deletions
BIN
dist/index.js
generated
vendored
BIN
dist/index.js
generated
vendored
Binary file not shown.
BIN
dist/index.js.map
generated
vendored
BIN
dist/index.js.map
generated
vendored
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
import {Inputs} from './inputs'
|
||||
|
||||
export const UNSUPPORTED_REST_API_INPUTS: Partial<Inputs> = {
|
||||
export const DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS: Partial<Inputs> = {
|
||||
sha: '',
|
||||
baseSha: '',
|
||||
since: '',
|
||||
|
|
10
src/utils.ts
10
src/utils.ts
|
@ -10,7 +10,7 @@ import {createInterface} from 'readline'
|
|||
import {parseDocument} from 'yaml'
|
||||
import {ChangedFiles, ChangeTypeEnum} from './changedFiles'
|
||||
import {DiffResult} from './commitSha'
|
||||
import {UNSUPPORTED_REST_API_INPUTS} from './constant'
|
||||
import {DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS} from './constant'
|
||||
import {Inputs} from './inputs'
|
||||
|
||||
const MINIMUM_GIT_VERSION = '2.18.0'
|
||||
|
@ -1520,12 +1520,14 @@ export const warnUnsupportedRESTAPIInputs = async ({
|
|||
}: {
|
||||
inputs: Inputs
|
||||
}): Promise<void> => {
|
||||
for (const key of Object.keys(UNSUPPORTED_REST_API_INPUTS)) {
|
||||
for (const key of Object.keys(DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS)) {
|
||||
const defaultValue = Object.hasOwnProperty.call(
|
||||
UNSUPPORTED_REST_API_INPUTS,
|
||||
DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS,
|
||||
key
|
||||
)
|
||||
? UNSUPPORTED_REST_API_INPUTS[key as keyof Inputs]?.toString()
|
||||
? DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS[
|
||||
key as keyof Inputs
|
||||
]?.toString()
|
||||
: ''
|
||||
|
||||
if (defaultValue !== inputs[key as keyof Inputs]?.toString()) {
|
||||
|
|
Loading…
Reference in a new issue