Files
codeql-action/node_modules/@octokit/oauth-app/dist-src/emit-event.js
2025-02-19 11:13:12 -08:00

17 lines
415 B
JavaScript

async function emitEvent(state, context) {
const { name, action } = context;
if (state.eventHandlers[`${name}.${action}`]) {
for (const eventHandler of state.eventHandlers[`${name}.${action}`]) {
await eventHandler(context);
}
}
if (state.eventHandlers[name]) {
for (const eventHandler of state.eventHandlers[name]) {
await eventHandler(context);
}
}
}
export {
emitEvent
};