Class: SupportOps::GitLab::Projects
- Defined in:
- lib/support_ops_gitlab/gitlab/projects.rb
Overview
Add create/update example
Document encoded_path
Document tokens
Document issues
Document merge_requests
Document pipelines
Document latest pipeline
Document latest jobs
Document webhooks
Document commits
Filters on #contributors
Defines the class Projects within the module SupportOps::GitLab.
Instance Attribute Summary collapse
-
#_links ⇒ Hash
The current value of _links.
-
#allow_merge_on_skipped_pipeline ⇒ Boolean
The current value of allow_merge_on_skipped_pipeline.
-
#allow_pipeline_trigger_approve_deployment ⇒ Boolean
The current value of allow_pipeline_trigger_approve_deployment.
-
#analytics_access_level ⇒ String
The current value of analytics_access_level.
-
#archived ⇒ Boolean
The current value of archived.
-
#auto_cancel_pending_pipelines ⇒ String
The current value of auto_cancel_pending_pipelines.
-
#auto_devops_deploy_strategy ⇒ String
The current value of auto_devops_deploy_strategy.
-
#auto_devops_enabled ⇒ Boolean
The current value of auto_devops_enabled.
-
#autoclose_referenced_issues ⇒ Boolean
The current value of autoclose_referenced_issues.
-
#avatar_url ⇒ String
The current value of avatar_url.
-
#build_git_strategy ⇒ String
The current value of build_git_strategy.
-
#build_timeout ⇒ Integer
The current value of build_timeout.
-
#builds_access_level ⇒ String
The current value of builds_access_level.
-
#can_create_merge_request_in ⇒ Boolean
The current value of can_create_merge_request_in.
-
#ci_allow_fork_pipelines_to_run_in_parent_project ⇒ Boolean
The current value of ci_allow_fork_pipelines_to_run_in_parent_project.
-
#ci_config_path ⇒ String
The current value of ci_config_path.
-
#ci_default_git_depth ⇒ Integer
The current value of ci_default_git_depth.
-
#ci_forward_deployment_enabled ⇒ Boolean
The current value of ci_forward_deployment_enabled.
-
#ci_forward_deployment_rollback_allowed ⇒ Boolean
The current value of ci_forward_deployment_rollback_allowed.
-
#ci_id_token_sub_claim_components ⇒ Array
The current value of ci_id_token_sub_claim_components.
-
#ci_pipeline_variables_minimum_override_role ⇒ String
The current value of ci_pipeline_variables_minimum_override_role.
-
#ci_push_repository_for_job_token_allowed ⇒ Boolean
The current value of ci_push_repository_for_job_token_allowed.
-
#ci_restrict_pipeline_cancellation_role ⇒ String
The current value of ci_restrict_pipeline_cancellation_role.
-
#ci_separated_caches ⇒ Boolean
The current value of ci_separated_caches.
-
#compliance_frameworks ⇒ Array
The current value of compliance_frameworks.
-
#container_expiration_policy ⇒ Hash
The current value of container_expiration_policy.
-
#container_expiration_policy_attributes ⇒ Hash
The current value of container_expiration_policy_attributes.
-
#container_registry_access_level ⇒ String
The current value of container_registry_access_level.
-
#container_registry_enabled ⇒ Boolean
The current value of container_registry_enabled.
-
#container_registry_image_prefix ⇒ String
The current value of container_registry_image_prefix.
-
#created_at ⇒ String
The current value of created_at.
-
#creator_id ⇒ Integer
The current value of creator_id.
-
#default_branch ⇒ String
The current value of default_branch.
-
#description ⇒ String
The current value of description.
-
#description_html ⇒ String
The current value of description_html.
-
#emails_enabled ⇒ Boolean
The current value of emails_enabled.
-
#enforce_auth_checks_on_uploads ⇒ Boolean
The current value of enforce_auth_checks_on_uploads.
-
#environments_access_level ⇒ String
The current value of environments_access_level.
-
#external_authorization_classification_label ⇒ String
The current value of external_authorization_classification_label.
-
#feature_flags_access_level ⇒ String
The current value of feature_flags_access_level.
-
#forked_from_project ⇒ Hash
The current value of forked_from_project.
-
#forking_access_level ⇒ String
The current value of forking_access_level.
-
#forks_count ⇒ Integer
The current value of forks_count.
-
#group_runners_enabled ⇒ Boolean
The current value of group_runners_enabled.
-
#group_with_project_templates_id ⇒ Integer
The current value of group_with_project_templates_id.
-
#http_url_to_repo ⇒ String
The current value of http_url_to_repo.
-
#id ⇒ Integer
The current value of id.
-
#import_error ⇒ String
The current value of import_error.
-
#import_status ⇒ String
The current value of import_status.
-
#import_type ⇒ String
The current value of import_type.
-
#import_url ⇒ String
The current value of import_url.
-
#infrastructure_access_level ⇒ String
The current value of infrastructure_access_level.
-
#initialize_with_readme ⇒ Boolean
The current value of initialize_with_readme.
-
#issue_branch_template ⇒ String
The current value of issue_branch_template.
-
#issues_access_level ⇒ String
The current value of issues_access_level.
-
#issues_enabled ⇒ Boolean
The current value of issues_enabled.
-
#issues_template ⇒ String
The current value of issues_template.
-
#jobs_enabled ⇒ Boolean
The current value of jobs_enabled.
-
#last_activity_at ⇒ String
The current value of last_activity_at.
-
#lfs_enabled ⇒ Boolean
The current value of lfs_enabled.
-
#license ⇒ Hash
The current value of license.
-
#license_url ⇒ String
The current value of license_url.
-
#marked_for_deletion_on ⇒ String
The current value of marked_for_deletion_on.
-
#merge_commit_template ⇒ String
The current value of merge_commit_template.
-
#merge_method ⇒ String
The current value of merge_method.
-
#merge_pipelines_enabled ⇒ Boolean
The current value of merge_pipelines_enabled.
-
#merge_requests_access_level ⇒ String
The current value of merge_requests_access_level.
-
#merge_requests_enabled ⇒ Boolean
The current value of merge_requests_enabled.
-
#merge_requests_template ⇒ String
The current value of merge_requests_template.
-
#merge_trains_enabled ⇒ Boolean
The current value of merge_trains_enabled.
-
#merge_trains_skip_train_allowed ⇒ Boolean
The current value of merge_trains_skip_train_allowed.
-
#mirror ⇒ Boolean
The current value of mirror.
-
#mirror_overwrites_diverged_branches ⇒ Boolean
The current value of mirror_overwrites_diverged_branches.
-
#mirror_trigger_builds ⇒ Boolean
The current value of mirror_trigger_builds.
-
#mirror_user_id ⇒ Integer
The current value of mirror_user_id.
-
#model_experiments_access_level ⇒ String
The current value of model_experiments_access_level.
-
#model_registry_access_level ⇒ String
The current value of model_registry_access_level.
-
#monitor_access_level ⇒ String
The current value of monitor_access_level.
-
#mr_default_target_self ⇒ Boolean
The current value of mr_default_target_self.
-
#name ⇒ String
The current value of name.
-
#name_with_namespace ⇒ String
The current value of name_with_namespace.
-
#namespace ⇒ String
The current value of namespace.
-
#namespace_id ⇒ Integer
The current value of namespace_id.
-
#only_allow_merge_if_all_discussions_are_resolved ⇒ Boolean
The current value of only_allow_merge_if_all_discussions_are_resolved.
-
#only_allow_merge_if_all_status_checks_passed ⇒ Boolean
The current value of only_allow_merge_if_all_status_checks_passed.
-
#only_allow_merge_if_pipeline_succeeds ⇒ Boolean
The current value of only_allow_merge_if_pipeline_succeeds.
-
#only_mirror_protected_branches ⇒ Boolean
The current value of only_mirror_protected_branches.
-
#open_issues_count ⇒ Integer
The current value of open_issues_count.
-
#owner ⇒ Hash
The current value of owner.
-
#packages_enabled ⇒ Boolean
The current value of packages_enabled.
-
#pages_access_level ⇒ String
The current value of pages_access_level.
-
#path ⇒ String
The current value of path.
-
#path_with_namespace ⇒ String
The current value of path_with_namespace.
-
#permissions ⇒ Hash
The current value of permissions.
-
#printing_merge_request_link_enabled ⇒ Boolean
The current value of printing_merge_request_link_enabled.
-
#printing_merge_requests_link_enabled ⇒ Boolean
The current value of printing_merge_requests_link_enabled.
-
#public_builds ⇒ Boolean
The current value of public_builds.
-
#public_jobs ⇒ Boolean
The current value of public_jobs.
-
#readme_url ⇒ String
The current value of readme_url.
-
#releases_access_level ⇒ String
The current value of releases_access_level.
-
#remove_source_branch_after_merge ⇒ Boolean
The current value of remove_source_branch_after_merge.
-
#repository_access_level ⇒ String
The current value of repository_access_level.
-
#repository_object_format ⇒ String
The current value of repository_object_format.
-
#repository_storage ⇒ String
The current value of repository_storage.
-
#request_access_enabled ⇒ Boolean
The current value of request_access_enabled.
-
#requirements_access_level ⇒ String
The current value of requirements_access_level.
-
#resolve_outdated_diff_discussions ⇒ Boolean
The current value of resolve_outdated_diff_discussions.
-
#restrict_user_defined_variables ⇒ Boolean
The current value of restrict_user_defined_variables.
-
#runners_token ⇒ String
The current value of runners_token.
-
#secret_push_protection_enabled ⇒ Boolean
The current value of secret_push_protection_enabled.
-
#security_and_compliance_access_level ⇒ String
The current value of security_and_compliance_access_level.
-
#service_desk_address ⇒ String
The current value of service_desk_address.
-
#service_desk_enabled ⇒ Boolean
The current value of service_desk_enabled.
-
#shared_runners_enabled ⇒ Boolean
The current value of shared_runners_enabled.
-
#shared_with_groups ⇒ Array
The current value of shared_with_groups.
-
#show_default_award_emojis ⇒ Boolean
The current value of show_default_award_emojis.
-
#snippets_access_level ⇒ String
The current value of snippets_access_level.
-
#snippets_enabled ⇒ Boolean
The current value of snippets_enabled.
-
#squash_commit_template ⇒ String
The current value of squash_commit_template.
-
#squash_option ⇒ String
The current value of squash_option.
-
#ssh_url_to_repo ⇒ String
The current value of ssh_url_to_repo.
-
#star_count ⇒ Integer
The current value of star_count.
-
#statistics ⇒ Hash
The current value of statistics.
-
#suggestion_commit_message ⇒ String
The current value of suggestion_commit_message.
-
#template_name ⇒ String
The current value of template_name.
-
#template_project_id ⇒ Integer
The current value of template_project_id.
-
#topics ⇒ Array
The current value of topics.
-
#updated_at ⇒ String
The current value of updated_at.
-
#use_custom_template ⇒ Boolean
The current value of use_custom_template.
-
#visibility ⇒ String
The current value of visibility.
-
#warn_about_potentially_unwanted_characters ⇒ Boolean
The current value of warn_about_potentially_unwanted_characters.
-
#web_url ⇒ String
The current value of web_url.
-
#wiki_access_level ⇒ String
The current value of wiki_access_level.
-
#wiki_enabled ⇒ Boolean
The current value of wiki_enabled.
Class Method Summary collapse
-
.get(object) ⇒ Object
Locates a specific project in the GitLab system.
-
.get!(object) ⇒ Object
Locates a specific project in the GitLab system.
-
.list(key: value) ⇒ Array
Lists projects in the GitLab system.
-
.list(key: value) ⇒ Array
Search for projects by name.
Instance Method Summary collapse
-
#contributors ⇒ Boolean
Get contributor list.
-
#events ⇒ Boolean
List events for a project.
-
#save! ⇒ Object
Creates/updates a project.
Methods inherited from Base
#activate!, #approve!, attributes, #badges, #ban!, #block!, client, #client=, #commits, configure, #create_support_pin!, #deactivate!, define_attributes, #delete!, #diffs, #disable_2fa!, #discussions, #emails, #encoded_path, #find, #find!, #gpg_keys, #hard_delete!, #impersonations, #initialize, #issues, #jobs, #latest_pipeline, #members, #memberships, #merge_requests, #move!, #notes, #paid?, #pats, #pipeline_variables, #pipelines, #preferences, #projects, readonly_attributes, #reject!, #revoke!, #rotate!, #ssh_keys, #status, #store_original_attributes, #subscribe!, #support_pin, to_hash, #tokens, #unban!, #unblock!, #unsubscribe!, #webhooks
Constructor Details
This class inherits a constructor from SupportOps::GitLab::Base
Instance Attribute Details
#_links ⇒ Hash
Returns the current value of _links.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def _links @_links end |
#allow_merge_on_skipped_pipeline ⇒ Boolean
Returns the current value of allow_merge_on_skipped_pipeline.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def allow_merge_on_skipped_pipeline @allow_merge_on_skipped_pipeline end |
#allow_pipeline_trigger_approve_deployment ⇒ Boolean
Returns the current value of allow_pipeline_trigger_approve_deployment.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def allow_pipeline_trigger_approve_deployment @allow_pipeline_trigger_approve_deployment end |
#analytics_access_level ⇒ String
Returns the current value of analytics_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def analytics_access_level @analytics_access_level end |
#archived ⇒ Boolean
Returns the current value of archived.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def archived @archived end |
#auto_cancel_pending_pipelines ⇒ String
Returns the current value of auto_cancel_pending_pipelines.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def auto_cancel_pending_pipelines @auto_cancel_pending_pipelines end |
#auto_devops_deploy_strategy ⇒ String
Returns the current value of auto_devops_deploy_strategy.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def auto_devops_deploy_strategy @auto_devops_deploy_strategy end |
#auto_devops_enabled ⇒ Boolean
Returns the current value of auto_devops_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def auto_devops_enabled @auto_devops_enabled end |
#autoclose_referenced_issues ⇒ Boolean
Returns the current value of autoclose_referenced_issues.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def autoclose_referenced_issues @autoclose_referenced_issues end |
#avatar_url ⇒ String
Returns the current value of avatar_url.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def avatar_url @avatar_url end |
#build_git_strategy ⇒ String
Returns the current value of build_git_strategy.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def build_git_strategy @build_git_strategy end |
#build_timeout ⇒ Integer
Returns the current value of build_timeout.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def build_timeout @build_timeout end |
#builds_access_level ⇒ String
Returns the current value of builds_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def builds_access_level @builds_access_level end |
#can_create_merge_request_in ⇒ Boolean
Returns the current value of can_create_merge_request_in.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def can_create_merge_request_in @can_create_merge_request_in end |
#ci_allow_fork_pipelines_to_run_in_parent_project ⇒ Boolean
Returns the current value of ci_allow_fork_pipelines_to_run_in_parent_project.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ci_allow_fork_pipelines_to_run_in_parent_project @ci_allow_fork_pipelines_to_run_in_parent_project end |
#ci_config_path ⇒ String
Returns the current value of ci_config_path.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ci_config_path @ci_config_path end |
#ci_default_git_depth ⇒ Integer
Returns the current value of ci_default_git_depth.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ci_default_git_depth @ci_default_git_depth end |
#ci_forward_deployment_enabled ⇒ Boolean
Returns the current value of ci_forward_deployment_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ci_forward_deployment_enabled @ci_forward_deployment_enabled end |
#ci_forward_deployment_rollback_allowed ⇒ Boolean
Returns the current value of ci_forward_deployment_rollback_allowed.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ci_forward_deployment_rollback_allowed @ci_forward_deployment_rollback_allowed end |
#ci_id_token_sub_claim_components ⇒ Array
Returns the current value of ci_id_token_sub_claim_components.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ci_id_token_sub_claim_components @ci_id_token_sub_claim_components end |
#ci_pipeline_variables_minimum_override_role ⇒ String
Returns the current value of ci_pipeline_variables_minimum_override_role.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ci_pipeline_variables_minimum_override_role @ci_pipeline_variables_minimum_override_role end |
#ci_push_repository_for_job_token_allowed ⇒ Boolean
Returns the current value of ci_push_repository_for_job_token_allowed.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ci_push_repository_for_job_token_allowed @ci_push_repository_for_job_token_allowed end |
#ci_restrict_pipeline_cancellation_role ⇒ String
Returns the current value of ci_restrict_pipeline_cancellation_role.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ci_restrict_pipeline_cancellation_role @ci_restrict_pipeline_cancellation_role end |
#ci_separated_caches ⇒ Boolean
Returns the current value of ci_separated_caches.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ci_separated_caches @ci_separated_caches end |
#compliance_frameworks ⇒ Array
Returns the current value of compliance_frameworks.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def compliance_frameworks @compliance_frameworks end |
#container_expiration_policy ⇒ Hash
Returns the current value of container_expiration_policy.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def container_expiration_policy @container_expiration_policy end |
#container_expiration_policy_attributes ⇒ Hash
Returns the current value of container_expiration_policy_attributes.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def container_expiration_policy_attributes @container_expiration_policy_attributes end |
#container_registry_access_level ⇒ String
Returns the current value of container_registry_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def container_registry_access_level @container_registry_access_level end |
#container_registry_enabled ⇒ Boolean
Returns the current value of container_registry_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def container_registry_enabled @container_registry_enabled end |
#container_registry_image_prefix ⇒ String
Returns the current value of container_registry_image_prefix.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def container_registry_image_prefix @container_registry_image_prefix end |
#created_at ⇒ String
Returns the current value of created_at.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def created_at @created_at end |
#creator_id ⇒ Integer
Returns the current value of creator_id.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def creator_id @creator_id end |
#default_branch ⇒ String
Returns the current value of default_branch.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def default_branch @default_branch end |
#description ⇒ String
Returns the current value of description.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def description @description end |
#description_html ⇒ String
Returns the current value of description_html.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def description_html @description_html end |
#emails_enabled ⇒ Boolean
Returns the current value of emails_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def emails_enabled @emails_enabled end |
#enforce_auth_checks_on_uploads ⇒ Boolean
Returns the current value of enforce_auth_checks_on_uploads.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def enforce_auth_checks_on_uploads @enforce_auth_checks_on_uploads end |
#environments_access_level ⇒ String
Returns the current value of environments_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def environments_access_level @environments_access_level end |
#external_authorization_classification_label ⇒ String
Returns the current value of external_authorization_classification_label.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def @external_authorization_classification_label end |
#feature_flags_access_level ⇒ String
Returns the current value of feature_flags_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def feature_flags_access_level @feature_flags_access_level end |
#forked_from_project ⇒ Hash
Returns the current value of forked_from_project.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def forked_from_project @forked_from_project end |
#forking_access_level ⇒ String
Returns the current value of forking_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def forking_access_level @forking_access_level end |
#forks_count ⇒ Integer
Returns the current value of forks_count.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def forks_count @forks_count end |
#group_runners_enabled ⇒ Boolean
Returns the current value of group_runners_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def group_runners_enabled @group_runners_enabled end |
#group_with_project_templates_id ⇒ Integer
Returns the current value of group_with_project_templates_id.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def group_with_project_templates_id @group_with_project_templates_id end |
#http_url_to_repo ⇒ String
Returns the current value of http_url_to_repo.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def http_url_to_repo @http_url_to_repo end |
#id ⇒ Integer
Returns the current value of id.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def id @id end |
#import_error ⇒ String
Returns the current value of import_error.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def import_error @import_error end |
#import_status ⇒ String
Returns the current value of import_status.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def import_status @import_status end |
#import_type ⇒ String
Returns the current value of import_type.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def import_type @import_type end |
#import_url ⇒ String
Returns the current value of import_url.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def import_url @import_url end |
#infrastructure_access_level ⇒ String
Returns the current value of infrastructure_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def infrastructure_access_level @infrastructure_access_level end |
#initialize_with_readme ⇒ Boolean
Returns the current value of initialize_with_readme.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def initialize_with_readme @initialize_with_readme end |
#issue_branch_template ⇒ String
Returns the current value of issue_branch_template.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def issue_branch_template @issue_branch_template end |
#issues_access_level ⇒ String
Returns the current value of issues_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def issues_access_level @issues_access_level end |
#issues_enabled ⇒ Boolean
Returns the current value of issues_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def issues_enabled @issues_enabled end |
#issues_template ⇒ String
Returns the current value of issues_template.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def issues_template @issues_template end |
#jobs_enabled ⇒ Boolean
Returns the current value of jobs_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def jobs_enabled @jobs_enabled end |
#last_activity_at ⇒ String
Returns the current value of last_activity_at.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def last_activity_at @last_activity_at end |
#lfs_enabled ⇒ Boolean
Returns the current value of lfs_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def lfs_enabled @lfs_enabled end |
#license ⇒ Hash
Returns the current value of license.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def license @license end |
#license_url ⇒ String
Returns the current value of license_url.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def license_url @license_url end |
#marked_for_deletion_on ⇒ String
Returns the current value of marked_for_deletion_on.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def marked_for_deletion_on @marked_for_deletion_on end |
#merge_commit_template ⇒ String
Returns the current value of merge_commit_template.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def merge_commit_template @merge_commit_template end |
#merge_method ⇒ String
Returns the current value of merge_method.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def merge_method @merge_method end |
#merge_pipelines_enabled ⇒ Boolean
Returns the current value of merge_pipelines_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def merge_pipelines_enabled @merge_pipelines_enabled end |
#merge_requests_access_level ⇒ String
Returns the current value of merge_requests_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def merge_requests_access_level @merge_requests_access_level end |
#merge_requests_enabled ⇒ Boolean
Returns the current value of merge_requests_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def merge_requests_enabled @merge_requests_enabled end |
#merge_requests_template ⇒ String
Returns the current value of merge_requests_template.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def merge_requests_template @merge_requests_template end |
#merge_trains_enabled ⇒ Boolean
Returns the current value of merge_trains_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def merge_trains_enabled @merge_trains_enabled end |
#merge_trains_skip_train_allowed ⇒ Boolean
Returns the current value of merge_trains_skip_train_allowed.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def merge_trains_skip_train_allowed @merge_trains_skip_train_allowed end |
#mirror ⇒ Boolean
Returns the current value of mirror.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def mirror @mirror end |
#mirror_overwrites_diverged_branches ⇒ Boolean
Returns the current value of mirror_overwrites_diverged_branches.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def mirror_overwrites_diverged_branches @mirror_overwrites_diverged_branches end |
#mirror_trigger_builds ⇒ Boolean
Returns the current value of mirror_trigger_builds.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def mirror_trigger_builds @mirror_trigger_builds end |
#mirror_user_id ⇒ Integer
Returns the current value of mirror_user_id.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def mirror_user_id @mirror_user_id end |
#model_experiments_access_level ⇒ String
Returns the current value of model_experiments_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def model_experiments_access_level @model_experiments_access_level end |
#model_registry_access_level ⇒ String
Returns the current value of model_registry_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def model_registry_access_level @model_registry_access_level end |
#monitor_access_level ⇒ String
Returns the current value of monitor_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def monitor_access_level @monitor_access_level end |
#mr_default_target_self ⇒ Boolean
Returns the current value of mr_default_target_self.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def mr_default_target_self @mr_default_target_self end |
#name ⇒ String
Returns the current value of name.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def name @name end |
#name_with_namespace ⇒ String
Returns the current value of name_with_namespace.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def name_with_namespace @name_with_namespace end |
#namespace ⇒ String
Returns the current value of namespace.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def namespace @namespace end |
#namespace_id ⇒ Integer
Returns the current value of namespace_id.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def namespace_id @namespace_id end |
#only_allow_merge_if_all_discussions_are_resolved ⇒ Boolean
Returns the current value of only_allow_merge_if_all_discussions_are_resolved.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def only_allow_merge_if_all_discussions_are_resolved @only_allow_merge_if_all_discussions_are_resolved end |
#only_allow_merge_if_all_status_checks_passed ⇒ Boolean
Returns the current value of only_allow_merge_if_all_status_checks_passed.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def only_allow_merge_if_all_status_checks_passed @only_allow_merge_if_all_status_checks_passed end |
#only_allow_merge_if_pipeline_succeeds ⇒ Boolean
Returns the current value of only_allow_merge_if_pipeline_succeeds.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def only_allow_merge_if_pipeline_succeeds @only_allow_merge_if_pipeline_succeeds end |
#only_mirror_protected_branches ⇒ Boolean
Returns the current value of only_mirror_protected_branches.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def only_mirror_protected_branches @only_mirror_protected_branches end |
#open_issues_count ⇒ Integer
Returns the current value of open_issues_count.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def open_issues_count @open_issues_count end |
#owner ⇒ Hash
Returns the current value of owner.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def owner @owner end |
#packages_enabled ⇒ Boolean
Returns the current value of packages_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def packages_enabled @packages_enabled end |
#pages_access_level ⇒ String
Returns the current value of pages_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def pages_access_level @pages_access_level end |
#path ⇒ String
Returns the current value of path.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def path @path end |
#path_with_namespace ⇒ String
Returns the current value of path_with_namespace.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def path_with_namespace @path_with_namespace end |
#permissions ⇒ Hash
Returns the current value of permissions.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def @permissions end |
#printing_merge_request_link_enabled ⇒ Boolean
Returns the current value of printing_merge_request_link_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def printing_merge_request_link_enabled @printing_merge_request_link_enabled end |
#printing_merge_requests_link_enabled ⇒ Boolean
Returns the current value of printing_merge_requests_link_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def printing_merge_requests_link_enabled @printing_merge_requests_link_enabled end |
#public_builds ⇒ Boolean
Returns the current value of public_builds.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def public_builds @public_builds end |
#public_jobs ⇒ Boolean
Returns the current value of public_jobs.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def public_jobs @public_jobs end |
#readme_url ⇒ String
Returns the current value of readme_url.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def readme_url @readme_url end |
#releases_access_level ⇒ String
Returns the current value of releases_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def releases_access_level @releases_access_level end |
#remove_source_branch_after_merge ⇒ Boolean
Returns the current value of remove_source_branch_after_merge.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def remove_source_branch_after_merge @remove_source_branch_after_merge end |
#repository_access_level ⇒ String
Returns the current value of repository_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def repository_access_level @repository_access_level end |
#repository_object_format ⇒ String
Returns the current value of repository_object_format.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def repository_object_format @repository_object_format end |
#repository_storage ⇒ String
Returns the current value of repository_storage.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def repository_storage @repository_storage end |
#request_access_enabled ⇒ Boolean
Returns the current value of request_access_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def request_access_enabled @request_access_enabled end |
#requirements_access_level ⇒ String
Returns the current value of requirements_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def requirements_access_level @requirements_access_level end |
#resolve_outdated_diff_discussions ⇒ Boolean
Returns the current value of resolve_outdated_diff_discussions.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def resolve_outdated_diff_discussions @resolve_outdated_diff_discussions end |
#restrict_user_defined_variables ⇒ Boolean
Returns the current value of restrict_user_defined_variables.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def restrict_user_defined_variables @restrict_user_defined_variables end |
#runners_token ⇒ String
Returns the current value of runners_token.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def runners_token @runners_token end |
#secret_push_protection_enabled ⇒ Boolean
Returns the current value of secret_push_protection_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def secret_push_protection_enabled @secret_push_protection_enabled end |
#security_and_compliance_access_level ⇒ String
Returns the current value of security_and_compliance_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def security_and_compliance_access_level @security_and_compliance_access_level end |
#service_desk_address ⇒ String
Returns the current value of service_desk_address.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def service_desk_address @service_desk_address end |
#service_desk_enabled ⇒ Boolean
Returns the current value of service_desk_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def service_desk_enabled @service_desk_enabled end |
#shared_runners_enabled ⇒ Boolean
Returns the current value of shared_runners_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def shared_runners_enabled @shared_runners_enabled end |
#shared_with_groups ⇒ Array
Returns the current value of shared_with_groups.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def shared_with_groups @shared_with_groups end |
#show_default_award_emojis ⇒ Boolean
Returns the current value of show_default_award_emojis.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def show_default_award_emojis @show_default_award_emojis end |
#snippets_access_level ⇒ String
Returns the current value of snippets_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def snippets_access_level @snippets_access_level end |
#snippets_enabled ⇒ Boolean
Returns the current value of snippets_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def snippets_enabled @snippets_enabled end |
#squash_commit_template ⇒ String
Returns the current value of squash_commit_template.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def squash_commit_template @squash_commit_template end |
#squash_option ⇒ String
Returns the current value of squash_option.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def squash_option @squash_option end |
#ssh_url_to_repo ⇒ String
Returns the current value of ssh_url_to_repo.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def ssh_url_to_repo @ssh_url_to_repo end |
#star_count ⇒ Integer
Returns the current value of star_count.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def star_count @star_count end |
#statistics ⇒ Hash
Returns the current value of statistics.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def statistics @statistics end |
#suggestion_commit_message ⇒ String
Returns the current value of suggestion_commit_message.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def @suggestion_commit_message end |
#template_name ⇒ String
Returns the current value of template_name.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def template_name @template_name end |
#template_project_id ⇒ Integer
Returns the current value of template_project_id.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def template_project_id @template_project_id end |
#topics ⇒ Array
Returns the current value of topics.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def topics @topics end |
#updated_at ⇒ String
Returns the current value of updated_at.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def updated_at @updated_at end |
#use_custom_template ⇒ Boolean
Returns the current value of use_custom_template.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def use_custom_template @use_custom_template end |
#visibility ⇒ String
Returns the current value of visibility.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def visibility @visibility end |
#warn_about_potentially_unwanted_characters ⇒ Boolean
Returns the current value of warn_about_potentially_unwanted_characters.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def warn_about_potentially_unwanted_characters @warn_about_potentially_unwanted_characters end |
#web_url ⇒ String
Returns the current value of web_url.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def web_url @web_url end |
#wiki_access_level ⇒ String
Returns the current value of wiki_access_level.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def wiki_access_level @wiki_access_level end |
#wiki_enabled ⇒ Boolean
Returns the current value of wiki_enabled.
160 161 162 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160 def wiki_enabled @wiki_enabled end |
Class Method Details
.get(object) ⇒ Object
Locates a specific project in the GitLab system
549 550 551 552 553 554 555 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 549 def self.get(object) if object.is_a? Projects Projects.new(id: id).find else Projects.new(id: object).find end end |
.get!(object) ⇒ Object
Locates a specific project in the GitLab system
577 578 579 580 581 582 583 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 577 def self.get!(object) if object.is_a? Projects Projects.new(id: id).find! else Projects.new(id: object).find! end end |
.list(key: value) ⇒ Array
Lists projects in the GitLab system
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 391 def self.list(**args) args[:active] = nil unless args[:active] args[:archived] = nil unless args[:archived] args[:id_after] = nil unless args[:id_after] args[:id_before] = nil unless args[:id_before] args[:imported] = nil unless args[:imported] args[:include_hidden] = nil unless args[:include_hidden] args[:include_pending_delete] = nil unless args[:include_pending_delete] args[:last_activity_after] = nil unless args[:last_activity_after] args[:last_activity_before] = nil unless args[:last_activity_before] args[:marked_for_deletion_on] = nil unless args[:marked_for_deletion_on] args[:membership] = nil unless args[:membership] args[:min_access_level] = nil unless args[:min_access_level] args[:order_by] = nil unless args[:order_by] args[:owned] = nil unless args[:owned] args[:repository_checksum_failed] = nil unless args[:repository_checksum_failed] args[:repository_storage] = nil unless args[:repository_storage] args[:search_namespaces] = nil unless args[:search_namespaces] args[:sort] = nil unless args[:sort] args[:starred] = nil unless args[:starred] args[:statistics] = nil unless args[:statistics] args[:topic] = nil unless args[:topic] args[:topic_id] = nil unless args[:topic_id] args[:updated_after] = nil unless args[:updated_after] args[:updated_before] = nil unless args[:updated_before] args[:visibility] = nil unless args[:visibility] args[:wiki_checksum_failed] = nil unless args[:wiki_checksum_failed] args[:with_custom_attributes] = nil unless args[:with_custom_attributes] args[:with_issues_enabled] = nil unless args[:with_issues_enabled] args[:with_merge_requests_enabled] = nil unless args[:with_merge_requests_enabled] args[:with_programming_language] = nil unless args[:with_programming_language] args[:limit] = 0 unless args[:limit] params = '' params += "active=#{args[:active]}&" unless args[:active].nil? params += "archived=#{args[:archived]}&" unless args[:archived].nil? params += "id_after=#{args[:id_after]}&" unless args[:id_after].nil? params += "id_before=#{args[:id_before]}&" unless args[:id_before].nil? params += "imported=#{args[:imported]}&" unless args[:imported].nil? params += "include_hidden=#{args[:include_hidden]}&" unless args[:include_hidden].nil? params += "include_pending_delete=#{args[:include_pending_delete]}&" unless args[:include_pending_delete].nil? params += "last_activity_after=#{args[:last_activity_after]}&" unless args[:last_activity_after].nil? params += "last_activity_before=#{args[:last_activity_before]}&" unless args[:last_activity_before].nil? params += "marked_for_deletion_on=#{args[:marked_for_deletion_on]}&" unless args[:marked_for_deletion_on].nil? params += "membership=#{args[:membership]}&" unless args[:membership].nil? params += "min_access_level=#{args[:min_access_level]}&" unless args[:min_access_level].nil? params += "order_by=#{args[:order_by]}&" unless args[:order_by].nil? params += "owned=#{args[:owned]}&" unless args[:owned].nil? params += "repository_checksum_failed=#{args[:repository_checksum_failed]}&" unless args[:repository_checksum_failed].nil? params += "repository_storage=#{args[:repository_storage]}&" unless args[:repository_storage].nil? params += "search_namespaces=#{args[:search_namespaces]}&" unless args[:search_namespaces].nil? params += "sort=#{args[:sort]}&" unless args[:sort].nil? params += "starred=#{args[:starred]}&" unless args[:starred].nil? params += "statistics=#{args[:statistics]}&" unless args[:statistics].nil? params += "topic=#{args[:topic]}&" unless args[:topic].nil? params += "topic_id=#{args[:topic_id]}&" unless args[:topic_id].nil? params += "updated_after=#{args[:updated_after]}&" unless args[:updated_after].nil? params += "updated_before=#{args[:updated_before]}&" unless args[:updated_before].nil? params += "visibility=#{args[:visibility]}&" unless args[:visibility].nil? params += "wiki_checksum_failed=#{args[:wiki_checksum_failed]}&" unless args[:wiki_checksum_failed].nil? params += "with_custom_attributes=#{args[:with_custom_attributes]}&" unless args[:with_custom_attributes].nil? params += "with_issues_enabled=#{args[:with_issues_enabled]}&" unless args[:with_issues_enabled].nil? params += "with_merge_requests_enabled=#{args[:with_merge_requests_enabled]}&" unless args[:with_merge_requests_enabled].nil? params += "with_programming_language=#{args[:with_programming_language]}&" unless args[:with_programming_language].nil? array = [] page = 1 loop do response = client.connection.get("projects?#{params}&page=#{page}&per_page=100") body = Oj.load(response.body) array += body.map { |p| Projects.new(p) } break if args[:limit].to_i.positive? && array.count >= args[:limit].to_i break if body.count < 100 page += 1 end return array if args[:limit].to_i.zero? array.first(args[:limit].to_i) end |
.list(key: value) ⇒ Array
Search for projects by name
501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 501 def self.search(**args) args[:query] = nil unless args[:query] raise 'You have to provide a search query' if args[:query].nil? args[:order_by] = nil unless args[:order_by] args[:sort] = nil unless args[:sort] args[:limit] = 0 unless args[:limit] params = '' params += "order_by=#{args[:order_by]}&" unless args[:order_by].nil? params += "sort=#{args[:sort]}&" unless args[:sort].nil? params += "search=#{args[:query]}" array = [] page = 1 loop do response = client.connection.get("projects?#{params}&page=#{page}&per_page=100") body = Oj.load(response.body) pp body array += body.map { |p| Projects.new(p) } break if args[:limit].to_i.positive? && array.count >= args[:limit].to_i break if body.count < 100 page += 1 end return array if args[:limit].to_i.zero? array.first(args[:limit].to_i) end |
Instance Method Details
#contributors ⇒ Boolean
This is inherited from Base#contributors
Get contributor list
25 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 25 def contributors; end |
#events ⇒ Boolean
This is inherited from Base#events
List events for a project
23 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 23 def events; end |
#save! ⇒ Object
This is inherited from Base#save!
Creates/updates a project
13 |
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 13 def save!; end |