Module: DroneCI::ReposAPI

Included in:
API
Defined in:
lib/drone-ci/api/repos.rb

Instance Method Summary collapse

Instance Method Details

#repo_chown(owner, repo) ⇒ Object



6
7
8
# File 'lib/drone-ci/api/repos.rb', line 6

def repo_chown(owner, repo)
  api.post("repos/#{owner}/#{repo}/chown")
end

#repo_create(owner, _name) ⇒ Object Also known as: repo_enable



18
19
20
# File 'lib/drone-ci/api/repos.rb', line 18

def repo_create(owner, _name)
  api.post("repos/#{owner}/#{repo}")
end

#repo_delete(owner, repo) ⇒ Object Also known as: repo_disable



11
12
13
# File 'lib/drone-ci/api/repos.rb', line 11

def repo_delete(owner, repo)
  api.delete("repos/#{owner}/#{repo}")
end

#repo_info(owner, repo) ⇒ Object



25
26
27
# File 'lib/drone-ci/api/repos.rb', line 25

def repo_info(owner, repo)
  api.get("repos/#{owner}/#{repo}")
end

#repo_list(_owner) ⇒ Object

docs.drone.io/api/repos/repo_list/ the docs are wrong, they say this is at api/user/repos, but the source code says… github.com/harness/drone/blob/2d45d90cdd5cf2ec0e8dbcce2ea6bc340ce1e67e/handler/api/api.go#L173-L182



32
33
34
# File 'lib/drone-ci/api/repos.rb', line 32

def repo_list(_owner)
  api.get('repos')
end

#repo_repair(owner, repo) ⇒ Object



37
38
39
# File 'lib/drone-ci/api/repos.rb', line 37

def repo_repair(owner, repo)
  api.post("repos/#{owner}/#{repo}/repair")
end

#repo_update(owner, repo, **body) ⇒ Object



42
43
44
# File 'lib/drone-ci/api/repos.rb', line 42

def repo_update(owner, repo, **body)
  api.patch("repos/#{owner}/#{repo}", body)
end