Skip to content

Commit 315f995

Browse files
authored
Merge pull request #1200 from code-corps/fix-github-event-view
Fix github event view
2 parents e1051fc + 85a4873 commit 315f995

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

lib/code_corps_web/views/github_event_view.ex

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ defmodule CodeCorpsWeb.GithubEventView do
44
use JaSerializer.PhoenixView
55

66
attributes [
7-
:action, :data, :event_type, :error, :failure_reason, :github_delivery_id,
8-
:inserted_at, :payload, :status, :updated_at
7+
:action, :event_type, :error, :failure_reason, :github_delivery_id,
8+
:inserted_at, :payload, :record_data, :status, :updated_at
99
]
1010

1111
def event_type(github_event, _conn) do
1212
github_event.type
1313
end
14+
15+
def record_data(github_event, _conn) do
16+
github_event.data
17+
end
1418
end

test/lib/code_corps_web/views/github_event_view_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ defmodule CodeCorpsWeb.GithubEventViewTest do
1414
"type" => "github-event",
1515
"attributes" => %{
1616
"action" => github_event.action,
17-
"data" => github_event.data,
1817
"event-type" => github_event.type,
1918
"error" => github_event.error,
2019
"failure-reason" => github_event.failure_reason,
2120
"github-delivery-id" => github_event.github_delivery_id,
2221
"inserted-at" => github_event.inserted_at,
2322
"payload" => github_event.payload,
23+
"record-data" => github_event.data,
2424
"status" => github_event.status,
2525
"updated-at" => github_event.updated_at
2626
}

0 commit comments

Comments
 (0)