specify the type
This commit is contained in:
parent
8207a5f128
commit
624adc1976
@ -276,12 +276,12 @@ export function isIssuesAssignedEvent(
|
|||||||
export function isEntityContext(
|
export function isEntityContext(
|
||||||
context: GitHubContext,
|
context: GitHubContext,
|
||||||
): context is ParsedGitHubContext {
|
): context is ParsedGitHubContext {
|
||||||
return ENTITY_EVENT_NAMES.includes(context.eventName as any);
|
return ENTITY_EVENT_NAMES.includes(context.eventName as EntityEventName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Type guard to check if context is an automation context
|
// Type guard to check if context is an automation context
|
||||||
export function isAutomationContext(
|
export function isAutomationContext(
|
||||||
context: GitHubContext,
|
context: GitHubContext,
|
||||||
): context is AutomationContext {
|
): context is AutomationContext {
|
||||||
return AUTOMATION_EVENT_NAMES.includes(context.eventName as any);
|
return AUTOMATION_EVENT_NAMES.includes(context.eventName as AutomationEventName);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user