(settings: SettingsJson | null)
| 6 | import { getPermissionRulesForSource } from '../../utils/permissions/permissionsLoader.js' |
| 7 | |
| 8 | function hasHooks(settings: SettingsJson | null): boolean { |
| 9 | if (settings === null || settings.disableAllHooks) { |
| 10 | return false |
| 11 | } |
| 12 | if (settings.statusLine) { |
| 13 | return true |
| 14 | } |
| 15 | if (settings.fileSuggestion) { |
| 16 | return true |
| 17 | } |
| 18 | if (!settings.hooks) { |
| 19 | return false |
| 20 | } |
| 21 | for (const hookConfig of Object.values(settings.hooks)) { |
| 22 | if (hookConfig.length > 0) { |
| 23 | return true |
| 24 | } |
| 25 | } |
| 26 | return false |
| 27 | } |
| 28 | |
| 29 | export function getHooksSources(): string[] { |
| 30 | const sources: string[] = [] |
no test coverage detected