Skip to content

Commit 6cfbb21

Browse files
committed
Fix
1 parent 15028cb commit 6cfbb21

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/travis/api/v3/models/executions.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module Travis::API::V3
22
class Models::Execution
33
attr_reader :id, :os, :instance_size, :arch, :virtualization_type, :queue, :job_id, :repository_id, :owner_id,
44
:owner_type, :plan_id, :sender_id, :credits_consumed, :started_at, :finished_at, :created_at,
5-
:updated_at
5+
:updated_at, :sender_login, :repo_slug, :repo_owner_name
66

77
def initialize(attributes = {})
88
@id = attributes.fetch('id')
@@ -22,6 +22,9 @@ def initialize(attributes = {})
2222
@finished_at = attributes.fetch('finished_at')
2323
@created_at = attributes.fetch('created_at')
2424
@updated_at = attributes.fetch('updated_at')
25+
@sender_login = nil
26+
@repo_slug = nil
27+
@repo_owner_name = nil
2528
end
2629
end
2730
end

lib/travis/api/v3/services/executions/for_owner.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def presented_results(results)
2222
repositories = Travis::API::V3::Models::Repository.where(id: results.map(&:repository_id)).index_by(&:id)
2323

2424
results.map do |execution|
25-
execution[:sender_login] = senders[execution[:sender_id]]&.login || 'Unknown Sender'
26-
repo = repositories[execution[:repository_id]]
27-
execution[:repo_slug] = repo&.slug || 'Unknown Repository'
28-
execution[:repo_owner_name] = repo&.owner_name || 'Unknown Repository Owner'
25+
execution.sender_login = senders[execution.sender_id]&.login || 'Unknown Sender'
26+
repo = repositories[execution.repository_id]
27+
execution.repo_slug = repo&.slug || 'Unknown Repository'
28+
execution.repo_owner_name = repo&.owner_name || 'Unknown Repository Owner'
2929

3030
execution
3131
end

0 commit comments

Comments
 (0)