Class: Readiness::GitLab::Groups
- Inherits:
-
Client
- Object
- Client
- Readiness::GitLab::Groups
show all
- Defined in:
- lib/support_readiness/gitlab/groups.rb
Overview
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Client
auth_error, bad_request_error, convert_actions, convert_conditions, convert_standard_names_to_ids, convert_ticket_form_agent_conditions, convert_ticket_form_brands, convert_ticket_form_end_user_conditions, convert_ticket_form_names_to_ids, convert_view_names_to_ids, convert_view_restrictions, covert_ticket_form_field_ids, create_package!, erb_renderer, handle_request_error, not_found_error, not_processible_error, put_into_archive, recursively_deflate_directory, timestamp_filename, to_clean_json, to_clean_json_with_key, to_hash, to_nearly_clean_json, to_nearly_clean_json_with_key, to_param_string, write_entries
Constructor Details
#initialize(object = {}) ⇒ Groups
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# File 'lib/support_readiness/gitlab/groups.rb', line 25
def initialize(object = {})
@allowed_email_domains_list = object['allowed_email_domains_list']
@auto_devops_enabled = object['auto_devops_enabled']
@avatar_url = object['avatar_url']
@default_branch = object['default_branch']
@default_branch_protection = object['default_branch_protection']
@default_branch_protection_defaults = object['default_branch_protection_defaults']
@description = object['description']
@duo_features_enabled = object['duo_features_enabled']
@emails_disabled = object['emails_disabled']
@emails_enabled = object['emails_enabled']
@extra_shared_runners_minutes_limit = object['extra_shared_runners_minutes_limit']
@full_name = object['full_name']
@full_path = object['full_path']
@id = object['id']
@ip_restriction_ranges = object['ip_restriction_ranges']
@ldap_access = object['ldap_access']
@ldap_cn = object['ldap_cn']
@lfs_enabled = object['lfs_enabled']
@lock_duo_features_enabled = object['lock_duo_features_enabled']
@lock_math_rendering_limits_enabled = object['lock_math_rendering_limits_enabled']
@marked_for_deletion_on = object['marked_for_deletion_on']
@math_rendering_limits_enabled = object['math_rendering_limits_enabled']
@membership_lock = object['membership_lock']
@mentions_disabled = object['mentions_disabled']
@name = object['name']
@organization_id = object['organization_id']
@parent_id = object['parent_id']
@path = object['path']
@prevent_forking_outside_group = object['prevent_forking_outside_group']
@project_creation_level = object['project_creation_level']
@repository_storage = object['repository_storage']
@request_access_enabled = object['request_access_enabled']
@require_two_factor_authentication = object['require_two_factor_authentication']
@runners_token = object['runners_token']
@shared_runners_minutes_limit = object['shared_runners_minutes_limit']
@shared_runners_setting = object['shared_runners_setting']
@shared_with_groups = object['shared_with_groups']
@share_with_group_lock = object['share_with_group_lock']
@subgroup_creation_level = object['subgroup_creation_level']
@two_factor_grace_period = object['two_factor_grace_period']
@visibility = object['visibility']
@web_url = object['web_url']
@wiki_access_level = object['wiki_access_level']
end
|
Instance Attribute Details
#allowed_email_domains_list ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def allowed_email_domains_list
@allowed_email_domains_list
end
|
#auto_devops_enabled ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def auto_devops_enabled
@auto_devops_enabled
end
|
#avatar_url ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def avatar_url
@avatar_url
end
|
#default_branch ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def default_branch
@default_branch
end
|
#default_branch_protection ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def default_branch_protection
@default_branch_protection
end
|
#default_branch_protection_defaults ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def default_branch_protection_defaults
@default_branch_protection_defaults
end
|
#description ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def description
@description
end
|
#duo_features_enabled ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def duo_features_enabled
@duo_features_enabled
end
|
#emails_disabled ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def emails_disabled
@emails_disabled
end
|
#emails_enabled ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def emails_enabled
@emails_enabled
end
|
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def
@extra_shared_runners_minutes_limit
end
|
#full_name ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def full_name
@full_name
end
|
#full_path ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def full_path
@full_path
end
|
#id ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def id
@id
end
|
#ip_restriction_ranges ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def ip_restriction_ranges
@ip_restriction_ranges
end
|
#ldap_access ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def ldap_access
@ldap_access
end
|
#ldap_cn ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def ldap_cn
@ldap_cn
end
|
#lfs_enabled ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def lfs_enabled
@lfs_enabled
end
|
#lock_duo_features_enabled ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def lock_duo_features_enabled
@lock_duo_features_enabled
end
|
#lock_math_rendering_limits_enabled ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def lock_math_rendering_limits_enabled
@lock_math_rendering_limits_enabled
end
|
#marked_for_deletion_on ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def marked_for_deletion_on
@marked_for_deletion_on
end
|
#math_rendering_limits_enabled ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def math_rendering_limits_enabled
@math_rendering_limits_enabled
end
|
#membership_lock ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def membership_lock
@membership_lock
end
|
#mentions_disabled ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def mentions_disabled
@mentions_disabled
end
|
#name ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def name
@name
end
|
#organization_id ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def organization_id
@organization_id
end
|
#parent_id ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def parent_id
@parent_id
end
|
#path ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def path
@path
end
|
#prevent_forking_outside_group ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def prevent_forking_outside_group
@prevent_forking_outside_group
end
|
#project_creation_level ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def project_creation_level
@project_creation_level
end
|
#repository_storage ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def repository_storage
@repository_storage
end
|
#request_access_enabled ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def request_access_enabled
@request_access_enabled
end
|
#require_two_factor_authentication ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def require_two_factor_authentication
@require_two_factor_authentication
end
|
#runners_token ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def runners_token
@runners_token
end
|
#share_with_group_lock ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def share_with_group_lock
@share_with_group_lock
end
|
#shared_runners_minutes_limit ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def shared_runners_minutes_limit
@shared_runners_minutes_limit
end
|
#shared_runners_setting ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def shared_runners_setting
@shared_runners_setting
end
|
#shared_with_groups ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def shared_with_groups
@shared_with_groups
end
|
#subgroup_creation_level ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def subgroup_creation_level
@subgroup_creation_level
end
|
#two_factor_grace_period ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def two_factor_grace_period
@two_factor_grace_period
end
|
#visibility ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def visibility
@visibility
end
|
#web_url ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def web_url
@web_url
end
|
#wiki_access_level ⇒ Object
14
15
16
|
# File 'lib/support_readiness/gitlab/groups.rb', line 14
def wiki_access_level
@wiki_access_level
end
|
Class Method Details
.all_members(client, group, filters = []) ⇒ Array
Lists all members in a group. This method can take a long time to run depending on the parameters used.
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
# File 'lib/support_readiness/gitlab/groups.rb', line 164
def self.all_members(client, group, filters = [])
array = []
page = 1
loop do
response = client.connection.get "groups/#{group.id}/members/all?per_page=100&page=#{page}&#{to_param_string(filters)}"
handle_request_error(0, 'GitLab', response.status) unless response.status == 200
body = Oj.load(response.body)
array += body
break if body.count < 100
page += 1
end
array
end
|
.members(client, group, filters = []) ⇒ Array
Lists direct members in a group. This method can take a long time to run depending on the parameters used.
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
# File 'lib/support_readiness/gitlab/groups.rb', line 128
def self.members(client, group, filters = [])
array = []
page = 1
loop do
response = client.connection.get "groups/#{group.id}/members?per_page=100&page=#{page}&#{to_param_string(filters)}"
handle_request_error(0, 'GitLab', response.status) unless response.status == 200
body = Oj.load(response.body)
array += body
break if body.count < 100
page += 1
end
array
end
|
.milestones(client, group, filters = []) ⇒ Array
Lists all milestones in a group. This method can take a long time to run depending on the parameters used.
199
200
201
202
203
204
205
206
207
208
209
210
211
212
|
# File 'lib/support_readiness/gitlab/groups.rb', line 199
def self.milestones(client, group, filters = [])
array = []
page = 1
loop do
response = client.connection.get "groups/#{group.id}/milestones?per_page=100&page=#{page}&#{to_param_string(filters)}"
handle_request_error(0, 'GitLab', response.status) unless response.status == 200
body = Oj.load(response.body)
array += body
break if body.count < 100
page += 1
end
array
end
|
.projects(client, group, filters = []) ⇒ Array
Lists projects in a group. This method can take a long time to run depending on the parameters used.
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# File 'lib/support_readiness/gitlab/groups.rb', line 92
def self.projects(client, group, filters = [])
array = []
page = 1
loop do
response = client.connection.get "groups/#{group.id}/projects?per_page=100&page=#{page}&#{to_param_string(filters)}"
handle_request_error(0, 'GitLab', response.status) unless response.status == 200
body = Oj.load(response.body)
array += body.map { |p| Projects.new(p) }
break if body.count < 100
page += 1
end
array
end
|