MCPcopy Index your code
hub / github.com/github/spec-kit / enable_hooks

Method enable_hooks

src/specify_cli/extensions/__init__.py:3471–3488  ·  view source on GitHub ↗

Enable all hooks for an extension. Args: extension_id: Extension ID

(self, extension_id: str)

Source from the content-addressed store, hash-verified

3469 }
3470
3471 def enable_hooks(self, extension_id: str):
3472 """Enable all hooks for an extension.
3473
3474 Args:
3475 extension_id: Extension ID
3476 """
3477 config = self.get_project_config()
3478
3479 if "hooks" not in config:
3480 return
3481
3482 # Enable all hooks for this extension
3483 for hook_name in config["hooks"]:
3484 for hook in config["hooks"][hook_name]:
3485 if hook.get("extension") == extension_id:
3486 hook["enabled"] = True
3487
3488 self.save_project_config(config)
3489
3490 def disable_hooks(self, extension_id: str):
3491 """Disable all hooks for an extension.

Callers

nothing calls this directly

Calls 3

get_project_configMethod · 0.95
save_project_configMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected