diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-19 18:19:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-19 18:19:34 +0300 |
commit | b6d63c915a91aeb7a4437349c53e68be8c50cf4e (patch) | |
tree | 8617959c1d6b9137e4cefad06aedbf574295cd6c /app/graphql/types | |
parent | 2017bc90a671eac669f0114b6ef508e151409c4f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql/types')
-rw-r--r-- | app/graphql/types/project_type.rb | 10 | ||||
-rw-r--r-- | app/graphql/types/projects/commit_parent_names_type.rb | 14 |
2 files changed, 24 insertions, 0 deletions
diff --git a/app/graphql/types/project_type.rb b/app/graphql/types/project_type.rb index 203c2568ce2..5ebc1cf7ddd 100644 --- a/app/graphql/types/project_type.rb +++ b/app/graphql/types/project_type.rb @@ -594,6 +594,16 @@ module Types authorize: :read_cycle_analytics, alpha: { milestone: '15.10' } + field :tags_tipping_at_commit, ::Types::Projects::CommitParentNamesType, + null: true, + resolver: Resolvers::Projects::TagsTippingAtCommitResolver, + description: "Get tag names tipping at a given commit." + + field :branches_tipping_at_commit, ::Types::Projects::CommitParentNamesType, + null: true, + resolver: Resolvers::Projects::BranchesTippingAtCommitResolver, + description: "Get branch names tipping at a given commit." + def timelog_categories object.project_namespace.timelog_categories if Feature.enabled?(:timelog_categories) end diff --git a/app/graphql/types/projects/commit_parent_names_type.rb b/app/graphql/types/projects/commit_parent_names_type.rb new file mode 100644 index 00000000000..0aa1ca768e9 --- /dev/null +++ b/app/graphql/types/projects/commit_parent_names_type.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module Types + module Projects + # rubocop: disable Graphql/AuthorizeTypes + class CommitParentNamesType < BaseObject + graphql_name 'CommitParentNames' + + field :names, [GraphQL::Types::String], null: true, description: 'Names of the commit parent (branch or tag).' + field :total_count, GraphQL::Types::Int, null: true, description: 'Total of parent branches or tags.' + end + # rubocop: enable Graphql/AuthorizeTypes + end +end |