Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/graphql/types/projects/branch_rule_type.rb')
-rw-r--r--app/graphql/types/projects/branch_rule_type.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/graphql/types/projects/branch_rule_type.rb b/app/graphql/types/projects/branch_rule_type.rb
index 866cff0f439..e7632c17cca 100644
--- a/app/graphql/types/projects/branch_rule_type.rb
+++ b/app/graphql/types/projects/branch_rule_type.rb
@@ -13,6 +13,13 @@ module Types
null: false,
description: 'Branch name, with wildcards, for the branch rules.'
+ field :is_default,
+ type: GraphQL::Types::Boolean,
+ null: false,
+ method: :default_branch?,
+ calls_gitaly: true,
+ description: "Check if this branch rule protects the project's default branch."
+
field :branch_protection,
type: Types::BranchRules::BranchProtectionType,
null: false,
@@ -31,3 +38,5 @@ module Types
end
end
end
+
+Types::Projects::BranchRuleType.prepend_mod