Backport #37189 by @bircni If a workflow is not in default branch the hooks could not be detected Fixes #37169 Co-authored-by: Nicolas <bircni@icloud.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>