mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-13 13:14:53 +00:00
feat(supported-version): validate custom_versions
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.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
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;
|
||||
};
|
||||
Reference in New Issue
Block a user