Class: GithubCLI::Label

Inherits:
API
  • Object
show all
Defined in:
lib/github_cli/apis/label.rb

Class Method Summary collapse

Methods inherited from API

configure, github_api, output, set_basic_auth

Class Method Details

.add(user, repo, issue_id, *args) ⇒ Object


38
39
40
41
42
43
# File 'lib/github_cli/apis/label.rb', line 38

def add(user, repo, issue_id, *args)
  options, params = args.pop, args.pop
  output options do
    github_api(options).issues.labels.add user, repo, issue_id, args.flatten, params
  end
end

.all(user, repo, params, options) ⇒ Object


8
9
10
11
12
# File 'lib/github_cli/apis/label.rb', line 8

def all(user, repo, params, options)
  output options do
    github_api(options).issues.labels.list user, repo, params
  end
end

.create(user, repo, params, options) ⇒ Object


20
21
22
23
24
# File 'lib/github_cli/apis/label.rb', line 20

def create(user, repo, params, options)
  output options do
    github_api(options).issues.labels.create user, repo, params
  end
end

.delete(user, repo, name, params, options) ⇒ Object


32
33
34
35
36
# File 'lib/github_cli/apis/label.rb', line 32

def delete(user, repo, name, params, options)
  output options do
    github_api(options).issues.labels.delete user, repo, name, params
  end
end

.get(user, repo, name, params, options) ⇒ Object


14
15
16
17
18
# File 'lib/github_cli/apis/label.rb', line 14

def get(user, repo, name, params, options)
  output options do
    github_api(options).issues.labels.get user, repo, name, params
  end
end

.remove(user, repo, issue_id, params, options) ⇒ Object


45
46
47
48
49
# File 'lib/github_cli/apis/label.rb', line 45

def remove(user, repo, issue_id, params, options)
  output options do
    github_api(options).issues.labels.remove user, repo, issue_id, params
  end
end

.replace(user, repo, issue_id, *args) ⇒ Object


51
52
53
54
55
56
# File 'lib/github_cli/apis/label.rb', line 51

def replace(user, repo, issue_id, *args)
  options, params = args.pop, args.pop
  output options do
    github_api(options).issues.labels.replace user, repo, issue_id, args.flatten, params
  end
end

.update(user, repo, name, params, options) ⇒ Object


26
27
28
29
30
# File 'lib/github_cli/apis/label.rb', line 26

def update(user, repo, name, params, options)
  output options do
    github_api(options).issues.labels.update user, repo, name, params
  end
end