mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
5c198049f7
Previously, @danslo reported that he tried to use `custom_versions` without setting the kind. This isn't the correct behavior. I've added a validator to alert him of this.
12 lines
298 B
TypeScript
12 lines
298 B
TypeScript
import { KNOWN_KINDS, Kind } from "../kinds";
|
|
|
|
export const isKnownKind = (kind: Kind): boolean => {
|
|
if(!(kind in KNOWN_KINDS)) {
|
|
throw new Error(
|
|
`Invalid kind provided, supported kinds are: ${Object.keys(KNOWN_KINDS).join(', ')}`
|
|
);
|
|
}
|
|
|
|
return true;
|
|
};
|