Add GitHub reaction timestamps (#1185)

This will allow timeline cred (#862) to do a better job of flowing cred
across reaction edges. (Very old reactions should not be moving a lot of
present-day cred.)

Test plan: Inspected snapshot changes.
This commit is contained in:
Dandelion Mané 2019-06-13 23:43:54 +03:00 committed by GitHub
parent b03f824e7d
commit 31abd380dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 79 additions and 1 deletions

View File

@ -20,6 +20,7 @@ exports[`plugins/github/relationalView Comment has reactions 1`] = `
Array [ Array [
Object { Object {
"content": "THUMBS_UP", "content": "THUMBS_UP",
"timestampMs": 1537294753000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -28,6 +29,7 @@ Array [
}, },
Object { Object {
"content": "THUMBS_DOWN", "content": "THUMBS_DOWN",
"timestampMs": 1537294755000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -36,6 +38,7 @@ Array [
}, },
Object { Object {
"content": "THUMBS_UP", "content": "THUMBS_UP",
"timestampMs": 1537294756000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -44,6 +47,7 @@ Array [
}, },
Object { Object {
"content": "LAUGH", "content": "LAUGH",
"timestampMs": 1537294757000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -52,6 +56,7 @@ Array [
}, },
Object { Object {
"content": "THUMBS_DOWN", "content": "THUMBS_DOWN",
"timestampMs": 1537294757000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -60,6 +65,7 @@ Array [
}, },
Object { Object {
"content": "HOORAY", "content": "HOORAY",
"timestampMs": 1537294758000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -68,6 +74,7 @@ Array [
}, },
Object { Object {
"content": "LAUGH", "content": "LAUGH",
"timestampMs": 1537294759000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -76,6 +83,7 @@ Array [
}, },
Object { Object {
"content": "CONFUSED", "content": "CONFUSED",
"timestampMs": 1537294760000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -84,6 +92,7 @@ Array [
}, },
Object { Object {
"content": "HOORAY", "content": "HOORAY",
"timestampMs": 1537294761000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -92,6 +101,7 @@ Array [
}, },
Object { Object {
"content": "HEART", "content": "HEART",
"timestampMs": 1537294762000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -100,6 +110,7 @@ Array [
}, },
Object { Object {
"content": "CONFUSED", "content": "CONFUSED",
"timestampMs": 1537294762000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -108,6 +119,7 @@ Array [
}, },
Object { Object {
"content": "HEART", "content": "HEART",
"timestampMs": 1537294764000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -409,6 +421,7 @@ Object {
"https://github.com/sourcecred/example-github/issues/1": Array [ "https://github.com/sourcecred/example-github/issues/1": Array [
Object { Object {
"content": "LAUGH", "content": "LAUGH",
"timestampMs": 1536878099000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -417,6 +430,7 @@ Object {
}, },
Object { Object {
"content": "HEART", "content": "HEART",
"timestampMs": 1536878100000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -427,6 +441,7 @@ Object {
"https://github.com/sourcecred/example-github/issues/11#issuecomment-420813206": Array [ "https://github.com/sourcecred/example-github/issues/11#issuecomment-420813206": Array [
Object { Object {
"content": "THUMBS_UP", "content": "THUMBS_UP",
"timestampMs": 1536952413000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -435,6 +450,7 @@ Object {
}, },
Object { Object {
"content": "THUMBS_DOWN", "content": "THUMBS_DOWN",
"timestampMs": 1536952415000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -443,6 +459,7 @@ Object {
}, },
Object { Object {
"content": "LAUGH", "content": "LAUGH",
"timestampMs": 1536952417000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -451,6 +468,7 @@ Object {
}, },
Object { Object {
"content": "HOORAY", "content": "HOORAY",
"timestampMs": 1536952420000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -461,6 +479,7 @@ Object {
"https://github.com/sourcecred/example-github/issues/12": Array [ "https://github.com/sourcecred/example-github/issues/12": Array [
Object { Object {
"content": "THUMBS_UP", "content": "THUMBS_UP",
"timestampMs": 1536878091000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -471,6 +490,7 @@ Object {
"https://github.com/sourcecred/example-github/issues/13": Array [ "https://github.com/sourcecred/example-github/issues/13": Array [
Object { Object {
"content": "THUMBS_UP", "content": "THUMBS_UP",
"timestampMs": 1536878140000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -479,6 +499,7 @@ Object {
}, },
Object { Object {
"content": "THUMBS_DOWN", "content": "THUMBS_DOWN",
"timestampMs": 1536878142000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -487,6 +508,7 @@ Object {
}, },
Object { Object {
"content": "LAUGH", "content": "LAUGH",
"timestampMs": 1536878143000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -495,6 +517,7 @@ Object {
}, },
Object { Object {
"content": "HOORAY", "content": "HOORAY",
"timestampMs": 1536878144000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -503,6 +526,7 @@ Object {
}, },
Object { Object {
"content": "CONFUSED", "content": "CONFUSED",
"timestampMs": 1536878147000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -511,6 +535,7 @@ Object {
}, },
Object { Object {
"content": "HEART", "content": "HEART",
"timestampMs": 1536878149000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -519,6 +544,7 @@ Object {
}, },
Object { Object {
"content": "ROCKET", "content": "ROCKET",
"timestampMs": 1548353975000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -527,6 +553,7 @@ Object {
}, },
Object { Object {
"content": "EYES", "content": "EYES",
"timestampMs": 1548353977000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -537,6 +564,7 @@ Object {
"https://github.com/sourcecred/example-github/pull/5#discussion_r171460198": Array [ "https://github.com/sourcecred/example-github/pull/5#discussion_r171460198": Array [
Object { Object {
"content": "THUMBS_UP", "content": "THUMBS_UP",
"timestampMs": 1537294753000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -545,6 +573,7 @@ Object {
}, },
Object { Object {
"content": "THUMBS_DOWN", "content": "THUMBS_DOWN",
"timestampMs": 1537294755000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -553,6 +582,7 @@ Object {
}, },
Object { Object {
"content": "THUMBS_UP", "content": "THUMBS_UP",
"timestampMs": 1537294756000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -561,6 +591,7 @@ Object {
}, },
Object { Object {
"content": "LAUGH", "content": "LAUGH",
"timestampMs": 1537294757000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -569,6 +600,7 @@ Object {
}, },
Object { Object {
"content": "THUMBS_DOWN", "content": "THUMBS_DOWN",
"timestampMs": 1537294757000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -577,6 +609,7 @@ Object {
}, },
Object { Object {
"content": "HOORAY", "content": "HOORAY",
"timestampMs": 1537294758000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -585,6 +618,7 @@ Object {
}, },
Object { Object {
"content": "LAUGH", "content": "LAUGH",
"timestampMs": 1537294759000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -593,6 +627,7 @@ Object {
}, },
Object { Object {
"content": "CONFUSED", "content": "CONFUSED",
"timestampMs": 1537294760000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -601,6 +636,7 @@ Object {
}, },
Object { Object {
"content": "HOORAY", "content": "HOORAY",
"timestampMs": 1537294761000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -609,6 +645,7 @@ Object {
}, },
Object { Object {
"content": "HEART", "content": "HEART",
"timestampMs": 1537294762000,
"user": Object { "user": Object {
"login": "wchargin", "login": "wchargin",
"subtype": "USER", "subtype": "USER",
@ -617,6 +654,7 @@ Object {
}, },
Object { Object {
"content": "CONFUSED", "content": "CONFUSED",
"timestampMs": 1537294762000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -625,6 +663,7 @@ Object {
}, },
Object { Object {
"content": "HEART", "content": "HEART",
"timestampMs": 1537294764000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -635,6 +674,7 @@ Object {
"https://github.com/sourcecred/example-github/pull/5#issuecomment-396430464": Array [ "https://github.com/sourcecred/example-github/pull/5#issuecomment-396430464": Array [
Object { Object {
"content": "HEART", "content": "HEART",
"timestampMs": 1536952482000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -643,6 +683,7 @@ Object {
}, },
Object { Object {
"content": "CONFUSED", "content": "CONFUSED",
"timestampMs": 1536952484000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -653,6 +694,7 @@ Object {
"https://github.com/sourcecred/example-github/pull/9": Array [ "https://github.com/sourcecred/example-github/pull/9": Array [
Object { Object {
"content": "HEART", "content": "HEART",
"timestampMs": 1536952427000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",
@ -661,6 +703,7 @@ Object {
}, },
Object { Object {
"content": "THUMBS_UP", "content": "THUMBS_UP",
"timestampMs": 1536952428000,
"user": Object { "user": Object {
"login": "decentralion", "login": "decentralion",
"subtype": "USER", "subtype": "USER",

View File

@ -153,6 +153,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "LAUGH", "content": "LAUGH",
"createdAt": "2018-09-13T22:34:59Z",
"id": "MDg6UmVhY3Rpb24yOTQwMjEwNw==", "id": "MDg6UmVhY3Rpb24yOTQwMjEwNw==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -164,6 +165,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "HEART", "content": "HEART",
"createdAt": "2018-09-13T22:35:00Z",
"id": "MDg6UmVhY3Rpb24yOTQwMjEwOQ==", "id": "MDg6UmVhY3Rpb24yOTQwMjEwOQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -515,6 +517,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "THUMBS_UP", "content": "THUMBS_UP",
"createdAt": "2018-09-14T19:13:33Z",
"id": "MDg6UmVhY3Rpb24yOTQ1MDk5Nw==", "id": "MDg6UmVhY3Rpb24yOTQ1MDk5Nw==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -526,6 +529,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "THUMBS_DOWN", "content": "THUMBS_DOWN",
"createdAt": "2018-09-14T19:13:35Z",
"id": "MDg6UmVhY3Rpb24yOTQ1MTAwMQ==", "id": "MDg6UmVhY3Rpb24yOTQ1MTAwMQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -537,6 +541,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "LAUGH", "content": "LAUGH",
"createdAt": "2018-09-14T19:13:37Z",
"id": "MDg6UmVhY3Rpb24yOTQ1MTAwMw==", "id": "MDg6UmVhY3Rpb24yOTQ1MTAwMw==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -548,6 +553,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "HOORAY", "content": "HOORAY",
"createdAt": "2018-09-14T19:13:40Z",
"id": "MDg6UmVhY3Rpb24yOTQ1MTAwOA==", "id": "MDg6UmVhY3Rpb24yOTQ1MTAwOA==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -601,6 +607,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "THUMBS_UP", "content": "THUMBS_UP",
"createdAt": "2018-09-13T22:34:51Z",
"id": "MDg6UmVhY3Rpb24yOTQwMjEwMw==", "id": "MDg6UmVhY3Rpb24yOTQwMjEwMw==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -631,6 +638,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "THUMBS_UP", "content": "THUMBS_UP",
"createdAt": "2018-09-13T22:35:40Z",
"id": "MDg6UmVhY3Rpb24yOTQwMjEzNA==", "id": "MDg6UmVhY3Rpb24yOTQwMjEzNA==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -642,6 +650,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "THUMBS_DOWN", "content": "THUMBS_DOWN",
"createdAt": "2018-09-13T22:35:42Z",
"id": "MDg6UmVhY3Rpb24yOTQwMjEzOQ==", "id": "MDg6UmVhY3Rpb24yOTQwMjEzOQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -653,6 +662,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "LAUGH", "content": "LAUGH",
"createdAt": "2018-09-13T22:35:43Z",
"id": "MDg6UmVhY3Rpb24yOTQwMjE0MA==", "id": "MDg6UmVhY3Rpb24yOTQwMjE0MA==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -664,6 +674,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "HOORAY", "content": "HOORAY",
"createdAt": "2018-09-13T22:35:44Z",
"id": "MDg6UmVhY3Rpb24yOTQwMjE0MQ==", "id": "MDg6UmVhY3Rpb24yOTQwMjE0MQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -675,6 +686,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "CONFUSED", "content": "CONFUSED",
"createdAt": "2018-09-13T22:35:47Z",
"id": "MDg6UmVhY3Rpb24yOTQwMjE0NQ==", "id": "MDg6UmVhY3Rpb24yOTQwMjE0NQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -686,6 +698,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "HEART", "content": "HEART",
"createdAt": "2018-09-13T22:35:49Z",
"id": "MDg6UmVhY3Rpb24yOTQwMjE0OA==", "id": "MDg6UmVhY3Rpb24yOTQwMjE0OA==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -697,6 +710,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "ROCKET", "content": "ROCKET",
"createdAt": "2019-01-24T18:19:35Z",
"id": "MDg6UmVhY3Rpb24zNTc5ODQzNQ==", "id": "MDg6UmVhY3Rpb24zNTc5ODQzNQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -708,6 +722,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "EYES", "content": "EYES",
"createdAt": "2019-01-24T18:19:37Z",
"id": "MDg6UmVhY3Rpb24zNTc5ODQ0Mg==", "id": "MDg6UmVhY3Rpb24zNTc5ODQ0Mg==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -869,6 +884,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "HEART", "content": "HEART",
"createdAt": "2018-09-14T19:14:42Z",
"id": "MDg6UmVhY3Rpb24yOTQ1MTA1Mw==", "id": "MDg6UmVhY3Rpb24yOTQ1MTA1Mw==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -880,6 +896,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "CONFUSED", "content": "CONFUSED",
"createdAt": "2018-09-14T19:14:44Z",
"id": "MDg6UmVhY3Rpb24yOTQ1MTA1NQ==", "id": "MDg6UmVhY3Rpb24yOTQ1MTA1NQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1019,6 +1036,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "THUMBS_UP", "content": "THUMBS_UP",
"createdAt": "2018-09-18T18:19:13Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI1MQ==", "id": "MDg6UmVhY3Rpb24yOTU5NTI1MQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1030,6 +1048,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "THUMBS_DOWN", "content": "THUMBS_DOWN",
"createdAt": "2018-09-18T18:19:15Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI1NA==", "id": "MDg6UmVhY3Rpb24yOTU5NTI1NA==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1041,6 +1060,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "THUMBS_UP", "content": "THUMBS_UP",
"createdAt": "2018-09-18T18:19:16Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI1NQ==", "id": "MDg6UmVhY3Rpb24yOTU5NTI1NQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1052,6 +1072,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "LAUGH", "content": "LAUGH",
"createdAt": "2018-09-18T18:19:17Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI1Nw==", "id": "MDg6UmVhY3Rpb24yOTU5NTI1Nw==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1063,6 +1084,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "THUMBS_DOWN", "content": "THUMBS_DOWN",
"createdAt": "2018-09-18T18:19:17Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI1OA==", "id": "MDg6UmVhY3Rpb24yOTU5NTI1OA==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1074,6 +1096,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "HOORAY", "content": "HOORAY",
"createdAt": "2018-09-18T18:19:18Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI1OQ==", "id": "MDg6UmVhY3Rpb24yOTU5NTI1OQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1085,6 +1108,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "LAUGH", "content": "LAUGH",
"createdAt": "2018-09-18T18:19:19Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI2MQ==", "id": "MDg6UmVhY3Rpb24yOTU5NTI2MQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1096,6 +1120,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "CONFUSED", "content": "CONFUSED",
"createdAt": "2018-09-18T18:19:20Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI2NQ==", "id": "MDg6UmVhY3Rpb24yOTU5NTI2NQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1107,6 +1132,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "HOORAY", "content": "HOORAY",
"createdAt": "2018-09-18T18:19:21Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI2Ng==", "id": "MDg6UmVhY3Rpb24yOTU5NTI2Ng==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1118,6 +1144,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "HEART", "content": "HEART",
"createdAt": "2018-09-18T18:19:22Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI2OA==", "id": "MDg6UmVhY3Rpb24yOTU5NTI2OA==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1129,6 +1156,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "CONFUSED", "content": "CONFUSED",
"createdAt": "2018-09-18T18:19:22Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI2OQ==", "id": "MDg6UmVhY3Rpb24yOTU5NTI2OQ==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1140,6 +1168,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "HEART", "content": "HEART",
"createdAt": "2018-09-18T18:19:24Z",
"id": "MDg6UmVhY3Rpb24yOTU5NTI3NA==", "id": "MDg6UmVhY3Rpb24yOTU5NTI3NA==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1198,6 +1227,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "HEART", "content": "HEART",
"createdAt": "2018-09-14T19:13:47Z",
"id": "MDg6UmVhY3Rpb24yOTQ1MTAxMg==", "id": "MDg6UmVhY3Rpb24yOTQ1MTAxMg==",
"user": { "user": {
"__typename": "User", "__typename": "User",
@ -1209,6 +1239,7 @@
{ {
"__typename": "Reaction", "__typename": "Reaction",
"content": "THUMBS_UP", "content": "THUMBS_UP",
"createdAt": "2018-09-14T19:13:48Z",
"id": "MDg6UmVhY3Rpb24yOTQ1MTAxNA==", "id": "MDg6UmVhY3Rpb24yOTQ1MTAxNA==",
"user": { "user": {
"__typename": "User", "__typename": "User",

View File

@ -133,6 +133,7 @@ export const PullRequestReviewState$Values: {|
export type Reaction = {| export type Reaction = {|
+__typename: "Reaction", +__typename: "Reaction",
+content: ReactionContent, +content: ReactionContent,
+createdAt: DateTime,
+id: string, +id: string,
+user: null | User, +user: null | User,
|}; |};

View File

@ -492,7 +492,8 @@ export class RelationalView {
`Invariant violation: Reaction with id ${json.id} did not have 1 author` `Invariant violation: Reaction with id ${json.id} did not have 1 author`
); );
} }
return {content: json.content, user: authorAddresses[0]}; const timestampMs = +new Date(json.createdAt);
return {content: json.content, user: authorAddresses[0], timestampMs};
} }
_addNullableAuthor(json: null | T.Actor): UserlikeAddress[] { _addNullableAuthor(json: null | T.Actor): UserlikeAddress[] {
@ -692,6 +693,7 @@ export class RelationalView {
type ReactionRecord = {| type ReactionRecord = {|
+content: T.ReactionContent, +content: T.ReactionContent,
+user: UserlikeAddress, +user: UserlikeAddress,
+timestampMs: number,
|}; |};
type Entry = type Entry =

View File

@ -93,6 +93,7 @@ export default function schema(): Schema.Schema {
id: s.id(), id: s.id(),
content: s.primitive(s.nonNull("ReactionContent")), content: s.primitive(s.nonNull("ReactionContent")),
user: s.node("User"), user: s.node("User"),
createdAt: s.primitive(s.nonNull("DateTime")),
}), }),
Ref: s.object({ Ref: s.object({
id: s.id(), id: s.id(),