Class: Gitlab::Client

Inherits:
API show all
Includes:
AccessRequests, ApplicationSettings, Avatar, AwardEmojis, Boards, Branches, BroadcastMessages, BuildVariables, Builds, Commits, ContainerRegistry, Deployments, Environments, Events, Features, GroupBoards, GroupLabels, GroupMilestones, Groups, Issues, Jobs, Keys, Labels, Lint, Markdown, MergeRequestApprovals, MergeRequests, Milestones, Namespaces, Notes, PipelineSchedules, PipelineTriggers, Pipelines, ProjectBadges, ProjectClusters, ProjectReleaseLinks, ProjectReleases, Projects, ProtectedTags, Repositories, RepositoryFiles, RepositorySubmodules, ResourceLabelEvents, Runners, Search, Services, Sidekiq, Snippets, SystemHooks, Tags, Templates, Todos, Users, Versions, Wikis
Defined in:
lib/gitlab/client.rb,
lib/gitlab/client/jobs.rb,
lib/gitlab/client/keys.rb,
lib/gitlab/client/lint.rb,
lib/gitlab/client/tags.rb,
lib/gitlab/client/notes.rb,
lib/gitlab/client/todos.rb,
lib/gitlab/client/users.rb,
lib/gitlab/client/wikis.rb,
lib/gitlab/client/avatar.rb,
lib/gitlab/client/boards.rb,
lib/gitlab/client/builds.rb,
lib/gitlab/client/events.rb,
lib/gitlab/client/groups.rb,
lib/gitlab/client/issues.rb,
lib/gitlab/client/labels.rb,
lib/gitlab/client/search.rb,
lib/gitlab/client/commits.rb,
lib/gitlab/client/runners.rb,
lib/gitlab/client/sidekiq.rb,
lib/gitlab/client/branches.rb,
lib/gitlab/client/features.rb,
lib/gitlab/client/markdown.rb,
lib/gitlab/client/projects.rb,
lib/gitlab/client/services.rb,
lib/gitlab/client/snippets.rb,
lib/gitlab/client/versions.rb,
lib/gitlab/client/pipelines.rb,
lib/gitlab/client/templates.rb,
lib/gitlab/client/milestones.rb,
lib/gitlab/client/namespaces.rb,
lib/gitlab/client/deployments.rb,
lib/gitlab/client/award_emojis.rb,
lib/gitlab/client/environments.rb,
lib/gitlab/client/group_boards.rb,
lib/gitlab/client/group_labels.rb,
lib/gitlab/client/repositories.rb,
lib/gitlab/client/system_hooks.rb,
lib/gitlab/client/merge_requests.rb,
lib/gitlab/client/project_badges.rb,
lib/gitlab/client/protected_tags.rb,
lib/gitlab/client/access_requests.rb,
lib/gitlab/client/build_variables.rb,
lib/gitlab/client/group_milestones.rb,
lib/gitlab/client/project_clusters.rb,
lib/gitlab/client/project_releases.rb,
lib/gitlab/client/repository_files.rb,
lib/gitlab/client/pipeline_triggers.rb,
lib/gitlab/client/broadcast_messages.rb,
lib/gitlab/client/container_registry.rb,
lib/gitlab/client/pipeline_schedules.rb,
lib/gitlab/client/application_settings.rb,
lib/gitlab/client/project_release_links.rb,
lib/gitlab/client/repository_submodules.rb,
lib/gitlab/client/resource_label_events.rb,
lib/gitlab/client/merge_request_approvals.rb

Overview

Wrapper for the Gitlab REST API.

Defined Under Namespace

Modules: AccessRequests, ApplicationSettings, Avatar, AwardEmojis, Boards, Branches, BroadcastMessages, BuildVariables, Builds, Commits, ContainerRegistry, Deployments, Environments, Events, Features, GroupBoards, GroupLabels, GroupMilestones, Groups, Issues, Jobs, Keys, Labels, Lint, Markdown, MergeRequestApprovals, MergeRequests, Milestones, Namespaces, Notes, PipelineSchedules, PipelineTriggers, Pipelines, ProjectBadges, ProjectClusters, ProjectReleaseLinks, ProjectReleases, Projects, ProtectedTags, Repositories, RepositoryFiles, RepositorySubmodules, ResourceLabelEvents, Runners, Search, Services, Sidekiq, Snippets, SystemHooks, Tags, Templates, Todos, Users, Versions, Wikis

Instance Attribute Summary

Attributes inherited from Request

#endpoint, #private_token

Instance Method Summary collapse

Methods included from Wikis

#create_wiki, #delete_wiki, #update_wiki, #wiki, #wikis

Methods included from Versions

#version

Methods included from Users

#add_email, #block_user, #create_ssh_key, #create_user, #delete_email, #delete_ssh_key, #delete_user, #edit_user, #email, #emails, #session, #ssh_key, #ssh_keys, #unblock_user, #user, #user_search, #users

Methods included from Todos

#mark_all_todos_as_done, #mark_todo_as_done, #todos

Methods included from Templates

#dockerfile_template, #dockerfile_templates, #gitignore_template, #gitignore_templates, #gitlab_ci_yml_template, #gitlab_ci_yml_templates, #license_template, #license_templates

Methods included from Tags

#create_release, #create_tag, #delete_tag, #tag, #tags, #update_release

Methods included from SystemHooks

#add_hook, #delete_hook, #hook, #hooks

Methods included from Snippets

#create_snippet, #delete_snippet, #edit_snippet, #snippet, #snippet_content, #snippets

Methods included from Sidekiq

#sidekiq_compound_metrics, #sidekiq_job_stats, #sidekiq_process_metrics, #sidekiq_queue_metrics

Methods included from Services

#change_service, #delete_service, #service

Methods included from Search

#search_globally, #search_in_group, #search_in_project

Methods included from Runners

#all_runners, #delete_registered_runner, #delete_runner, #project_disable_runner, #project_enable_runner, #project_runners, #register_runner, #runner, #runner_jobs, #runners, #update_runner, #verify_auth_registered_runner

Methods included from ResourceLabelEvents

#epic_label_event, #epic_label_events, #issue_label_event, #issue_label_events, #merge_request_label_event, #merge_request_label_events

Methods included from RepositorySubmodules

#edit_submodule

Methods included from RepositoryFiles

#create_file, #edit_file, #file_contents, #get_file, #remove_file

Methods included from Repositories

#compare, #merge_base, #repo_archive, #tree

Methods included from ProtectedTags

#protect_repository_tag, #protected_tag, #protected_tags, #unprotect_repository_tag

Methods included from Projects

#add_project_hook, #add_push_rule, #add_team_member, #archive_project, #create_deploy_key, #create_fork, #create_project, #delete_deploy_key, #delete_project, #delete_project_hook, #delete_push_rule, #deploy_key, #deploy_keys, #disable_deploy_key, #edit_project, #edit_project_hook, #edit_push_rule, #edit_team_member, #enable_deploy_key, #make_forked_from, #project, #project_forks, #project_hook, #project_hooks, #project_search, #project_template, #project_templates, #projects, #push_rule, #remove_forked, #remove_team_member, #share_project_with_group, #star_project, #team_member, #team_members, #transfer_project, #unarchive_project, #unshare_project_with_group, #unstar_project, #upload_file, #user_projects

Methods included from ProjectReleases

#create_project_release, #delete_project_release, #project_release, #project_releases, #update_project_release

Methods included from ProjectReleaseLinks

#create_project_release_link, #delete_project_release_link, #project_release_link, #project_release_links, #update_project_release_link

Methods included from ProjectClusters

#add_project_cluster, #delete_project_cluster, #edit_project_cluster, #project_cluster, #project_clusters

Methods included from ProjectBadges

#add_project_badge, #edit_project_badge, #preview_project_badge, #project_badge, #project_badges, #remove_project_badge

Methods included from Pipelines

#cancel_pipeline, #create_pipeline, #delete_pipeline, #pipeline, #pipelines, #retry_pipeline

Methods included from PipelineTriggers

#create_trigger, #remove_trigger, #run_trigger, #trigger, #trigger_take_ownership, #triggers, #update_trigger

Methods included from PipelineSchedules

#create_pipeline_schedule, #create_pipeline_schedule_variable, #delete_pipeline_schedule, #delete_pipeline_schedule_variable, #edit_pipeline_schedule, #edit_pipeline_schedule_variable, #pipeline_schedule, #pipeline_schedule_take_ownership, #pipeline_schedules

Methods included from Notes

#create_issue_note, #create_merge_request_note, #create_note, #create_snippet_note, #delete_issue_note, #delete_merge_request_note, #delete_note, #delete_snippet_note, #edit_issue_note, #edit_merge_request_note, #edit_note, #edit_snippet_note, #issue_note, #issue_notes, #merge_request_note, #merge_request_notes, #note, #notes, #snippet_note, #snippet_notes

Methods included from Namespaces

#namespaces

Methods included from Milestones

#create_milestone, #delete_milestone, #edit_milestone, #milestone, #milestone_issues, #milestone_merge_requests, #milestones

Methods included from MergeRequests

#accept_merge_request, #create_merge_request, #create_merge_request_discussion, #create_merge_request_discussion_note, #delete_merge_request_discussion_note, #merge_request, #merge_request_changes, #merge_request_closes_issues, #merge_request_commits, #merge_request_diff_version, #merge_request_diff_versions, #merge_request_discussion, #merge_request_discussions, #merge_request_participants, #merge_request_pipelines, #merge_requests, #resolve_merge_request_discussion, #subscribe_to_merge_request, #unsubscribe_from_merge_request, #update_merge_request, #update_merge_request_discussion_note, #user_merge_requests

Methods included from MergeRequestApprovals

#approve_merge_request, #edit_merge_request_approvals, #edit_merge_request_approvers, #edit_project_approvers, #edit_project_merge_request_approvals, #merge_request_approvals, #project_merge_request_approvals, #unapprove_merge_request

Methods included from Markdown

#markdown

Methods included from Lint

#validate_gitlab_ci_yml

Methods included from Labels

#create_label, #delete_label, #edit_label, #labels, #subscribe_to_label, #unsubscribe_from_label

Methods included from Keys

#key

Methods included from Jobs

#job, #job_artifacts, #job_artifacts_download, #job_artifacts_keep, #job_cancel, #job_erase, #job_play, #job_retry, #job_trace, #jobs, #pipeline_jobs

Methods included from Issues

#add_time_spent_on_issue, #close_issue, #create_issue, #delete_issue, #edit_issue, #estimate_time_of_issue, #issue, #issues, #merge_requests_closing_issue_on_merge, #move_issue, #participants_on_issue, #reopen_issue, #reset_time_estimate_of_issue, #reset_time_spent_on_issue, #subscribe_to_issue, #time_stats_for_issue, #unsubscribe_from_issue

Methods included from Groups

#add_group_member, #create_group, #delete_group, #edit_group, #edit_group_member, #group, #group_issues, #group_member, #group_members, #group_projects, #group_search, #group_subgroups, #groups, #remove_group_member, #transfer_project_to_group

Methods included from GroupMilestones

#create_group_milestone, #edit_group_milestone, #group_milestone, #group_milestone_issues, #group_milestone_merge_requests, #group_milestones

Methods included from GroupLabels

#create_group_label, #delete_group_label, #edit_group_label, #group_labels, #subscribe_to_group_label, #unsubscribe_from_group_label

Methods included from GroupBoards

#create_group_board, #create_group_board_list, #delete_group_board, #delete_group_board_list, #edit_group_board, #edit_group_board_list, #group_board, #group_board_list, #group_board_lists, #group_boards

Methods included from Features

#delete_feature, #features, #set_feature

Methods included from Events

#events, #project_events, #user_events

Methods included from Environments

#create_environment, #delete_environment, #edit_environment, #environment, #environments, #stop_environment

Methods included from Deployments

#deployment, #deployments

Methods included from ContainerRegistry

#bulk_delete_registry_repository_tags, #delete_registry_repository, #delete_registry_repository_tag, #registry_repositories, #registry_repository_tag, #registry_repository_tags

Methods included from Commits

#cherry_pick_commit, #commit, #commit_comments, #commit_diff, #commit_merge_requests, #commit_status, #commits, #create_commit, #create_commit_comment, #update_commit_status

Methods included from Builds

#build, #build_artifacts, #build_cancel, #build_erase, #build_retry, #builds, #commit_builds

Methods included from BuildVariables

#create_group_variable, #create_variable, #group_variable, #group_variables, #remove_group_variable, #remove_variable, #update_group_variable, #update_variable, #variable, #variables

Methods included from BroadcastMessages

#broadcast_message, #broadcast_messages, #create_broadcast_message, #delete_broadcast_message, #edit_broadcast_message

Methods included from Branches

#branch, #branches, #create_branch, #delete_branch, #delete_merged_branches, #protect_branch, #protected_branch, #protected_branches, #unprotect_branch

Methods included from Boards

#board, #board_list, #board_lists, #boards, #create_board, #create_board_list, #delete_board, #delete_board_list, #edit_board, #edit_board_list

Methods included from AwardEmojis

#award_emoji, #award_emojis, #create_award_emoji, #create_note_award_emoji, #delete_award_emoji, #delete_note_award_emoji, #note_award_emoji, #note_award_emojis

Methods included from Avatar

#avatar

Methods included from ApplicationSettings

#application_settings, #edit_application_settings

Methods included from AccessRequests

#approve_group_access_request, #approve_project_access_request, #deny_group_access_request, #deny_project_access_request, #group_access_requests, #project_access_requests, #request_group_access, #request_project_access

Methods inherited from API

#initialize

Methods inherited from Request

decode, parse, #request_defaults, #validate

Constructor Details

This class inherits a constructor from Gitlab::API

Instance Method Details

#inspectString

Text representation of the client, masking private token.


68
69
70
71
72
# File 'lib/gitlab/client.rb', line 68

def inspect
  inspected = super
  inspected.sub! @private_token, only_show_last_four_chars(@private_token) if @private_token
  inspected
end

#url_encode(url) ⇒ Object


74
75
76
# File 'lib/gitlab/client.rb', line 74

def url_encode(url)
  URI.encode(url.to_s, /\W/)
end