Module: LabClient::ProjectMethods

Included in:
Project
Defined in:
lib/labclient/projects/methods.rb

Overview

Location for Helper Methods rubocop:disable Metrics/ModuleLength

Instance Method Summary collapse

Instance Method Details

#access_requestsObject



663
664
665
# File 'lib/labclient/projects/methods.rb', line 663

def access_requests
  client.projects.access_requests.list(id)
end

#approvalsObject

Approvals



429
430
431
# File 'lib/labclient/projects/methods.rb', line 429

def approvals
  client.approvals.project.show(id)
end

#approvals_rule_create(query) ⇒ Object



441
442
443
# File 'lib/labclient/projects/methods.rb', line 441

def approvals_rule_create(query)
  client.approvals.project.create_rule(id, query)
end

#approvals_rule_delete(approval_rule_id) ⇒ Object



449
450
451
# File 'lib/labclient/projects/methods.rb', line 449

def approvals_rule_delete(approval_rule_id)
  client.approvals.project.delete_rule(id, approval_rule_id)
end

#approvals_rule_update(approval_rule_id, query) ⇒ Object



445
446
447
# File 'lib/labclient/projects/methods.rb', line 445

def approvals_rule_update(approval_rule_id, query)
  client.approvals.project.update_rule(id, approval_rule_id, query)
end

#approvals_rulesObject



437
438
439
# File 'lib/labclient/projects/methods.rb', line 437

def approvals_rules
  client.approvals.project.rules(id)
end

#approvals_update(query = {}) ⇒ Object



433
434
435
# File 'lib/labclient/projects/methods.rb', line 433

def approvals_update(query = {})
  client.approvals.project.update(id, query)
end

#archiveObject



22
23
24
# File 'lib/labclient/projects/methods.rb', line 22

def archive
  client.projects.archive(id)
end

#badge_create(query) ⇒ Object



462
463
464
# File 'lib/labclient/projects/methods.rb', line 462

def badge_create(query)
  client.projects.badges.create(id, query)
end

#badge_delete(badge_id) ⇒ Object



470
471
472
# File 'lib/labclient/projects/methods.rb', line 470

def badge_delete(badge_id)
  client.projects.badges.delete(id, badge_id)
end

#badge_show(badge_id) ⇒ Object



458
459
460
# File 'lib/labclient/projects/methods.rb', line 458

def badge_show(badge_id)
  client.projects.badges.show(id, badge_id)
end

#badge_update(badge_id, query) ⇒ Object



466
467
468
# File 'lib/labclient/projects/methods.rb', line 466

def badge_update(badge_id, query)
  client.projects.badges.update(id, badge_id, query)
end

#badgesObject

Project Badges



454
455
456
# File 'lib/labclient/projects/methods.rb', line 454

def badges
  client.projects.badges.list(id)
end

#blob(sha, raw = nil) ⇒ Object



307
308
309
# File 'lib/labclient/projects/methods.rb', line 307

def blob(sha, raw = nil)
  client.repo.blob(id, sha, raw)
end

#branch(branch_id) ⇒ Object



349
350
351
# File 'lib/labclient/projects/methods.rb', line 349

def branch(branch_id)
  client.branches.show(id, branch_id)
end

#branch_code_owner_approval(branch_id, approv_id = true) ⇒ Object



382
383
384
# File 'lib/labclient/projects/methods.rb', line 382

def branch_code_owner_approval(branch_id, approv_id = true)
  client.protected_branches.code_owner_approval(id, branch_id, approv_id)
end

#branch_create(query) ⇒ Object



353
354
355
# File 'lib/labclient/projects/methods.rb', line 353

def branch_create(query)
  client.branches.create(id, query)
end

#branch_delete(branch_id) ⇒ Object



357
358
359
# File 'lib/labclient/projects/methods.rb', line 357

def branch_delete(branch_id)
  client.branches.delete(id, branch_id)
end

#branch_delete_mergedObject



361
362
363
# File 'lib/labclient/projects/methods.rb', line 361

def branch_delete_merged
  client.branches.delete_merged(id)
end

#branches(search = nil) ⇒ Object

Branches



345
346
347
# File 'lib/labclient/projects/methods.rb', line 345

def branches(search = nil)
  client.branches.list(id, search)
end

#cluster(cluster_id) ⇒ Object



720
721
722
# File 'lib/labclient/projects/methods.rb', line 720

def cluster(cluster_id)
  client.projects.clusters.show(id, cluster_id)
end

#clustersObject

Clusters



716
717
718
# File 'lib/labclient/projects/methods.rb', line 716

def clusters
  client.projects.clusters.list(id)
end

#compare(query) ⇒ Object



315
316
317
# File 'lib/labclient/projects/methods.rb', line 315

def compare(query)
  client.repo.compare(id, query)
end

#contributors(query = {}) ⇒ Object



319
320
321
# File 'lib/labclient/projects/methods.rb', line 319

def contributors(query = {})
  client.repo.contributors(id, query)
end

#deleteObject



14
15
16
# File 'lib/labclient/projects/methods.rb', line 14

def delete
  client.projects.delete(id)
end

#deployment_create(query) ⇒ Object



544
545
546
# File 'lib/labclient/projects/methods.rb', line 544

def deployment_create(query)
  client.projects.deployments.create(id, query)
end

#deployment_merge_requests(deployment_id) ⇒ Object



552
553
554
# File 'lib/labclient/projects/methods.rb', line 552

def deployment_merge_requests(deployment_id)
  client.projects.deployments.merge_requests(id, deployment_id)
end

#deployment_show(deployment_id) ⇒ Object



540
541
542
# File 'lib/labclient/projects/methods.rb', line 540

def deployment_show(deployment_id)
  client.projects.deployments.show(id, deployment_id)
end

#deployment_update(deployment_id, query) ⇒ Object



548
549
550
# File 'lib/labclient/projects/methods.rb', line 548

def deployment_update(deployment_id, query)
  client.projects.deployments.update(id, deployment_id, query)
end

#deploymentsObject

Project Deployments



536
537
538
# File 'lib/labclient/projects/methods.rb', line 536

def deployments
  client.projects.deployments.list(id)
end

#download_archive(file_path = nil, format = '.tar.gz') ⇒ Object



311
312
313
# File 'lib/labclient/projects/methods.rb', line 311

def download_archive(file_path = nil, format = '.tar.gz')
  client.repo.archive(id, file_path, format)
end

#environment_create(query) ⇒ Object



485
486
487
# File 'lib/labclient/projects/methods.rb', line 485

def environment_create(query)
  client.projects.environments.create(id, query)
end

#environment_delete(environment_id) ⇒ Object



493
494
495
# File 'lib/labclient/projects/methods.rb', line 493

def environment_delete(environment_id)
  client.projects.environments.delete(id, environment_id)
end

#environment_show(environment_id) ⇒ Object Also known as: environment



479
480
481
# File 'lib/labclient/projects/methods.rb', line 479

def environment_show(environment_id)
  client.projects.environments.show(id, environment_id)
end

#environment_stop(environment_id) ⇒ Object



497
498
499
# File 'lib/labclient/projects/methods.rb', line 497

def environment_stop(environment_id)
  client.projects.environments.stop(id, environment_id)
end

#environment_update(environment_id, query) ⇒ Object



489
490
491
# File 'lib/labclient/projects/methods.rb', line 489

def environment_update(environment_id, query)
  client.projects.environments.update(id, environment_id, query)
end

#environmentsObject

Project Environments



475
476
477
# File 'lib/labclient/projects/methods.rb', line 475

def environments
  client.projects.environments.list(id)
end

#events(query = {}) ⇒ Object



10
11
12
# File 'lib/labclient/projects/methods.rb', line 10

def events(query = {})
  client.events.project(id, query)
end

#file(file_path, ref = :main, kind = nil) ⇒ Object

Files



328
329
330
# File 'lib/labclient/projects/methods.rb', line 328

def file(file_path, ref = :main, kind = nil)
  client.files.show(id, file_path, ref, kind)
end

#file_create(file_path, query) ⇒ Object



332
333
334
# File 'lib/labclient/projects/methods.rb', line 332

def file_create(file_path, query)
  client.files.create(id, file_path, query)
end

#file_delete(file_path, query) ⇒ Object



340
341
342
# File 'lib/labclient/projects/methods.rb', line 340

def file_delete(file_path, query)
  client.files.delete(id, file_path, query)
end

#file_update(file_path, query) ⇒ Object



336
337
338
# File 'lib/labclient/projects/methods.rb', line 336

def file_update(file_path, query)
  client.files.update(id, file_path, query)
end

#fork(query = {}) ⇒ Object



62
63
64
# File 'lib/labclient/projects/methods.rb', line 62

def fork(query = {})
  client.projects.fork(id, query)
end

#fork_existing(target_id) ⇒ Object



74
75
76
# File 'lib/labclient/projects/methods.rb', line 74

def fork_existing(target_id)
  update_self(client.projects.fork_existing(id, target_id))
end

#fork_removeObject



70
71
72
# File 'lib/labclient/projects/methods.rb', line 70

def fork_remove
  client.projects.fork_remove(id)
end

#forks(query = {}) ⇒ Object



66
67
68
# File 'lib/labclient/projects/methods.rb', line 66

def forks(query = {})
  client.projects.forks(id, query)
end

#hook_create(query) ⇒ Object



96
97
98
# File 'lib/labclient/projects/methods.rb', line 96

def hook_create(query)
  client.projects.hooks.create(id, query)
end

#hook_delete(hook_id) ⇒ Object



104
105
106
# File 'lib/labclient/projects/methods.rb', line 104

def hook_delete(hook_id)
  client.projects.hooks.delete(id, hook_id)
end

#hook_show(hook_id) ⇒ Object



92
93
94
# File 'lib/labclient/projects/methods.rb', line 92

def hook_show(hook_id)
  client.projects.hooks.show(id, hook_id)
end

#hook_update(hook_id, query) ⇒ Object



100
101
102
# File 'lib/labclient/projects/methods.rb', line 100

def hook_update(hook_id, query)
  client.projects.hooks.update(id, hook_id, query)
end

#hooksObject

Hooks



88
89
90
# File 'lib/labclient/projects/methods.rb', line 88

def hooks
  client.projects.hooks.list(id)
end

#housekeepingObject



128
129
130
# File 'lib/labclient/projects/methods.rb', line 128

def housekeeping
  client.projects.housekeeping(id)
end

#issue_create(query) ⇒ Object



83
84
85
# File 'lib/labclient/projects/methods.rb', line 83

def issue_create(query)
  client.issues.create(id, query)
end

#issues(query = {}) ⇒ Object

Issues



79
80
81
# File 'lib/labclient/projects/methods.rb', line 79

def issues(query = {})
  client.issues.project_issues(id, query)
end

#job(job_id) ⇒ Object



225
226
227
# File 'lib/labclient/projects/methods.rb', line 225

def job(job_id)
  client.jobs.show(id, job_id)
end

#job_artifacts(job_id, job_token = nil) ⇒ Object



233
234
235
# File 'lib/labclient/projects/methods.rb', line 233

def job_artifacts(job_id, job_token = nil)
  client.jobs.artifacts(id, job_id,  job_token)
end

#job_artifacts_latest(branch_name, job_name, file_path = nil, job_token = nil) ⇒ Object



237
238
239
# File 'lib/labclient/projects/methods.rb', line 237

def job_artifacts_latest(branch_name, job_name, file_path = nil, job_token = nil)
  client.jobs.artifacts_latest(id, branch_name, job_name, file_path, job_token)
end

#job_artifacts_path(job_id, artifacts_path, file_path = nil) ⇒ Object



241
242
243
# File 'lib/labclient/projects/methods.rb', line 241

def job_artifacts_path(job_id, artifacts_path, file_path = nil)
  client.jobs.artifacts_path(id, job_id, artifacts_path, file_path)
end

#job_cancel(job_id) ⇒ Object



249
250
251
# File 'lib/labclient/projects/methods.rb', line 249

def job_cancel(job_id)
  client.jobs.cancel(id, job_id)
end

#job_delete(job_id) ⇒ Object



265
266
267
# File 'lib/labclient/projects/methods.rb', line 265

def job_delete(job_id)
  client.jobs.delete(id, job_id)
end

#job_download_artifacts(job_id, file_path = nil, job_token = nil) ⇒ Object



229
230
231
# File 'lib/labclient/projects/methods.rb', line 229

def job_download_artifacts(job_id, file_path = nil, job_token = nil)
  client.jobs.download_artifacts(id, job_id, file_path, job_token)
end

#job_erase(job_id) ⇒ Object



257
258
259
# File 'lib/labclient/projects/methods.rb', line 257

def job_erase(job_id)
  client.jobs.erase(id, job_id)
end

#job_keep(job_id) ⇒ Object



261
262
263
# File 'lib/labclient/projects/methods.rb', line 261

def job_keep(job_id)
  client.jobs.keep(id, job_id)
end

#job_play(job_id) ⇒ Object



269
270
271
# File 'lib/labclient/projects/methods.rb', line 269

def job_play(job_id)
  client.jobs.play(id, job_id)
end

#job_retry(job_id) ⇒ Object



253
254
255
# File 'lib/labclient/projects/methods.rb', line 253

def job_retry(job_id)
  client.jobs.retry(id, job_id)
end

#job_trace(job_id) ⇒ Object



245
246
247
# File 'lib/labclient/projects/methods.rb', line 245

def job_trace(job_id)
  client.jobs.trace(id, job_id)
end

#jobs(scope = nil) ⇒ Object



221
222
223
# File 'lib/labclient/projects/methods.rb', line 221

def jobs(scope = nil)
  client.jobs.project(id, scope)
end

#label(label_id, query = {}) ⇒ Object



672
673
674
# File 'lib/labclient/projects/methods.rb', line 672

def label(label_id, query = {})
  client.projects.labels.show(id, label_id, query)
end

#label_create(query) ⇒ Object



676
677
678
# File 'lib/labclient/projects/methods.rb', line 676

def label_create(query)
  client.projects.labels.create(id, query)
end

#label_delete(label_id) ⇒ Object



680
681
682
# File 'lib/labclient/projects/methods.rb', line 680

def label_delete(label_id)
  client.projects.labels.delete(id, label_id)
end

#label_promote(label_id) ⇒ Object



688
689
690
# File 'lib/labclient/projects/methods.rb', line 688

def label_promote(label_id)
  client.projects.labels.promote(id, label_id)
end

#label_subscribe(label_id) ⇒ Object



692
693
694
# File 'lib/labclient/projects/methods.rb', line 692

def label_subscribe(label_id)
  client.projects.labels.subscribe(id, label_id)
end

#label_unsubscribe(label_id) ⇒ Object



696
697
698
# File 'lib/labclient/projects/methods.rb', line 696

def label_unsubscribe(label_id)
  client.projects.labels.unsubscribe(id, label_id)
end

#label_update(label_id, query) ⇒ Object



684
685
686
# File 'lib/labclient/projects/methods.rb', line 684

def label_update(label_id, query)
  client.projects.labels.update(id, label_id, query)
end

#labels(query = {}) ⇒ Object

Labels



668
669
670
# File 'lib/labclient/projects/methods.rb', line 668

def labels(query = {})
  client.projects.labels.list(id, query)
end

#languagesObject



30
31
32
# File 'lib/labclient/projects/methods.rb', line 30

def languages
  client.projects.languages(id)
end

#member(user_id) ⇒ Object



282
283
284
# File 'lib/labclient/projects/methods.rb', line 282

def member(user_id)
  client.members.projects.show(id, user_id)
end

#member_add(user_id, query) ⇒ Object



290
291
292
# File 'lib/labclient/projects/methods.rb', line 290

def member_add(user_id, query)
  client.members.projects.add(id, user_id, query)
end

#member_all(user_id) ⇒ Object



286
287
288
# File 'lib/labclient/projects/methods.rb', line 286

def member_all(user_id)
  client.members.projects.show_all(id, user_id)
end

#member_delete(user_id) ⇒ Object



298
299
300
# File 'lib/labclient/projects/methods.rb', line 298

def member_delete(user_id)
  client.members.projects.delete(id, user_id)
end

#member_update(user_id, query) ⇒ Object



294
295
296
# File 'lib/labclient/projects/methods.rb', line 294

def member_update(user_id, query)
  client.members.projects.update(id, user_id, query)
end

#members(query = nil) ⇒ Object

Members



274
275
276
# File 'lib/labclient/projects/methods.rb', line 274

def members(query = nil)
  client.members.projects.list(id, query)
end

#members_all(query = nil) ⇒ Object



278
279
280
# File 'lib/labclient/projects/methods.rb', line 278

def members_all(query = nil)
  client.members.projects.list_all(id, query)
end

#merge_base(refs) ⇒ Object



323
324
325
# File 'lib/labclient/projects/methods.rb', line 323

def merge_base(refs)
  client.repo.merge_base(id, refs)
end

#merge_request_create(query) ⇒ Object



650
651
652
# File 'lib/labclient/projects/methods.rb', line 650

def merge_request_create(query)
  client.merge_requests.create(id, query)
end

#merge_request_delete(merge_request_iid) ⇒ Object



654
655
656
# File 'lib/labclient/projects/methods.rb', line 654

def merge_request_delete(merge_request_iid)
  client.merge_requests.delete(id, merge_request_iid)
end

#merge_requests(query = {}) ⇒ Object

Merge Requests



646
647
648
# File 'lib/labclient/projects/methods.rb', line 646

def merge_requests(query = {})
  client.merge_requests.list_project(id, query)
end

#milestones(query = {}) ⇒ Object

Milestones



706
707
708
# File 'lib/labclient/projects/methods.rb', line 706

def milestones(query = {})
  client.projects.milestones.list(id, query)
end

#mirror_create(query) ⇒ Object



145
146
147
# File 'lib/labclient/projects/methods.rb', line 145

def mirror_create(query)
  client.projects.mirrors.create(id, query)
end

#mirror_startObject

Mirrors



137
138
139
# File 'lib/labclient/projects/methods.rb', line 137

def mirror_start
  client.projects.mirror_start(id)
end

#mirror_update(mirror_id, query) ⇒ Object



149
150
151
# File 'lib/labclient/projects/methods.rb', line 149

def mirror_update(mirror_id, query)
  client.projects.mirrors.update(id, mirror_id, query)
end

#mirrorsObject



141
142
143
# File 'lib/labclient/projects/methods.rb', line 141

def mirrors
  client.projects.mirrors.list(id)
end

#parentObject

Parent Helper



739
740
741
742
743
744
745
746
# File 'lib/labclient/projects/methods.rb', line 739

def parent
  case namespace.kind
  when 'user'
    client.users.show(namespace.id)
  when 'group'
    client.groups.show(namespace.id)
  end
end

#pipeline(pipeline_id) ⇒ Object



197
198
199
# File 'lib/labclient/projects/methods.rb', line 197

def pipeline(pipeline_id)
  client.pipelines.show(id, pipeline_id)
end

#pipeline_cancel(pipeline_id) ⇒ Object



213
214
215
# File 'lib/labclient/projects/methods.rb', line 213

def pipeline_cancel(pipeline_id)
  client.pipelines.cancel(id, pipeline_id)
end

#pipeline_create(query) ⇒ Object



205
206
207
# File 'lib/labclient/projects/methods.rb', line 205

def pipeline_create(query)
  client.pipelines.create(id, query)
end

#pipeline_delete(pipeline_id) ⇒ Object



217
218
219
# File 'lib/labclient/projects/methods.rb', line 217

def pipeline_delete(pipeline_id)
  client.pipelines.delete(id, pipeline_id)
end

#pipeline_retry(pipeline_id) ⇒ Object



209
210
211
# File 'lib/labclient/projects/methods.rb', line 209

def pipeline_retry(pipeline_id)
  client.pipelines.retry(id, pipeline_id)
end

#pipeline_schedules(query = {}) ⇒ Object

Pipeline Schedules



711
712
713
# File 'lib/labclient/projects/methods.rb', line 711

def pipeline_schedules(query = {})
  client.projects.pipeline_schedules.list(id, query)
end

#pipeline_variables(pipeline_id) ⇒ Object



201
202
203
# File 'lib/labclient/projects/methods.rb', line 201

def pipeline_variables(pipeline_id)
  client.pipelines.variables(id, pipeline_id)
end

#pipelines(query = {}) ⇒ Object



193
194
195
# File 'lib/labclient/projects/methods.rb', line 193

def pipelines(query = {})
  client.pipelines.list(id, query)
end

#protect_branch(query) ⇒ Object



374
375
376
# File 'lib/labclient/projects/methods.rb', line 374

def protect_branch(query)
  client.protected_branches.protect(id, query)
end

#protect_environment(query) ⇒ Object



510
511
512
# File 'lib/labclient/projects/methods.rb', line 510

def protect_environment(query)
  client.protected_environments.protect(id, query)
end

#protect_tag(query) ⇒ Object



420
421
422
# File 'lib/labclient/projects/methods.rb', line 420

def protect_tag(query)
  client.protected_tags.protect(id, query)
end

#protected_branch(branch_id) ⇒ Object



370
371
372
# File 'lib/labclient/projects/methods.rb', line 370

def protected_branch(branch_id)
  client.protected_branches.show(id, branch_id)
end

#protected_branches(search = nil) ⇒ Object

Protected Branches



366
367
368
# File 'lib/labclient/projects/methods.rb', line 366

def protected_branches(search = nil)
  client.protected_branches.list(id, search)
end

#protected_environment(environment_id) ⇒ Object



506
507
508
# File 'lib/labclient/projects/methods.rb', line 506

def protected_environment(environment_id)
  client.protected_environments.show(id, environment_id)
end

#protected_environmentsObject

Protected Environments



502
503
504
# File 'lib/labclient/projects/methods.rb', line 502

def protected_environments
  client.protected_environments.list(id)
end

#protected_tag(tag_id) ⇒ Object



416
417
418
# File 'lib/labclient/projects/methods.rb', line 416

def protected_tag(tag_id)
  client.protected_tags.show(id, tag_id)
end

#protected_tagsObject

Protected Tags



412
413
414
# File 'lib/labclient/projects/methods.rb', line 412

def protected_tags
  client.protected_tags.list(id)
end

#push_rulesObject



112
113
114
# File 'lib/labclient/projects/methods.rb', line 112

def push_rules
  client.projects.push_rules.show(id)
end

#push_rules_create(query = {}) ⇒ Object



120
121
122
# File 'lib/labclient/projects/methods.rb', line 120

def push_rules_create(query = {})
  client.projects.push_rules.create(id, query)
end

#push_rules_deleteObject



116
117
118
# File 'lib/labclient/projects/methods.rb', line 116

def push_rules_delete
  client.projects.push_rules.delete(id)
end

#push_rules_update(query = {}) ⇒ Object



124
125
126
# File 'lib/labclient/projects/methods.rb', line 124

def push_rules_update(query = {})
  client.projects.push_rules.update(id, query)
end

#registry_repositories(query = {}) ⇒ Object

Registry



701
702
703
# File 'lib/labclient/projects/methods.rb', line 701

def registry_repositories(query = {})
  client.registry.list(id, query)
end

#release_create(query) ⇒ Object



586
587
588
# File 'lib/labclient/projects/methods.rb', line 586

def release_create(query)
  client.projects.releases.create(id, query)
end

#release_delete(release_id) ⇒ Object



594
595
596
# File 'lib/labclient/projects/methods.rb', line 594

def release_delete(release_id)
  client.projects.releases.delete(id, release_id)
end

#release_evidence(release_id) ⇒ Object



598
599
600
# File 'lib/labclient/projects/methods.rb', line 598

def release_evidence(release_id)
  client.projects.releases.evidence(id, release_id)
end


611
612
613
# File 'lib/labclient/projects/methods.rb', line 611

def release_link_create(release_id, query)
  client.projects.release_links.create(id, release_id, query)
end


619
620
621
# File 'lib/labclient/projects/methods.rb', line 619

def release_link_delete(release_id, link_id)
  client.projects.release_links.delete(id, release_id, link_id)
end


607
608
609
# File 'lib/labclient/projects/methods.rb', line 607

def release_link_show(release_id, link_id)
  client.projects.release_links.show(id, release_id, link_id)
end


615
616
617
# File 'lib/labclient/projects/methods.rb', line 615

def release_link_update(release_id, link_id, query)
  client.projects.release_links.update(id, release_id, link_id, query)
end

Project Release Links



603
604
605
# File 'lib/labclient/projects/methods.rb', line 603

def release_links(release_id)
  client.projects.release_links.list(id, release_id)
end

#release_show(release_id) ⇒ Object



582
583
584
# File 'lib/labclient/projects/methods.rb', line 582

def release_show(release_id)
  client.projects.releases.show(id, release_id)
end

#release_update(release_id, query) ⇒ Object



590
591
592
# File 'lib/labclient/projects/methods.rb', line 590

def release_update(release_id, query)
  client.projects.releases.update(id, release_id, query)
end

#releasesObject

Project Releases



578
579
580
# File 'lib/labclient/projects/methods.rb', line 578

def releases
  client.projects.releases.list(id)
end

#reloadObject

Reload



734
735
736
# File 'lib/labclient/projects/methods.rb', line 734

def reload
  update_self client.projects.show(id)
end

#request_accessObject

Access Requests



659
660
661
# File 'lib/labclient/projects/methods.rb', line 659

def request_access
  client.projects.access_requests.create(id)
end

#restoreObject



18
19
20
# File 'lib/labclient/projects/methods.rb', line 18

def restore
  client.projects.restore(id)
end

#runner_disable(runner_id) ⇒ Object



189
190
191
# File 'lib/labclient/projects/methods.rb', line 189

def runner_disable(runner_id)
  client.projects.runners.disable(id, runner_id)
end

#runner_enable(runner_id) ⇒ Object



185
186
187
# File 'lib/labclient/projects/methods.rb', line 185

def runner_enable(runner_id)
  client.projects.runners.enable(id, runner_id)
end

#runners(query = {}) ⇒ Object



181
182
183
# File 'lib/labclient/projects/methods.rb', line 181

def runners(query = {})
  client.projects.runners.list(id, query)
end

#search(scope, search_string = '') ⇒ Object



108
109
110
# File 'lib/labclient/projects/methods.rb', line 108

def search(scope, search_string = '')
  client.projects.search_within(id, scope, search_string)
end

#service_delete(service_slug) ⇒ Object



636
637
638
# File 'lib/labclient/projects/methods.rb', line 636

def service_delete(service_slug)
  client.projects.services.delete(id, service_slug)
end

#service_show(service_slug) ⇒ Object



628
629
630
# File 'lib/labclient/projects/methods.rb', line 628

def service_show(service_slug)
  client.projects.services.show(id, service_slug)
end

#service_update(service_slug, query) ⇒ Object



632
633
634
# File 'lib/labclient/projects/methods.rb', line 632

def service_update(service_slug, query)
  client.projects.services.update(id, service_slug, query)
end

#servicesObject

Project Services



624
625
626
# File 'lib/labclient/projects/methods.rb', line 624

def services
  client.projects.services.list(id)
end

#share(query) ⇒ Object



54
55
56
# File 'lib/labclient/projects/methods.rb', line 54

def share(query)
  client.projects.share(id, query)
end

#snapshot(file_name, wiki = false) ⇒ Object



153
154
155
# File 'lib/labclient/projects/methods.rb', line 153

def snapshot(file_name, wiki = false)
  client.projects.snapshot(id, file_name, wiki)
end

#snippet_create(query) ⇒ Object



753
754
755
# File 'lib/labclient/projects/methods.rb', line 753

def snippet_create(query)
  client.projects.snippets.create(id, query)
end

#snippetsObject

Snippets



749
750
751
# File 'lib/labclient/projects/methods.rb', line 749

def snippets
  client.projects.snippets.list(id)
end

#starObject



34
35
36
# File 'lib/labclient/projects/methods.rb', line 34

def star
  client.projects.star(id)
end

#starrers(search = '') ⇒ Object



42
43
44
# File 'lib/labclient/projects/methods.rb', line 42

def starrers(search = '')
  client.projects.starrers(id, search)
end

#submodule(submodule_path, query) ⇒ Object

Submodule



641
642
643
# File 'lib/labclient/projects/methods.rb', line 641

def submodule(submodule_path, query)
  client.projects.submodule(id, submodule_path, query)
end

#tag(tag_id) ⇒ Object



391
392
393
# File 'lib/labclient/projects/methods.rb', line 391

def tag(tag_id)
  client.tags.show(id, tag_id)
end

#tag_create(query) ⇒ Object



395
396
397
# File 'lib/labclient/projects/methods.rb', line 395

def tag_create(query)
  client.tags.create(id, query)
end

#tag_delete(tag_id) ⇒ Object



399
400
401
# File 'lib/labclient/projects/methods.rb', line 399

def tag_delete(tag_id)
  client.tags.delete(id, tag_id)
end

#tag_release(tag_id, desc_details) ⇒ Object



403
404
405
# File 'lib/labclient/projects/methods.rb', line 403

def tag_release(tag_id, desc_details)
  client.tags.release(id, tag_id, desc_details)
end

#tag_update(tag_id, desc_details) ⇒ Object



407
408
409
# File 'lib/labclient/projects/methods.rb', line 407

def tag_update(tag_id, desc_details)
  client.tags.update(id, tag_id, desc_details)
end

#tags(query = {}) ⇒ Object

Tags



387
388
389
# File 'lib/labclient/projects/methods.rb', line 387

def tags(query = {})
  client.tags.list(id, query)
end

#template_show(template_type, template_name, query = {}) ⇒ Object



729
730
731
# File 'lib/labclient/projects/methods.rb', line 729

def template_show(template_type, template_name, query = {})
  client.projects.templates.show(id, template_type, template_name, query)
end

#templates(template_type) ⇒ Object

Templates



725
726
727
# File 'lib/labclient/projects/methods.rb', line 725

def templates(template_type)
  client.projects.templates.list(id, template_type)
end

#transfer(target_id) ⇒ Object



132
133
134
# File 'lib/labclient/projects/methods.rb', line 132

def transfer(target_id)
  client.projects.transfer(id, target_id)
end

#tree(query = {}) ⇒ Object

Repository



303
304
305
# File 'lib/labclient/projects/methods.rb', line 303

def tree(query = {})
  client.repo.tree(id, query)
end

#trigger_create(query) ⇒ Object



527
528
529
# File 'lib/labclient/projects/methods.rb', line 527

def trigger_create(query)
  client.projects.triggers.create(id, query)
end

#trigger_delete(trigger_id) ⇒ Object



531
532
533
# File 'lib/labclient/projects/methods.rb', line 531

def trigger_delete(trigger_id)
  client.projects.triggers.delete(id, trigger_id)
end

#trigger_show(trigger_id) ⇒ Object



523
524
525
# File 'lib/labclient/projects/methods.rb', line 523

def trigger_show(trigger_id)
  client.projects.triggers.show(id, trigger_id)
end

#triggersObject

Project Triggers



519
520
521
# File 'lib/labclient/projects/methods.rb', line 519

def triggers
  client.projects.triggers.list(id)
end

#unarchiveObject



26
27
28
# File 'lib/labclient/projects/methods.rb', line 26

def unarchive
  client.projects.unarchive(id)
end

#unprotect_branch(branch_id) ⇒ Object



378
379
380
# File 'lib/labclient/projects/methods.rb', line 378

def unprotect_branch(branch_id)
  client.protected_branches.unprotect(id, branch_id)
end

#unprotect_environment(environment_id) ⇒ Object



514
515
516
# File 'lib/labclient/projects/methods.rb', line 514

def unprotect_environment(environment_id)
  client.protected_environments.unprotect(id, environment_id)
end

#unprotect_tag(tag_id) ⇒ Object



424
425
426
# File 'lib/labclient/projects/methods.rb', line 424

def unprotect_tag(tag_id)
  client.protected_tags.unprotect(id, tag_id)
end

#unshare(group_id) ⇒ Object



58
59
60
# File 'lib/labclient/projects/methods.rb', line 58

def unshare(group_id)
  client.projects.unshare(id, group_id)
end

#unstarObject



38
39
40
# File 'lib/labclient/projects/methods.rb', line 38

def unstar
  client.projects.unstar(id)
end

#update(query = {}) ⇒ Object



46
47
48
# File 'lib/labclient/projects/methods.rb', line 46

def update(query = {})
  update_self(client.projects.update(id, query))
end

#upload(path) ⇒ Object



50
51
52
# File 'lib/labclient/projects/methods.rb', line 50

def upload(path)
  client.projects.upload(id, path)
end

#usersObject



6
7
8
# File 'lib/labclient/projects/methods.rb', line 6

def users
  client.projects.users(id)
end

#variable_create(query) ⇒ Object



565
566
567
# File 'lib/labclient/projects/methods.rb', line 565

def variable_create(query)
  client.projects.variables.create(id, query)
end

#variable_delete(variable_id) ⇒ Object



573
574
575
# File 'lib/labclient/projects/methods.rb', line 573

def variable_delete(variable_id)
  client.projects.variables.delete(id, variable_id)
end

#variable_show(variable_id) ⇒ Object



561
562
563
# File 'lib/labclient/projects/methods.rb', line 561

def variable_show(variable_id)
  client.projects.variables.show(id, variable_id)
end

#variable_update(variable_id, query) ⇒ Object



569
570
571
# File 'lib/labclient/projects/methods.rb', line 569

def variable_update(variable_id, query)
  client.projects.variables.update(id, variable_id, query)
end

#variablesObject

Project Variables



557
558
559
# File 'lib/labclient/projects/methods.rb', line 557

def variables
  client.projects.variables.list(id)
end

#wait_for_import(total_time = 300, sleep_time = 15) ⇒ Object

Wait for Import / Set a Hard Limit



758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
# File 'lib/labclient/projects/methods.rb', line 758

def wait_for_import(total_time = 300, sleep_time = 15)
  # none
  # scheduled
  # failed
  # started
  # finished

  Timeout.timeout(total_time) do
    loop do
      reload
      logger.info('Waiting for Import Status', status: import_status) unless quiet?
      break if %w[none finished].include? import_status
      raise "Import Failed: #{import_error}" if import_status == 'failed'

      sleep sleep_time
    end
  end
end

#wiki(slug) ⇒ Object



161
162
163
# File 'lib/labclient/projects/methods.rb', line 161

def wiki(slug)
  client.wikis.show(id, slug)
end

#wiki_create(query) ⇒ Object



165
166
167
# File 'lib/labclient/projects/methods.rb', line 165

def wiki_create(query)
  client.wikis.create(id, query)
end

#wiki_delete(slug) ⇒ Object



173
174
175
# File 'lib/labclient/projects/methods.rb', line 173

def wiki_delete(slug)
  client.wikis.delete(id, slug)
end

#wiki_update(slug, query) ⇒ Object



169
170
171
# File 'lib/labclient/projects/methods.rb', line 169

def wiki_update(slug, query)
  client.wikis.update(id, slug, query)
end

#wiki_upload(path) ⇒ Object



177
178
179
# File 'lib/labclient/projects/methods.rb', line 177

def wiki_upload(path)
  client.wikis.upload(id, path)
end

#wikis(with_content = false) ⇒ Object



157
158
159
# File 'lib/labclient/projects/methods.rb', line 157

def wikis(with_content = false)
  client.wikis.list(id, with_content)
end