send user id with cron build payload
This commit is contained in:
parent
77ec852be6
commit
ca5820e2e3
|
@ -21,9 +21,12 @@ module Travis::API::V3
|
||||||
def start(branch)
|
def start(branch)
|
||||||
raise ServerError, 'repository does not have a github_id'.freeze unless branch.repository.github_id
|
raise ServerError, 'repository does not have a github_id'.freeze unless branch.repository.github_id
|
||||||
|
|
||||||
|
user_id = branch.repository.users.detect { |u| u.github_oauth_token }.id
|
||||||
|
|
||||||
payload = {
|
payload = {
|
||||||
repository: { id: branch.repository.github_id, owner_name: branch.repository.owner_name, name: branch.repository.name },
|
repository: { id: branch.repository.github_id, owner_name: branch.repository.owner_name, name: branch.repository.name },
|
||||||
branch: branch.name
|
branch: branch.name,
|
||||||
|
user: { id: user_id }
|
||||||
}
|
}
|
||||||
|
|
||||||
class_name, queue = Query.sidekiq_queue(:build_request)
|
class_name, queue = Query.sidekiq_queue(:build_request)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user