ADD sync ci user repos api

This commit is contained in:
Jasder 2020-09-08 15:29:38 +08:00
parent 3290609bbc
commit 5dfc6504a0
1 changed files with 8 additions and 0 deletions

View File

@ -70,4 +70,12 @@ class Ci::Drone::API < Ci::Drone::Request
def logs
get(endpoint, "/api/repos/#{owner}/#{repo}/builds/#{options[:build]}/logs/#{options[:stage]}/#{options[:step]}", drone_token: drone_token)
end
# Synchronize the currently authenticated users repository list.
# POST /api/user/repos
# eq:
# Ci::Drone::API.new(drone_token, cloud_account.drone_url, @repo.user.login, @repo.identifier, number: number).sync
def sync_repos
post(endpoint, "/api/users/repos", drone_token: drone_token)
end
end