Return inactive checks with inactive status
Background
In #423110 (comment 1563191173), it was agreed on that if there checks that don't run because they are disable in settings, we should return still return them but with inactive
status.
Proposal
Once #423110 (closed) is delivered, we can modify the mergeability checks that can be inactive and return them with status
as inactive
when mergeabilityChecks
is queried.
Following checks can be inactive depending on settings/license:
-
CheckCiStatusService
- should run ifProject#only_allow_merge_if_pipeline_succeeds?
returnstrue
. -
CheckDiscussionsStatusService
- should run ifProject#only_allow_merge_if_all_discussions_are_resolved?(inherit_group_setting: true)
returnstrue
. -
CheckRebaseStatusService
- should run ifProject#ff_merge_must_be_possible?
istrue
. -
CheckApprovedService
- should run ifmerge_request.approval_feature_available?
returnstrue
. -
CheckBlockedByOtherMrsService
- should run ifproject.feature_available?(:blocking_merge_requests)
istrue
. -
CheckDeniedPoliciesService
- should run ifproject.feature_available?(:license_scanning)
istrue
-
CheckExternalStatusChecksPassedService
- should run ifproject.licensed_feature_available?(:external_status_checks) && project.only_allow_merge_if_all_status_checks_passed
istrue
Edited by Patrick Bajao