• Stan Hu's avatar
    Disable commit checks when no push rules are active · 7fad50ba
    Stan Hu authored
    The refactoring in 0a8db3dc
    inadvertently caused commit checks to become active regardless of
    whether any rules were actually active. This significantly slowed pushes
    and caused repositories with large number of commits to time out.
    
    We fix this by using `push_rule_checks_commit?` since the existence of a
    `PushRule` is not sufficient to determine whether any rules are
    active. This also eliminates the need to override
    `should_run_diff_validations?`, since the set of validations will only
    contain the active ones.
    
    Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/57067
    7fad50ba
diff_check_spec.rb 4.4 KB