Class: SupportOps::GitLab::Projects

Inherits:
Base
  • Object
show all
Defined in:
lib/support_ops_gitlab/gitlab/projects.rb

Overview

TODO:

Add create/update example

TODO:

Document encoded_path

TODO:

Document tokens

TODO:

Document issues

TODO:

Document merge_requests

TODO:

Document pipelines

TODO:

Document latest pipeline

TODO:

Document latest jobs

TODO:

Document webhooks

TODO:

Document commits

TODO:

Filters on #contributors

Defines the class Projects within the module SupportOps::GitLab.

Author:

  • Jason Colyer

Since:

  • 1.0.0

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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

Returns the current value of _links.

Returns:

  • (Hash)

    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_pipelineBoolean

Returns the current value of allow_merge_on_skipped_pipeline.

Returns:

  • (Boolean)

    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_deploymentBoolean

Returns the current value of allow_pipeline_trigger_approve_deployment.

Returns:

  • (Boolean)

    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_levelString

Returns the current value of analytics_access_level.

Returns:

  • (String)

    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

#archivedBoolean

Returns the current value of archived.

Returns:

  • (Boolean)

    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_pipelinesString

Returns the current value of auto_cancel_pending_pipelines.

Returns:

  • (String)

    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_strategyString

Returns the current value of auto_devops_deploy_strategy.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of auto_devops_enabled.

Returns:

  • (Boolean)

    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_issuesBoolean

Returns the current value of autoclose_referenced_issues.

Returns:

  • (Boolean)

    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_urlString

Returns the current value of avatar_url.

Returns:

  • (String)

    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_strategyString

Returns the current value of build_git_strategy.

Returns:

  • (String)

    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_timeoutInteger

Returns the current value of build_timeout.

Returns:

  • (Integer)

    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_levelString

Returns the current value of builds_access_level.

Returns:

  • (String)

    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_inBoolean

Returns the current value of can_create_merge_request_in.

Returns:

  • (Boolean)

    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_projectBoolean

Returns the current value of ci_allow_fork_pipelines_to_run_in_parent_project.

Returns:

  • (Boolean)

    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_pathString

Returns the current value of ci_config_path.

Returns:

  • (String)

    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_depthInteger

Returns the current value of ci_default_git_depth.

Returns:

  • (Integer)

    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_enabledBoolean

Returns the current value of ci_forward_deployment_enabled.

Returns:

  • (Boolean)

    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_allowedBoolean

Returns the current value of ci_forward_deployment_rollback_allowed.

Returns:

  • (Boolean)

    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_componentsArray

Returns the current value of ci_id_token_sub_claim_components.

Returns:

  • (Array)

    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_roleString

Returns the current value of ci_pipeline_variables_minimum_override_role.

Returns:

  • (String)

    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_allowedBoolean

Returns the current value of ci_push_repository_for_job_token_allowed.

Returns:

  • (Boolean)

    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_roleString

Returns the current value of ci_restrict_pipeline_cancellation_role.

Returns:

  • (String)

    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_cachesBoolean

Returns the current value of ci_separated_caches.

Returns:

  • (Boolean)

    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_frameworksArray

Returns the current value of compliance_frameworks.

Returns:

  • (Array)

    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_policyHash

Returns the current value of container_expiration_policy.

Returns:

  • (Hash)

    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_attributesHash

Returns the current value of container_expiration_policy_attributes.

Returns:

  • (Hash)

    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_levelString

Returns the current value of container_registry_access_level.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of container_registry_enabled.

Returns:

  • (Boolean)

    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_prefixString

Returns the current value of container_registry_image_prefix.

Returns:

  • (String)

    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_atString

Returns the current value of created_at.

Returns:

  • (String)

    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_idInteger

Returns the current value of creator_id.

Returns:

  • (Integer)

    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_branchString

Returns the current value of default_branch.

Returns:

  • (String)

    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

#descriptionString

Returns the current value of description.

Returns:

  • (String)

    the current value of description



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def description
  @description
end

#description_htmlString

Returns the current value of description_html.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of emails_enabled.

Returns:

  • (Boolean)

    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_uploadsBoolean

Returns the current value of enforce_auth_checks_on_uploads.

Returns:

  • (Boolean)

    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_levelString

Returns the current value of environments_access_level.

Returns:

  • (String)

    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_labelString

Returns the current value of external_authorization_classification_label.

Returns:

  • (String)

    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
  @external_authorization_classification_label
end

#feature_flags_access_levelString

Returns the current value of feature_flags_access_level.

Returns:

  • (String)

    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_projectHash

Returns the current value of forked_from_project.

Returns:

  • (Hash)

    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_levelString

Returns the current value of forking_access_level.

Returns:

  • (String)

    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_countInteger

Returns the current value of forks_count.

Returns:

  • (Integer)

    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_enabledBoolean

Returns the current value of group_runners_enabled.

Returns:

  • (Boolean)

    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_idInteger

Returns the current value of group_with_project_templates_id.

Returns:

  • (Integer)

    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_repoString

Returns the current value of http_url_to_repo.

Returns:

  • (String)

    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

#idInteger

Returns the current value of id.

Returns:

  • (Integer)

    the current value of id



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def id
  @id
end

#import_errorString

Returns the current value of import_error.

Returns:

  • (String)

    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_statusString

Returns the current value of import_status.

Returns:

  • (String)

    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_typeString

Returns the current value of import_type.

Returns:

  • (String)

    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_urlString

Returns the current value of import_url.

Returns:

  • (String)

    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_levelString

Returns the current value of infrastructure_access_level.

Returns:

  • (String)

    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_readmeBoolean

Returns the current value of initialize_with_readme.

Returns:

  • (Boolean)

    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_templateString

Returns the current value of issue_branch_template.

Returns:

  • (String)

    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_levelString

Returns the current value of issues_access_level.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of issues_enabled.

Returns:

  • (Boolean)

    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_templateString

Returns the current value of issues_template.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of jobs_enabled.

Returns:

  • (Boolean)

    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_atString

Returns the current value of last_activity_at.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of lfs_enabled.

Returns:

  • (Boolean)

    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

#licenseHash

Returns the current value of license.

Returns:

  • (Hash)

    the current value of license



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def license
  @license
end

#license_urlString

Returns the current value of license_url.

Returns:

  • (String)

    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_onString

Returns the current value of marked_for_deletion_on.

Returns:

  • (String)

    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_templateString

Returns the current value of merge_commit_template.

Returns:

  • (String)

    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_methodString

Returns the current value of merge_method.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of merge_pipelines_enabled.

Returns:

  • (Boolean)

    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_levelString

Returns the current value of merge_requests_access_level.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of merge_requests_enabled.

Returns:

  • (Boolean)

    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_templateString

Returns the current value of merge_requests_template.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of merge_trains_enabled.

Returns:

  • (Boolean)

    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_allowedBoolean

Returns the current value of merge_trains_skip_train_allowed.

Returns:

  • (Boolean)

    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

#mirrorBoolean

Returns the current value of mirror.

Returns:

  • (Boolean)

    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_branchesBoolean

Returns the current value of mirror_overwrites_diverged_branches.

Returns:

  • (Boolean)

    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_buildsBoolean

Returns the current value of mirror_trigger_builds.

Returns:

  • (Boolean)

    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_idInteger

Returns the current value of mirror_user_id.

Returns:

  • (Integer)

    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_levelString

Returns the current value of model_experiments_access_level.

Returns:

  • (String)

    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_levelString

Returns the current value of model_registry_access_level.

Returns:

  • (String)

    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_levelString

Returns the current value of monitor_access_level.

Returns:

  • (String)

    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_selfBoolean

Returns the current value of mr_default_target_self.

Returns:

  • (Boolean)

    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

#nameString

Returns the current value of name.

Returns:

  • (String)

    the current value of name



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def name
  @name
end

#name_with_namespaceString

Returns the current value of name_with_namespace.

Returns:

  • (String)

    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

#namespaceString

Returns the current value of namespace.

Returns:

  • (String)

    the current value of namespace



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def namespace
  @namespace
end

#namespace_idInteger

Returns the current value of namespace_id.

Returns:

  • (Integer)

    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_resolvedBoolean

Returns the current value of only_allow_merge_if_all_discussions_are_resolved.

Returns:

  • (Boolean)

    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_passedBoolean

Returns the current value of only_allow_merge_if_all_status_checks_passed.

Returns:

  • (Boolean)

    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_succeedsBoolean

Returns the current value of only_allow_merge_if_pipeline_succeeds.

Returns:

  • (Boolean)

    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_branchesBoolean

Returns the current value of only_mirror_protected_branches.

Returns:

  • (Boolean)

    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_countInteger

Returns the current value of open_issues_count.

Returns:

  • (Integer)

    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

#ownerHash

Returns the current value of owner.

Returns:

  • (Hash)

    the current value of owner



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def owner
  @owner
end

#packages_enabledBoolean

Returns the current value of packages_enabled.

Returns:

  • (Boolean)

    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_levelString

Returns the current value of pages_access_level.

Returns:

  • (String)

    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

#pathString

Returns the current value of path.

Returns:

  • (String)

    the current value of path



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def path
  @path
end

#path_with_namespaceString

Returns the current value of path_with_namespace.

Returns:

  • (String)

    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

#permissionsHash

Returns the current value of permissions.

Returns:

  • (Hash)

    the current value of permissions



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def permissions
  @permissions
end

Returns the current value of printing_merge_request_link_enabled.

Returns:

  • (Boolean)

    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

Returns the current value of printing_merge_requests_link_enabled.

Returns:

  • (Boolean)

    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_buildsBoolean

Returns the current value of public_builds.

Returns:

  • (Boolean)

    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_jobsBoolean

Returns the current value of public_jobs.

Returns:

  • (Boolean)

    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_urlString

Returns the current value of readme_url.

Returns:

  • (String)

    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_levelString

Returns the current value of releases_access_level.

Returns:

  • (String)

    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_mergeBoolean

Returns the current value of remove_source_branch_after_merge.

Returns:

  • (Boolean)

    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_levelString

Returns the current value of repository_access_level.

Returns:

  • (String)

    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_formatString

Returns the current value of repository_object_format.

Returns:

  • (String)

    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_storageString

Returns the current value of repository_storage.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of request_access_enabled.

Returns:

  • (Boolean)

    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_levelString

Returns the current value of requirements_access_level.

Returns:

  • (String)

    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_discussionsBoolean

Returns the current value of resolve_outdated_diff_discussions.

Returns:

  • (Boolean)

    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_variablesBoolean

Returns the current value of restrict_user_defined_variables.

Returns:

  • (Boolean)

    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_tokenString

Returns the current value of runners_token.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of secret_push_protection_enabled.

Returns:

  • (Boolean)

    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_levelString

Returns the current value of security_and_compliance_access_level.

Returns:

  • (String)

    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_addressString

Returns the current value of service_desk_address.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of service_desk_enabled.

Returns:

  • (Boolean)

    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_enabledBoolean

Returns the current value of shared_runners_enabled.

Returns:

  • (Boolean)

    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_groupsArray

Returns the current value of shared_with_groups.

Returns:

  • (Array)

    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_emojisBoolean

Returns the current value of show_default_award_emojis.

Returns:

  • (Boolean)

    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_levelString

Returns the current value of snippets_access_level.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of snippets_enabled.

Returns:

  • (Boolean)

    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_templateString

Returns the current value of squash_commit_template.

Returns:

  • (String)

    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_optionString

Returns the current value of squash_option.

Returns:

  • (String)

    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_repoString

Returns the current value of ssh_url_to_repo.

Returns:

  • (String)

    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_countInteger

Returns the current value of star_count.

Returns:

  • (Integer)

    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

#statisticsHash

Returns the current value of statistics.

Returns:

  • (Hash)

    the current value of statistics



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def statistics
  @statistics
end

#suggestion_commit_messageString

Returns the current value of suggestion_commit_message.

Returns:

  • (String)

    the current value of suggestion_commit_message



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def suggestion_commit_message
  @suggestion_commit_message
end

#template_nameString

Returns the current value of template_name.

Returns:

  • (String)

    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_idInteger

Returns the current value of template_project_id.

Returns:

  • (Integer)

    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

#topicsArray

Returns the current value of topics.

Returns:

  • (Array)

    the current value of topics



160
161
162
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 160

def topics
  @topics
end

#updated_atString

Returns the current value of updated_at.

Returns:

  • (String)

    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_templateBoolean

Returns the current value of use_custom_template.

Returns:

  • (Boolean)

    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

#visibilityString

Returns the current value of visibility.

Returns:

  • (String)

    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_charactersBoolean

Returns the current value of warn_about_potentially_unwanted_characters.

Returns:

  • (Boolean)

    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_urlString

Returns the current value of web_url.

Returns:

  • (String)

    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_levelString

Returns the current value of wiki_access_level.

Returns:

  • (String)

    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_enabledBoolean

Returns the current value of wiki_enabled.

Returns:

  • (Boolean)

    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

Examples:

require 'support_ops_gitlab'

SupportOps::GitLab::Configuration.configure do |config|
  config.url = 'https://gitlab.com/api/v4'
  config.token = 'abc123'
end

project = SupportOps::GitLab::Projects.get(13983927615772)
pp project.name
# => "Awesome project"

See Also:

Author:

  • Jason Colyer

Since:

  • 1.0.0



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

Examples:

require 'support_ops_gitlab'

SupportOps::GitLab::Configuration.configure do |config|
  config.url = 'https://gitlab.com/api/v4'
  config.token = 'abc123'
end

project = SupportOps::GitLab::Projects.get!(13983927615772)
pp project.name
# => "Awesome project"

See Also:

Author:

  • Jason Colyer

Since:

  • 1.0.0



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

Examples:

require 'support_ops_gitlab'

SupportOps::GitLab::Configuration.configure do |config|
  config.url = 'https://gitlab.example.com/api/v4'
  config.token = 'abc123'
end

projects = SupportOps::GitLab::Projects.list(limit: 250)
pp projects.count
# => 250
pp projects.last.star_count
# => 4

Parameters:

  • active (Boolean optional)

    Limit by projects that are not archived and not marked for deletion.

  • archived (Boolean optional)

    Limit by archived status.

  • id_after (Integer optional)

    Limit results to projects with IDs greater than the specified ID.

  • id_before (Integer optional)

    Limit results to projects with IDs less than the specified ID.

  • imported (Boolean optional)

    Limit results to projects which were imported from external systems by current user.

  • include_hidden (Boolean optional)

    Include hidden projects. (administrators only) Premium and Ultimate only.

  • include_pending_delete (Boolean optional)

    Include projects pending deletion. (administrators only)

  • last_activity_after (String optional)

    Limit results to projects with last activity after specified time. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ)

  • last_activity_before (String optional)

    Limit results to projects with last activity before specified time. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ)

  • marked_for_deletion_on (Boolean optional)

    Filter by date when project was marked for deletion. Introduced in GitLab 17.1. Premium and Ultimate only.

  • membership (Boolean optional)

    Limit by projects that the current user is a member of.

  • min_access_level (Integer optional)

    Limit by current user minimal role (access_level).

  • order_by (String optional)

    Return projects ordered by id, name, path, created_at, updated_at, star_count, last_activity_at, or similarity fields. repository_size, storage_size, packages_size or wiki_size fields are only allowed for administrators. similarity is only available when searching and is limited to projects that the current user is a member of. Default is created_at.

  • owned (Boolean optional)

    Limit by projects explicitly owned by the current user.

  • repository_checksum_failed (Boolean optional)

    Limit projects where the repository checksum calculation has failed. Premium and Ultimate only.

  • repository_storage (String optional)

    Limit results to projects stored on repository_storage. (administrators only)

  • search_namespaces (Boolean optional)

    Include ancestor namespaces when matching search criteria. Default is false.

  • sort (String optional)

    Return projects sorted in asc or desc order. Default is desc.

  • starred (Boolean optional)

    Limit by projects starred by the current user.

  • statistics (Boolean optional)

    Include project statistics. Available only to users with at least the Reporter role.

  • topic (String optional)

    Comma-separated topic names. Limit results to projects that match all of given topics. See topics attribute.

  • topic_id (Integer optional)

    Limit results to projects with the assigned topic given by the topic ID.

  • updated_after (String optional)

    Limit results to projects last updated after the specified time. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). Introduced in GitLab 15.10. For this filter to work, you must also provide updated_at as the order_by attribute.

  • updated_before (String optional)

    Limit results to projects last updated before the specified time. Format: ISO 8601 (YYYY-MM-DDTHH:MM:SSZ). Introduced in GitLab 15.10. For this filter to work, you must also provide updated_at as the order_by attribute.

  • visibility (String optional)

    Limit by visibility public, internal, or private.

  • wiki_checksum_failed (Boolean optional)

    Limit projects where the wiki checksum calculation has failed. Premium and Ultimate only.

  • with_custom_attributes (Boolean optional)

    Include custom attributes in response. (administrator only)

  • with_issues_enabled (Boolean optional)

    Limit by enabled issues feature.

  • with_merge_requests_enabled (Boolean optional)

    Limit by enabled merge requests feature.

  • with_programming_language (String optional)

    Limit by projects which use the given programming language.

  • limit (Integer optional)

    The limit to the number of users returned. Default to 0 (i.e. no limit)

Returns:

  • (Array)

See Also:

Author:

  • Jason Colyer

Since:

  • 1.0.0



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

Examples:

require 'support_ops_gitlab'

SupportOps::GitLab::Configuration.configure do |config|
  config.url = 'https://gitlab.example.com/api/v4'
  config.token = 'abc123'
end

projects = SupportOps::GitLab::Projects.Search(query: 'Awesome', limit: 25)
pp projects.count
# => 25
pp projects.last.name
# => "Jason / Awesome project"

Parameters:

  • query (String optional)

    A string contained in the project name

  • sort (String optional)

    Return requests ordered by id, name, created_at, star_count, or last_activity_at fields.

  • order_by (String optional)

    Return requests sorted in asc or desc order

  • limit (Integer optional)

    The limit to the number of users returned. Default to 0 (i.e. no limit)

Returns:

  • (Array)

See Also:

Author:

  • Jason Colyer

Since:

  • 1.0.0



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

#contributorsBoolean

Note:

This is inherited from Base#contributors

Get contributor list

Examples:

require 'support_ops_gitlab'

SupportOps::GitLab::Configuration.configure do |config|
  config.url = 'https://gitlab.example.com/api/v4'
  config.token = 'abc123'
end

project = SupportOps::GitLab::Projects.get!(123456)
contributors = project.contributors
pp contributors.count
# => 13
pp contributors.first['commits']
# => 2

Returns:

  • (Boolean)

See Also:

Author:

  • Jason Colyer

Since:

  • 1.0.0



25
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 25

def contributors; end

#eventsBoolean

Note:

This is inherited from Base#events

List events for a project

Examples:

require 'support_ops_gitlab'

SupportOps::GitLab::Configuration.configure do |config|
  config.url = 'https://gitlab.example.com/api/v4'
  config.token = 'abc123'
end

project = SupportOps::GitLab::Projects.get!(123456)
events = project.events
pp events.count
# => 482

Returns:

  • (Boolean)

See Also:

Author:

  • Jason Colyer

Since:

  • 1.0.0



23
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 23

def events; end

#save!Object

Note:

This is inherited from Base#save!

Creates/updates a project

Returns:

See Also:

Author:

  • Jason Colyer

Since:

  • 1.0.0



13
# File 'lib/support_ops_gitlab/gitlab/projects.rb', line 13

def save!; end