Class: GithubCLI::Repository

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

Class Method Summary collapse

Methods inherited from API

configure, github_api, output, set_basic_auth

Class Method Details

.all(params, options) ⇒ Object


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

def all(params, options)
  args = options[:every] ? ['every', params] : [params]
  output options do
    github_api(options).repos.list *args
  end
end

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


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

def branch(user, repo, name, params, options)
  output options do
    github_api(options).repos.branch user, repo, name, params
  end
end

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


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

def branches(user, repo, params, options)
  output options do
    github_api(options).repos.branches user, repo, params
  end
end

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


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

def contributors(user, repo, params, options)
  output options do
    github_api(options).repos.contributors user, repo, params
  end
end

.create(params, options) ⇒ Object


21
22
23
24
25
# File 'lib/github_cli/apis/repository.rb', line 21

def create(params, options)
  output options do
    github_api(options).repos.create params
  end
end

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


33
34
35
36
37
# File 'lib/github_cli/apis/repository.rb', line 33

def delete(user, repo, params, options)
  output options do
    github_api(options).repos.delete user, repo, params
  end
end

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


27
28
29
30
31
# File 'lib/github_cli/apis/repository.rb', line 27

def edit(user, repo, params, options)
  output options do
    github_api(options).repos.edit user, repo, params
  end
end

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


15
16
17
18
19
# File 'lib/github_cli/apis/repository.rb', line 15

def get(user, repo, params, options)
  output options do
    github_api(options).repos.get user, repo, params
  end
end

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


57
58
59
60
61
# File 'lib/github_cli/apis/repository.rb', line 57

def languages(user, repo, params, options)
  output options do
    github_api(options).repos.languages user, repo, params
  end
end

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


63
64
65
66
67
# File 'lib/github_cli/apis/repository.rb', line 63

def tags(user, repo, params, options)
  output options do
    github_api.repos.tags user, repo, params
  end
end

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


69
70
71
72
73
# File 'lib/github_cli/apis/repository.rb', line 69

def teams(user, repo, params, options)
  output options do
    github_api(options).repos.teams user, repo, params
  end
end