Class: Types::Namespaces::LinkPaths::ProjectNamespaceLinksType

Inherits:
BaseObject
  • Object
show all
Defined in:
app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb

Overview

rubocop:disable Graphql/AuthorizeTypes – parent is already authorized

Instance Method Summary collapse

Methods inherited from BaseObject

accepts, assignable?, authorization, authorization_scopes, authorize, authorized?, #current_user, #id

Methods included from Gitlab::Graphql::Present

#present, #unpresented

Instance Method Details

#calendar_pathObject



73
74
75
76
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 73

def calendar_path
  base_path = url_helpers.project_work_items_path(project)
  url_helpers.project_work_items_path(project, url_helpers.feed_url_options(:ics, base_path))
end

#contribution_guide_pathObject



50
51
52
53
54
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 50

def contribution_guide_path
  return unless project&.repository

  ::ProjectPresenter.new(project).contribution_guide_path
end

#export_csv_pathObject



82
83
84
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 82

def export_csv_path
  url_helpers.export_csv_project_issues_path(project)
end

#group_pathObject



90
91
92
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 90

def group_path
  group&.full_path
end

#issues_listObject



34
35
36
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 34

def issues_list
  url_helpers.project_issues_path(project)
end

#issues_list_pathObject



94
95
96
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 94

def issues_list_path
  url_helpers.project_issues_path(project)
end

#labels_manageObject



38
39
40
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 38

def labels_manage
  url_helpers.project_labels_path(project)
end

#namespace_full_pathObject



78
79
80
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 78

def namespace_full_path
  project.namespace.full_path
end

#new_comment_templateObject



46
47
48
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 46

def new_comment_template
  url_helpers.new_comment_template_paths(group, project)
end

#new_issue_pathObject



86
87
88
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 86

def new_issue_path
  url_helpers.new_project_issue_path(project)
end

#new_projectObject



42
43
44
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 42

def new_project
  url_helpers.new_project_path(namespace_id: group&.id)
end

#new_work_item_email_addressObject



56
57
58
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 56

def new_work_item_email_address
  project.new_issuable_address(current_user, 'issue')
end

#project_import_jira_pathObject



64
65
66
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 64

def project_import_jira_path
  url_helpers.project_import_jira_path(project)
end

#releases_pathObject



60
61
62
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 60

def releases_path
  url_helpers.project_releases_path(project, format: :json)
end

#rss_pathObject



68
69
70
71
# File 'app/graphql/types/namespaces/link_paths/project_namespace_links_type.rb', line 68

def rss_path
  base_path = url_helpers.project_work_items_path(project)
  url_helpers.project_work_items_path(project, url_helpers.feed_url_options(:atom, base_path))
end