mirror of
https://github.com/status-im/sourcecred.git
synced 2025-01-14 06:35:18 +00:00
Add createdAt timestamp tracking to GitHub (#1152)
Updates github schema to include createdAt timestamps, and then updates the RelationalView to provide those timestamps as MsSinceEpoch. I added createdAt timestamps to Repos, Issues, Pulls, Reviews, and Comments, as these correspond to GitHub graph nodes where I think time-based filtering is relevant. I didn't add them to Users, Reactions, or Commits. Reactions, because they correspond to edges not nodes. (We could consider doing the time filtering on edges too, but I'd rather keep it simple for now.) Commits, because they're owned by a different plugin. Users, because... in a certain sense the user identity is timeless, the time factoring is mostly so we can evaluate how users' cred varies over time. Anyway, it will be easy to add more fields later if we need them. Test plan: - Inspect snapshot changes - Ran `yarn test --full` - Its only failure is pre-existing, per #1151 Thanks to @s-ben for some motivation and discussion about this change.
This commit is contained in:
parent
a831e05e5f
commit
d51c0b6715
Binary file not shown.
@ -10,6 +10,8 @@ Array [
|
|||||||
|
|
||||||
exports[`plugins/github/relationalView Comment has body 1`] = `"seems a bit capricious"`;
|
exports[`plugins/github/relationalView Comment has body 1`] = `"seems a bit capricious"`;
|
||||||
|
|
||||||
|
exports[`plugins/github/relationalView Comment has createdAt 1`] = `1519878210000`;
|
||||||
|
|
||||||
exports[`plugins/github/relationalView Comment has parent 1`] = `
|
exports[`plugins/github/relationalView Comment has parent 1`] = `
|
||||||
Object {
|
Object {
|
||||||
"url": "https://github.com/sourcecred/example-github/pull/5#pullrequestreview-100313899",
|
"url": "https://github.com/sourcecred/example-github/pull/5#pullrequestreview-100313899",
|
||||||
@ -160,6 +162,8 @@ Array [
|
|||||||
|
|
||||||
exports[`plugins/github/relationalView Issue has body 1`] = `"This issue references another issue, namely #1"`;
|
exports[`plugins/github/relationalView Issue has body 1`] = `"This issue references another issue, namely #1"`;
|
||||||
|
|
||||||
|
exports[`plugins/github/relationalView Issue has createdAt 1`] = `1519807129000`;
|
||||||
|
|
||||||
exports[`plugins/github/relationalView Issue has number 1`] = `"2"`;
|
exports[`plugins/github/relationalView Issue has number 1`] = `"2"`;
|
||||||
|
|
||||||
exports[`plugins/github/relationalView Issue has parent 1`] = `
|
exports[`plugins/github/relationalView Issue has parent 1`] = `
|
||||||
@ -200,6 +204,8 @@ exports[`plugins/github/relationalView Pull has body 1`] = `
|
|||||||
- then approve the pr"
|
- then approve the pr"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`plugins/github/relationalView Pull has createdAt 1`] = `1519807636000`;
|
||||||
|
|
||||||
exports[`plugins/github/relationalView Pull has deletions 1`] = `0`;
|
exports[`plugins/github/relationalView Pull has deletions 1`] = `0`;
|
||||||
|
|
||||||
exports[`plugins/github/relationalView Pull has mergedAs 1`] = `
|
exports[`plugins/github/relationalView Pull has mergedAs 1`] = `
|
||||||
@ -325,6 +331,8 @@ Array [
|
|||||||
]
|
]
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`plugins/github/relationalView Repo has createdAt 1`] = `1519807034000`;
|
||||||
|
|
||||||
exports[`plugins/github/relationalView Repo has name 1`] = `"example-github"`;
|
exports[`plugins/github/relationalView Repo has name 1`] = `"example-github"`;
|
||||||
|
|
||||||
exports[`plugins/github/relationalView Repo has owner 1`] = `"sourcecred"`;
|
exports[`plugins/github/relationalView Repo has owner 1`] = `"sourcecred"`;
|
||||||
@ -376,6 +384,8 @@ Array [
|
|||||||
|
|
||||||
exports[`plugins/github/relationalView Review has body 1`] = `"hmmm.jpg"`;
|
exports[`plugins/github/relationalView Review has body 1`] = `"hmmm.jpg"`;
|
||||||
|
|
||||||
|
exports[`plugins/github/relationalView Review has createdAt 1`] = `1519878210000`;
|
||||||
|
|
||||||
exports[`plugins/github/relationalView Review has parent 1`] = `
|
exports[`plugins/github/relationalView Review has parent 1`] = `
|
||||||
Object {
|
Object {
|
||||||
"url": "https://github.com/sourcecred/example-github/pull/5",
|
"url": "https://github.com/sourcecred/example-github/pull/5",
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"__typename": "Repository",
|
"__typename": "Repository",
|
||||||
|
"createdAt": "2018-02-28T08:37:14Z",
|
||||||
"defaultBranchRef": {
|
"defaultBranchRef": {
|
||||||
"__typename": "Ref",
|
"__typename": "Ref",
|
||||||
"id": "MDM6UmVmMTIzMjU1MDA2Om1hc3Rlcg==",
|
"id": "MDM6UmVmMTIzMjU1MDA2Om1hc3Rlcg==",
|
||||||
@ -138,6 +139,7 @@
|
|||||||
"body": "This is just an example issue.",
|
"body": "This is just an example issue.",
|
||||||
"comments": [
|
"comments": [
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-02-28T08:38:08Z",
|
||||||
"id": "MDU6SXNzdWUzMDA5MzQ4MTg=",
|
"id": "MDU6SXNzdWUzMDA5MzQ4MTg=",
|
||||||
"number": 1,
|
"number": 1,
|
||||||
"reactions": [
|
"reactions": [
|
||||||
@ -186,6 +188,7 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "It should also be possible to reference by exact url: https://github.com/sourcecred/example-github/issues/6",
|
"body": "It should also be possible to reference by exact url: https://github.com/sourcecred/example-github/issues/6",
|
||||||
|
"createdAt": "2018-03-16T16:28:13Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM3Mzc2ODcwMw==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM3Mzc2ODcwMw==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -200,6 +203,7 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "We might also reference individual comments directly.\r\nhttps://github.com/sourcecred/example-github/issues/6#issuecomment-373768538",
|
"body": "We might also reference individual comments directly.\r\nhttps://github.com/sourcecred/example-github/issues/6#issuecomment-373768538",
|
||||||
|
"createdAt": "2018-03-16T16:28:45Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM3Mzc2ODg1MA==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM3Mzc2ODg1MA==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -214,6 +218,7 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "Here's a PR by direct url: https://github.com/sourcecred/example-github/pull/5",
|
"body": "Here's a PR by direct url: https://github.com/sourcecred/example-github/pull/5",
|
||||||
|
"createdAt": "2018-05-01T01:25:09Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjE4NQ==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjE4NQ==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -228,6 +233,7 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "a PR review by url: https://github.com/sourcecred/example-github/pull/5#pullrequestreview-100313899",
|
"body": "a PR review by url: https://github.com/sourcecred/example-github/pull/5#pullrequestreview-100313899",
|
||||||
|
"createdAt": "2018-05-01T01:25:25Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjIyMA==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjIyMA==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -242,6 +248,7 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "a PR Review Comment by url: https://github.com/sourcecred/example-github/pull/5#discussion_r171460198",
|
"body": "a PR Review Comment by url: https://github.com/sourcecred/example-github/pull/5#discussion_r171460198",
|
||||||
|
"createdAt": "2018-05-01T01:25:39Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjI0OA==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjI0OA==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -256,6 +263,7 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "a user by url: https://github.com/wchargin",
|
"body": "a user by url: https://github.com/wchargin",
|
||||||
|
"createdAt": "2018-05-01T01:25:51Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjI3Mw==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjI3Mw==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -270,6 +278,7 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "Here are several references:\r\n#1 \r\n#2\r\n#3 \r\n\r\nhttps://github.com/sourcecred/example-github/pull/5#discussion_r171460198\r\nhttps://github.com/sourcecred/example-github/pull/5#pullrequestreview-100313899\r\n",
|
"body": "Here are several references:\r\n#1 \r\n#2\r\n#3 \r\n\r\nhttps://github.com/sourcecred/example-github/pull/5#discussion_r171460198\r\nhttps://github.com/sourcecred/example-github/pull/5#pullrequestreview-100313899\r\n",
|
||||||
|
"createdAt": "2018-05-01T01:30:31Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjkyMA==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjkyMA==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -284,12 +293,14 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "This comment has no references.",
|
"body": "This comment has no references.",
|
||||||
|
"createdAt": "2018-05-01T01:30:38Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjkzNg==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM4NTU3NjkzNg==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
"url": "https://github.com/sourcecred/example-github/issues/2#issuecomment-385576936"
|
"url": "https://github.com/sourcecred/example-github/issues/2#issuecomment-385576936"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-02-28T08:38:49Z",
|
||||||
"id": "MDU6SXNzdWUzMDA5MzQ5ODA=",
|
"id": "MDU6SXNzdWUzMDA5MzQ5ODA=",
|
||||||
"number": 2,
|
"number": 2,
|
||||||
"reactions": [
|
"reactions": [
|
||||||
@ -308,6 +319,7 @@
|
|||||||
"body": "Alas, its life as an open issue had only just begun.",
|
"body": "Alas, its life as an open issue had only just begun.",
|
||||||
"comments": [
|
"comments": [
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-02-28T08:44:14Z",
|
||||||
"id": "MDU6SXNzdWUzMDA5MzYzNzQ=",
|
"id": "MDU6SXNzdWUzMDA5MzYzNzQ=",
|
||||||
"number": 4,
|
"number": 4,
|
||||||
"reactions": [
|
"reactions": [
|
||||||
@ -334,6 +346,7 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "A wild COMMENT appeared!",
|
"body": "A wild COMMENT appeared!",
|
||||||
|
"createdAt": "2018-03-16T16:27:22Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM3Mzc2ODQ0Mg==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM3Mzc2ODQ0Mg==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -348,6 +361,7 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "And the maintainer said, \"Let there be comments!\"",
|
"body": "And the maintainer said, \"Let there be comments!\"",
|
||||||
|
"createdAt": "2018-03-16T16:27:41Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM3Mzc2ODUzOA==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM3Mzc2ODUzOA==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -362,6 +376,7 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "This comment references an #2, which itself references an issue. This comment is thus allows us to test that in-references are not included when requesting a Post's references.",
|
"body": "This comment references an #2, which itself references an issue. This comment is thus allows us to test that in-references are not included when requesting a Post's references.",
|
||||||
|
"createdAt": "2018-04-29T03:41:47Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM4NTIyMzMxNg==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM4NTIyMzMxNg==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -376,12 +391,14 @@
|
|||||||
"url": "https://github.com/credbot"
|
"url": "https://github.com/credbot"
|
||||||
},
|
},
|
||||||
"body": "Hi! I'm a bot! Beep boop beep!!",
|
"body": "Hi! I'm a bot! Beep boop beep!!",
|
||||||
|
"createdAt": "2018-08-29T20:59:50Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDQxNzEwNDA0Nw==",
|
"id": "MDEyOklzc3VlQ29tbWVudDQxNzEwNDA0Nw==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
"url": "https://github.com/sourcecred/example-github/issues/6#issuecomment-417104047"
|
"url": "https://github.com/sourcecred/example-github/issues/6#issuecomment-417104047"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-03-16T16:27:04Z",
|
||||||
"id": "MDU6SXNzdWUzMDU5OTM3NzM=",
|
"id": "MDU6SXNzdWUzMDU5OTM3NzM=",
|
||||||
"number": 6,
|
"number": 6,
|
||||||
"reactions": [
|
"reactions": [
|
||||||
@ -400,6 +417,7 @@
|
|||||||
"body": "Deal with this, naive string display algorithms!!!!!",
|
"body": "Deal with this, naive string display algorithms!!!!!",
|
||||||
"comments": [
|
"comments": [
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-03-20T18:19:09Z",
|
||||||
"id": "MDU6SXNzdWUzMDY5ODM1NTI=",
|
"id": "MDU6SXNzdWUzMDY5ODM1NTI=",
|
||||||
"number": 7,
|
"number": 7,
|
||||||
"reactions": [
|
"reactions": [
|
||||||
@ -418,6 +436,7 @@
|
|||||||
"body": "Issue with Unicode: ȴሲ𣐳楢👍 :heart: 𐤔𐤁𐤀𐤑𐤍𐤉𐤔𐤌𐤄𐤍𐤍 ❤️\r\nIssue with Unicode: ȴሲ𣐳楢👍 :heart: 𐤔𐤁𐤀𐤑𐤍𐤉𐤔𐤌𐤄𐤍𐤍 ❤️",
|
"body": "Issue with Unicode: ȴሲ𣐳楢👍 :heart: 𐤔𐤁𐤀𐤑𐤍𐤉𐤔𐤌𐤄𐤍𐤍 ❤️\r\nIssue with Unicode: ȴሲ𣐳楢👍 :heart: 𐤔𐤁𐤀𐤑𐤍𐤉𐤔𐤌𐤄𐤍𐤍 ❤️",
|
||||||
"comments": [
|
"comments": [
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-03-20T18:24:03Z",
|
||||||
"id": "MDU6SXNzdWUzMDY5ODUzNjc=",
|
"id": "MDU6SXNzdWUzMDY5ODUzNjc=",
|
||||||
"number": 8,
|
"number": 8,
|
||||||
"reactions": [
|
"reactions": [
|
||||||
@ -436,6 +455,7 @@
|
|||||||
"body": "This issue was paired with @wchargin \r\n\r\nIt also attempts to reference itself: #10\r\n\r\nIt also references something twice: #2 #2 ",
|
"body": "This issue was paired with @wchargin \r\n\r\nIt also attempts to reference itself: #10\r\n\r\nIt also references something twice: #2 #2 ",
|
||||||
"comments": [
|
"comments": [
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-06-29T18:30:21Z",
|
||||||
"id": "MDU6SXNzdWUzMzcwOTU0NzM=",
|
"id": "MDU6SXNzdWUzMzcwOTU0NzM=",
|
||||||
"number": 10,
|
"number": 10,
|
||||||
"reactions": [
|
"reactions": [
|
||||||
@ -457,6 +477,7 @@
|
|||||||
"__typename": "IssueComment",
|
"__typename": "IssueComment",
|
||||||
"author": null,
|
"author": null,
|
||||||
"body": "Hello. :ghost: ",
|
"body": "Hello. :ghost: ",
|
||||||
|
"createdAt": "2018-09-12T21:59:05Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDQyMDgxMTg3Mg==",
|
"id": "MDEyOklzc3VlQ29tbWVudDQyMDgxMTg3Mg==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -471,6 +492,7 @@
|
|||||||
"url": "https://github.com/wchargin"
|
"url": "https://github.com/wchargin"
|
||||||
},
|
},
|
||||||
"body": "[Here is a screenshot of the thread at this point, prior to account deletion.](https://user-images.githubusercontent.com/4317806/45455614-8c4fe600-b69c-11e8-902e-aec65d7403e6.png)\r\n\r\nThe user has GraphQL ID `MDQ6VXNlcjQzMjIyMTkw` and database ID `43222190`.\r\n\r\nThe previous comment has GraphQL ID `MDEyOklzc3VlQ29tbWVudDQyMDgxMTg3Mg==` and database `420811872`.\r\n",
|
"body": "[Here is a screenshot of the thread at this point, prior to account deletion.](https://user-images.githubusercontent.com/4317806/45455614-8c4fe600-b69c-11e8-902e-aec65d7403e6.png)\r\n\r\nThe user has GraphQL ID `MDQ6VXNlcjQzMjIyMTkw` and database ID `43222190`.\r\n\r\nThe previous comment has GraphQL ID `MDEyOklzc3VlQ29tbWVudDQyMDgxMTg3Mg==` and database `420811872`.\r\n",
|
||||||
|
"createdAt": "2018-09-12T22:03:33Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDQyMDgxMzAxMw==",
|
"id": "MDEyOklzc3VlQ29tbWVudDQyMDgxMzAxMw==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
@ -480,6 +502,7 @@
|
|||||||
"__typename": "IssueComment",
|
"__typename": "IssueComment",
|
||||||
"author": null,
|
"author": null,
|
||||||
"body": "My time in this life draws to a close. :wave: ",
|
"body": "My time in this life draws to a close. :wave: ",
|
||||||
|
"createdAt": "2018-09-12T22:04:18Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDQyMDgxMzIwNg==",
|
"id": "MDEyOklzc3VlQ29tbWVudDQyMDgxMzIwNg==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
{
|
{
|
||||||
@ -538,12 +561,14 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": ":skull: :ghost:\r\nRIP",
|
"body": ":skull: :ghost:\r\nRIP",
|
||||||
|
"createdAt": "2018-09-12T22:06:05Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDQyMDgxMzYyMQ==",
|
"id": "MDEyOklzc3VlQ29tbWVudDQyMDgxMzYyMQ==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
"url": "https://github.com/sourcecred/example-github/issues/11#issuecomment-420813621"
|
"url": "https://github.com/sourcecred/example-github/issues/11#issuecomment-420813621"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-09-12T21:57:59Z",
|
||||||
"id": "MDU6SXNzdWUzNTk2Njc4Mjk=",
|
"id": "MDU6SXNzdWUzNTk2Njc4Mjk=",
|
||||||
"number": 11,
|
"number": 11,
|
||||||
"reactions": [
|
"reactions": [
|
||||||
@ -562,6 +587,7 @@
|
|||||||
"body": "By url: https://github.com/sourcecred/example-github/commit/ec91adb718a6045b492303f00d8e8beb957dc780\r\n\r\nBy hash: ecc889dc94cf6da17ae6eab5bb7b7155f577519d\r\n\r\nHash from another repo: 3715ddfb8d4c4fd2a6f6af75488c82f84c92ec2f (example-git in this case)",
|
"body": "By url: https://github.com/sourcecred/example-github/commit/ec91adb718a6045b492303f00d8e8beb957dc780\r\n\r\nBy hash: ecc889dc94cf6da17ae6eab5bb7b7155f577519d\r\n\r\nHash from another repo: 3715ddfb8d4c4fd2a6f6af75488c82f84c92ec2f (example-git in this case)",
|
||||||
"comments": [
|
"comments": [
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-09-13T22:34:46Z",
|
||||||
"id": "MDU6SXNzdWUzNjAwOTExMDc=",
|
"id": "MDU6SXNzdWUzNjAwOTExMDc=",
|
||||||
"number": 12,
|
"number": 12,
|
||||||
"reactions": [
|
"reactions": [
|
||||||
@ -591,6 +617,7 @@
|
|||||||
"body": "I'm reacting to this with every emoji.",
|
"body": "I'm reacting to this with every emoji.",
|
||||||
"comments": [
|
"comments": [
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-09-13T22:35:37Z",
|
||||||
"id": "MDU6SXNzdWUzNjAwOTEzMTQ=",
|
"id": "MDU6SXNzdWUzNjAwOTEzMTQ=",
|
||||||
"number": 13,
|
"number": 13,
|
||||||
"reactions": [
|
"reactions": [
|
||||||
@ -715,12 +742,14 @@
|
|||||||
"url": "https://github.com/decentralion"
|
"url": "https://github.com/decentralion"
|
||||||
},
|
},
|
||||||
"body": "It seems apropos to reference something from a pull request comment... eg: #2 ",
|
"body": "It seems apropos to reference something from a pull request comment... eg: #2 ",
|
||||||
|
"createdAt": "2018-02-28T08:43:40Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM2OTE2MjIyMg==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM2OTE2MjIyMg==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
],
|
],
|
||||||
"url": "https://github.com/sourcecred/example-github/pull/3#issuecomment-369162222"
|
"url": "https://github.com/sourcecred/example-github/pull/3#issuecomment-369162222"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-02-28T08:43:19Z",
|
||||||
"deletions": 0,
|
"deletions": 0,
|
||||||
"id": "MDExOlB1bGxSZXF1ZXN0MTcxODg3NzQx",
|
"id": "MDExOlB1bGxSZXF1ZXN0MTcxODg3NzQx",
|
||||||
"mergeCommit": {
|
"mergeCommit": {
|
||||||
@ -823,6 +852,7 @@
|
|||||||
"url": "https://github.com/wchargin"
|
"url": "https://github.com/wchargin"
|
||||||
},
|
},
|
||||||
"body": "In retrospect, this was an excellent PR.",
|
"body": "In retrospect, this was an excellent PR.",
|
||||||
|
"createdAt": "2018-06-12T00:46:20Z",
|
||||||
"id": "MDEyOklzc3VlQ29tbWVudDM5NjQzMDQ2NA==",
|
"id": "MDEyOklzc3VlQ29tbWVudDM5NjQzMDQ2NA==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
{
|
{
|
||||||
@ -851,6 +881,7 @@
|
|||||||
"url": "https://github.com/sourcecred/example-github/pull/5#issuecomment-396430464"
|
"url": "https://github.com/sourcecred/example-github/pull/5#issuecomment-396430464"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-02-28T08:47:16Z",
|
||||||
"deletions": 0,
|
"deletions": 0,
|
||||||
"id": "MDExOlB1bGxSZXF1ZXN0MTcxODg4NTIy",
|
"id": "MDExOlB1bGxSZXF1ZXN0MTcxODg4NTIy",
|
||||||
"mergeCommit": {
|
"mergeCommit": {
|
||||||
@ -966,6 +997,7 @@
|
|||||||
"url": "https://github.com/wchargin"
|
"url": "https://github.com/wchargin"
|
||||||
},
|
},
|
||||||
"body": "seems a bit capricious",
|
"body": "seems a bit capricious",
|
||||||
|
"createdAt": "2018-03-01T04:23:30Z",
|
||||||
"id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE3MTQ2MDE5OA==",
|
"id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE3MTQ2MDE5OA==",
|
||||||
"reactions": [
|
"reactions": [
|
||||||
{
|
{
|
||||||
@ -1104,6 +1136,7 @@
|
|||||||
"url": "https://github.com/sourcecred/example-github/pull/5#discussion_r171460198"
|
"url": "https://github.com/sourcecred/example-github/pull/5#discussion_r171460198"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-03-01T04:23:30Z",
|
||||||
"id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MTAwMzEzODk5",
|
"id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MTAwMzEzODk5",
|
||||||
"state": "CHANGES_REQUESTED",
|
"state": "CHANGES_REQUESTED",
|
||||||
"url": "https://github.com/sourcecred/example-github/pull/5#pullrequestreview-100313899"
|
"url": "https://github.com/sourcecred/example-github/pull/5#pullrequestreview-100313899"
|
||||||
@ -1119,6 +1152,7 @@
|
|||||||
"body": "I'm sold",
|
"body": "I'm sold",
|
||||||
"comments": [
|
"comments": [
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-03-01T04:24:56Z",
|
||||||
"id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MTAwMzE0MDM4",
|
"id": "MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MTAwMzE0MDM4",
|
||||||
"state": "APPROVED",
|
"state": "APPROVED",
|
||||||
"url": "https://github.com/sourcecred/example-github/pull/5#pullrequestreview-100314038"
|
"url": "https://github.com/sourcecred/example-github/pull/5#pullrequestreview-100314038"
|
||||||
@ -1139,6 +1173,7 @@
|
|||||||
"body": "Nominally paired with @wchargin",
|
"body": "Nominally paired with @wchargin",
|
||||||
"comments": [
|
"comments": [
|
||||||
],
|
],
|
||||||
|
"createdAt": "2018-05-03T18:53:15Z",
|
||||||
"deletions": 0,
|
"deletions": 0,
|
||||||
"id": "MDExOlB1bGxSZXF1ZXN0MTg1ODA2MTU3",
|
"id": "MDExOlB1bGxSZXF1ZXN0MTg1ODA2MTU3",
|
||||||
"mergeCommit": null,
|
"mergeCommit": null,
|
||||||
|
@ -45,6 +45,7 @@ export type Issue = {|
|
|||||||
+author: null | Actor,
|
+author: null | Actor,
|
||||||
+body: String,
|
+body: String,
|
||||||
+comments: $ReadOnlyArray<null | IssueComment>,
|
+comments: $ReadOnlyArray<null | IssueComment>,
|
||||||
|
+createdAt: DateTime,
|
||||||
+id: string,
|
+id: string,
|
||||||
+number: Int,
|
+number: Int,
|
||||||
+reactions: $ReadOnlyArray<null | Reaction>,
|
+reactions: $ReadOnlyArray<null | Reaction>,
|
||||||
@ -56,6 +57,7 @@ export type IssueComment = {|
|
|||||||
+__typename: "IssueComment",
|
+__typename: "IssueComment",
|
||||||
+author: null | Actor,
|
+author: null | Actor,
|
||||||
+body: String,
|
+body: String,
|
||||||
|
+createdAt: DateTime,
|
||||||
+id: string,
|
+id: string,
|
||||||
+reactions: $ReadOnlyArray<null | Reaction>,
|
+reactions: $ReadOnlyArray<null | Reaction>,
|
||||||
+url: URI,
|
+url: URI,
|
||||||
@ -74,6 +76,7 @@ export type PullRequest = {|
|
|||||||
+author: null | Actor,
|
+author: null | Actor,
|
||||||
+body: String,
|
+body: String,
|
||||||
+comments: $ReadOnlyArray<null | IssueComment>,
|
+comments: $ReadOnlyArray<null | IssueComment>,
|
||||||
|
+createdAt: DateTime,
|
||||||
+deletions: Int,
|
+deletions: Int,
|
||||||
+id: string,
|
+id: string,
|
||||||
+mergeCommit: null | Commit,
|
+mergeCommit: null | Commit,
|
||||||
@ -89,6 +92,7 @@ export type PullRequestReview = {|
|
|||||||
+author: null | Actor,
|
+author: null | Actor,
|
||||||
+body: String,
|
+body: String,
|
||||||
+comments: $ReadOnlyArray<null | PullRequestReviewComment>,
|
+comments: $ReadOnlyArray<null | PullRequestReviewComment>,
|
||||||
|
+createdAt: DateTime,
|
||||||
+id: string,
|
+id: string,
|
||||||
+state: PullRequestReviewState,
|
+state: PullRequestReviewState,
|
||||||
+url: URI,
|
+url: URI,
|
||||||
@ -98,6 +102,7 @@ export type PullRequestReviewComment = {|
|
|||||||
+__typename: "PullRequestReviewComment",
|
+__typename: "PullRequestReviewComment",
|
||||||
+author: null | Actor,
|
+author: null | Actor,
|
||||||
+body: String,
|
+body: String,
|
||||||
|
+createdAt: DateTime,
|
||||||
+id: string,
|
+id: string,
|
||||||
+reactions: $ReadOnlyArray<null | Reaction>,
|
+reactions: $ReadOnlyArray<null | Reaction>,
|
||||||
+url: URI,
|
+url: URI,
|
||||||
@ -169,6 +174,7 @@ export type Ref = {|
|
|||||||
|
|
||||||
export type Repository = {|
|
export type Repository = {|
|
||||||
+__typename: "Repository",
|
+__typename: "Repository",
|
||||||
|
+createdAt: DateTime,
|
||||||
+defaultBranchRef: null | Ref,
|
+defaultBranchRef: null | Ref,
|
||||||
+id: string,
|
+id: string,
|
||||||
+issues: $ReadOnlyArray<null | Issue>,
|
+issues: $ReadOnlyArray<null | Issue>,
|
||||||
|
@ -55,6 +55,7 @@ describe("plugins/github/heuristics/mentionsAuthorReference", () => {
|
|||||||
const repository: Repository = {
|
const repository: Repository = {
|
||||||
__typename: "Repository",
|
__typename: "Repository",
|
||||||
id: "repo:my-repo",
|
id: "repo:my-repo",
|
||||||
|
createdAt: "2019-05-20T22:52:07Z",
|
||||||
issues: [
|
issues: [
|
||||||
{
|
{
|
||||||
__typename: "Issue",
|
__typename: "Issue",
|
||||||
@ -66,6 +67,7 @@ describe("plugins/github/heuristics/mentionsAuthorReference", () => {
|
|||||||
author: authors.steven(),
|
author: authors.steven(),
|
||||||
comments: [],
|
comments: [],
|
||||||
reactions: [],
|
reactions: [],
|
||||||
|
createdAt: "2019-05-20T22:52:07Z",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "Issue",
|
__typename: "Issue",
|
||||||
@ -76,6 +78,7 @@ describe("plugins/github/heuristics/mentionsAuthorReference", () => {
|
|||||||
body: "it is me, @steven\n\nPaired with: @pearl",
|
body: "it is me, @steven\n\nPaired with: @pearl",
|
||||||
author: authors.steven(),
|
author: authors.steven(),
|
||||||
reactions: [],
|
reactions: [],
|
||||||
|
createdAt: "2019-05-20T22:52:07Z",
|
||||||
comments: [
|
comments: [
|
||||||
{
|
{
|
||||||
__typename: "IssueComment",
|
__typename: "IssueComment",
|
||||||
@ -84,6 +87,7 @@ describe("plugins/github/heuristics/mentionsAuthorReference", () => {
|
|||||||
body: "parry parry thrust @pearl\nparry parry thrust @steven",
|
body: "parry parry thrust @pearl\nparry parry thrust @steven",
|
||||||
author: authors.holo(),
|
author: authors.holo(),
|
||||||
reactions: [],
|
reactions: [],
|
||||||
|
createdAt: "2019-05-20T22:52:07Z",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "IssueComment",
|
__typename: "IssueComment",
|
||||||
@ -92,6 +96,7 @@ describe("plugins/github/heuristics/mentionsAuthorReference", () => {
|
|||||||
body: "@holo-pearl: stop!",
|
body: "@holo-pearl: stop!",
|
||||||
author: authors.steven(),
|
author: authors.steven(),
|
||||||
reactions: [],
|
reactions: [],
|
||||||
|
createdAt: "2019-05-20T22:52:07Z",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "IssueComment",
|
__typename: "IssueComment",
|
||||||
@ -100,6 +105,7 @@ describe("plugins/github/heuristics/mentionsAuthorReference", () => {
|
|||||||
body: "@amethyst @garnet why aren't you helping",
|
body: "@amethyst @garnet why aren't you helping",
|
||||||
author: authors.pearl(),
|
author: authors.pearl(),
|
||||||
reactions: [],
|
reactions: [],
|
||||||
|
createdAt: "2019-05-20T22:52:07Z",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "IssueComment",
|
__typename: "IssueComment",
|
||||||
@ -108,6 +114,7 @@ describe("plugins/github/heuristics/mentionsAuthorReference", () => {
|
|||||||
body: "@amethyst! come quickly, @amethyst!",
|
body: "@amethyst! come quickly, @amethyst!",
|
||||||
author: authors.garnet(),
|
author: authors.garnet(),
|
||||||
reactions: [],
|
reactions: [],
|
||||||
|
createdAt: "2019-05-20T22:52:07Z",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__typename: "IssueComment",
|
__typename: "IssueComment",
|
||||||
@ -116,6 +123,7 @@ describe("plugins/github/heuristics/mentionsAuthorReference", () => {
|
|||||||
body: "i am busy fighting @boomerang-blade guy",
|
body: "i am busy fighting @boomerang-blade guy",
|
||||||
author: authors.amethyst(),
|
author: authors.amethyst(),
|
||||||
reactions: [],
|
reactions: [],
|
||||||
|
createdAt: "2019-05-20T22:52:07Z",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@ -135,6 +143,7 @@ describe("plugins/github/heuristics/mentionsAuthorReference", () => {
|
|||||||
comments: [],
|
comments: [],
|
||||||
author: authors.steven(),
|
author: authors.steven(),
|
||||||
reviews: [],
|
reviews: [],
|
||||||
|
createdAt: "2019-05-20T22:52:07Z",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
url: "https://github.com/my-owner/my-repo",
|
url: "https://github.com/my-owner/my-repo",
|
||||||
|
@ -28,6 +28,8 @@ import {
|
|||||||
reviewCommentUrlToId,
|
reviewCommentUrlToId,
|
||||||
} from "./urlIdParse";
|
} from "./urlIdParse";
|
||||||
|
|
||||||
|
export type MsSinceEpoch = number;
|
||||||
|
|
||||||
const COMPAT_INFO = {
|
const COMPAT_INFO = {
|
||||||
type: "sourcecred/github/relationalView",
|
type: "sourcecred/github/relationalView",
|
||||||
version: "0.2.0",
|
version: "0.2.0",
|
||||||
@ -298,6 +300,7 @@ export class RelationalView {
|
|||||||
pulls: expectAllNonNull(json, "pullRequests", json.pullRequests).map(
|
pulls: expectAllNonNull(json, "pullRequests", json.pullRequests).map(
|
||||||
(x) => this._addPull(address, x)
|
(x) => this._addPull(address, x)
|
||||||
),
|
),
|
||||||
|
createdAt: +new Date(json.createdAt),
|
||||||
};
|
};
|
||||||
const raw = N.toRaw(address);
|
const raw = N.toRaw(address);
|
||||||
this._repos.set(raw, entry);
|
this._repos.set(raw, entry);
|
||||||
@ -339,6 +342,7 @@ export class RelationalView {
|
|||||||
reactions: expectAllNonNull(json, "reactions", json.reactions).map((x) =>
|
reactions: expectAllNonNull(json, "reactions", json.reactions).map((x) =>
|
||||||
this._addReaction(x)
|
this._addReaction(x)
|
||||||
),
|
),
|
||||||
|
createdAt: +new Date(json.createdAt),
|
||||||
};
|
};
|
||||||
this._issues.set(N.toRaw(address), entry);
|
this._issues.set(N.toRaw(address), entry);
|
||||||
return address;
|
return address;
|
||||||
@ -421,6 +425,7 @@ export class RelationalView {
|
|||||||
reactions: expectAllNonNull(json, "reactions", json.reactions).map((x) =>
|
reactions: expectAllNonNull(json, "reactions", json.reactions).map((x) =>
|
||||||
this._addReaction(x)
|
this._addReaction(x)
|
||||||
),
|
),
|
||||||
|
createdAt: +new Date(json.createdAt),
|
||||||
};
|
};
|
||||||
this._pulls.set(N.toRaw(address), entry);
|
this._pulls.set(N.toRaw(address), entry);
|
||||||
return address;
|
return address;
|
||||||
@ -441,6 +446,7 @@ export class RelationalView {
|
|||||||
),
|
),
|
||||||
body: json.body,
|
body: json.body,
|
||||||
authors: this._addNullableAuthor(json.author),
|
authors: this._addNullableAuthor(json.author),
|
||||||
|
createdAt: +new Date(json.createdAt),
|
||||||
};
|
};
|
||||||
this._reviews.set(N.toRaw(address), entry);
|
this._reviews.set(N.toRaw(address), entry);
|
||||||
return address;
|
return address;
|
||||||
@ -473,6 +479,7 @@ export class RelationalView {
|
|||||||
reactions: expectAllNonNull(json, "reactions", json.reactions).map((x) =>
|
reactions: expectAllNonNull(json, "reactions", json.reactions).map((x) =>
|
||||||
this._addReaction(x)
|
this._addReaction(x)
|
||||||
),
|
),
|
||||||
|
createdAt: +new Date(json.createdAt),
|
||||||
};
|
};
|
||||||
this._comments.set(N.toRaw(address), entry);
|
this._comments.set(N.toRaw(address), entry);
|
||||||
return address;
|
return address;
|
||||||
@ -719,6 +726,7 @@ type RepoEntry = {|
|
|||||||
+url: string,
|
+url: string,
|
||||||
+issues: IssueAddress[],
|
+issues: IssueAddress[],
|
||||||
+pulls: PullAddress[],
|
+pulls: PullAddress[],
|
||||||
|
+createdAt: MsSinceEpoch,
|
||||||
|};
|
|};
|
||||||
|
|
||||||
export class Repo extends _Entity<RepoEntry> {
|
export class Repo extends _Entity<RepoEntry> {
|
||||||
@ -746,6 +754,9 @@ export class Repo extends _Entity<RepoEntry> {
|
|||||||
referencedBy(): Iterator<TextContentEntity> {
|
referencedBy(): Iterator<TextContentEntity> {
|
||||||
return this._view._referencedBy(this);
|
return this._view._referencedBy(this);
|
||||||
}
|
}
|
||||||
|
createdAt(): MsSinceEpoch {
|
||||||
|
return this._entry.createdAt;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type IssueEntry = {|
|
type IssueEntry = {|
|
||||||
@ -756,6 +767,7 @@ type IssueEntry = {|
|
|||||||
+comments: CommentAddress[],
|
+comments: CommentAddress[],
|
||||||
+authors: UserlikeAddress[],
|
+authors: UserlikeAddress[],
|
||||||
+reactions: ReactionRecord[],
|
+reactions: ReactionRecord[],
|
||||||
|
+createdAt: MsSinceEpoch,
|
||||||
|};
|
|};
|
||||||
|
|
||||||
export class Issue extends _Entity<IssueEntry> {
|
export class Issue extends _Entity<IssueEntry> {
|
||||||
@ -776,6 +788,9 @@ export class Issue extends _Entity<IssueEntry> {
|
|||||||
body(): string {
|
body(): string {
|
||||||
return this._entry.body;
|
return this._entry.body;
|
||||||
}
|
}
|
||||||
|
createdAt(): MsSinceEpoch {
|
||||||
|
return this._entry.createdAt;
|
||||||
|
}
|
||||||
*comments(): Iterator<Comment> {
|
*comments(): Iterator<Comment> {
|
||||||
for (const address of this._entry.comments) {
|
for (const address of this._entry.comments) {
|
||||||
const comment = this._view.comment(address);
|
const comment = this._view.comment(address);
|
||||||
@ -808,6 +823,7 @@ type PullEntry = {|
|
|||||||
+deletions: number,
|
+deletions: number,
|
||||||
+authors: UserlikeAddress[],
|
+authors: UserlikeAddress[],
|
||||||
+reactions: ReactionRecord[],
|
+reactions: ReactionRecord[],
|
||||||
|
+createdAt: MsSinceEpoch,
|
||||||
|};
|
|};
|
||||||
|
|
||||||
export class Pull extends _Entity<PullEntry> {
|
export class Pull extends _Entity<PullEntry> {
|
||||||
@ -837,6 +853,9 @@ export class Pull extends _Entity<PullEntry> {
|
|||||||
mergedAs(): ?GitNode.CommitAddress {
|
mergedAs(): ?GitNode.CommitAddress {
|
||||||
return this._entry.mergedAs;
|
return this._entry.mergedAs;
|
||||||
}
|
}
|
||||||
|
createdAt(): MsSinceEpoch {
|
||||||
|
return this._entry.createdAt;
|
||||||
|
}
|
||||||
*reviews(): Iterator<Review> {
|
*reviews(): Iterator<Review> {
|
||||||
for (const address of this._entry.reviews) {
|
for (const address of this._entry.reviews) {
|
||||||
const review = this._view.review(address);
|
const review = this._view.review(address);
|
||||||
@ -870,6 +889,7 @@ type ReviewEntry = {|
|
|||||||
+comments: CommentAddress[],
|
+comments: CommentAddress[],
|
||||||
+state: T.PullRequestReviewState,
|
+state: T.PullRequestReviewState,
|
||||||
+authors: UserlikeAddress[],
|
+authors: UserlikeAddress[],
|
||||||
|
+createdAt: MsSinceEpoch,
|
||||||
|};
|
|};
|
||||||
|
|
||||||
export class Review extends _Entity<ReviewEntry> {
|
export class Review extends _Entity<ReviewEntry> {
|
||||||
@ -896,6 +916,9 @@ export class Review extends _Entity<ReviewEntry> {
|
|||||||
authors(): Iterator<Userlike> {
|
authors(): Iterator<Userlike> {
|
||||||
return getAuthors(this._view, this._entry);
|
return getAuthors(this._view, this._entry);
|
||||||
}
|
}
|
||||||
|
createdAt(): MsSinceEpoch {
|
||||||
|
return this._entry.createdAt;
|
||||||
|
}
|
||||||
references(): Iterator<ReferentEntity> {
|
references(): Iterator<ReferentEntity> {
|
||||||
return this._view._references(this);
|
return this._view._references(this);
|
||||||
}
|
}
|
||||||
@ -910,6 +933,7 @@ type CommentEntry = {|
|
|||||||
+url: string,
|
+url: string,
|
||||||
+authors: UserlikeAddress[],
|
+authors: UserlikeAddress[],
|
||||||
+reactions: ReactionRecord[],
|
+reactions: ReactionRecord[],
|
||||||
|
+createdAt: MsSinceEpoch,
|
||||||
|};
|
|};
|
||||||
|
|
||||||
export class Comment extends _Entity<CommentEntry> {
|
export class Comment extends _Entity<CommentEntry> {
|
||||||
@ -937,6 +961,9 @@ export class Comment extends _Entity<CommentEntry> {
|
|||||||
body(): string {
|
body(): string {
|
||||||
return this._entry.body;
|
return this._entry.body;
|
||||||
}
|
}
|
||||||
|
createdAt(): MsSinceEpoch {
|
||||||
|
return this._entry.createdAt;
|
||||||
|
}
|
||||||
authors(): Iterator<Userlike> {
|
authors(): Iterator<Userlike> {
|
||||||
return getAuthors(this._view, this._entry);
|
return getAuthors(this._view, this._entry);
|
||||||
}
|
}
|
||||||
|
@ -83,6 +83,7 @@ describe("plugins/github/relationalView", () => {
|
|||||||
has("owner", () => entity.owner());
|
has("owner", () => entity.owner());
|
||||||
has("name", () => entity.name());
|
has("name", () => entity.name());
|
||||||
has("url", () => entity.url());
|
has("url", () => entity.url());
|
||||||
|
has("createdAt", () => entity.createdAt());
|
||||||
hasEntities("issues", () => entity.issues());
|
hasEntities("issues", () => entity.issues());
|
||||||
hasEntities("pulls", () => entity.pulls());
|
hasEntities("pulls", () => entity.pulls());
|
||||||
});
|
});
|
||||||
@ -95,6 +96,7 @@ describe("plugins/github/relationalView", () => {
|
|||||||
has("title", () => entity.title());
|
has("title", () => entity.title());
|
||||||
has("url", () => entity.url());
|
has("url", () => entity.url());
|
||||||
has("parent", () => entity.parent());
|
has("parent", () => entity.parent());
|
||||||
|
has("createdAt", () => entity.createdAt());
|
||||||
hasEntities("comments", () => entity.comments());
|
hasEntities("comments", () => entity.comments());
|
||||||
hasEntities("authors", () => entity.authors());
|
hasEntities("authors", () => entity.authors());
|
||||||
has("reactions", () => entity.reactions());
|
has("reactions", () => entity.reactions());
|
||||||
@ -115,6 +117,7 @@ describe("plugins/github/relationalView", () => {
|
|||||||
hasEntities("comments", () => entity.comments());
|
hasEntities("comments", () => entity.comments());
|
||||||
hasEntities("authors", () => entity.authors());
|
hasEntities("authors", () => entity.authors());
|
||||||
has("reactions", () => entity.reactions());
|
has("reactions", () => entity.reactions());
|
||||||
|
has("createdAt", () => entity.createdAt());
|
||||||
});
|
});
|
||||||
|
|
||||||
const review = Array.from(pull.reviews())[0];
|
const review = Array.from(pull.reviews())[0];
|
||||||
@ -126,6 +129,7 @@ describe("plugins/github/relationalView", () => {
|
|||||||
has("parent", () => entity.parent());
|
has("parent", () => entity.parent());
|
||||||
hasEntities("comments", () => entity.comments());
|
hasEntities("comments", () => entity.comments());
|
||||||
hasEntities("authors", () => entity.authors());
|
hasEntities("authors", () => entity.authors());
|
||||||
|
has("createdAt", () => entity.createdAt());
|
||||||
});
|
});
|
||||||
|
|
||||||
const comment = Array.from(review.comments())[0];
|
const comment = Array.from(review.comments())[0];
|
||||||
@ -136,6 +140,7 @@ describe("plugins/github/relationalView", () => {
|
|||||||
has("parent", () => entity.parent());
|
has("parent", () => entity.parent());
|
||||||
hasEntities("authors", () => entity.authors());
|
hasEntities("authors", () => entity.authors());
|
||||||
has("reactions", () => entity.reactions());
|
has("reactions", () => entity.reactions());
|
||||||
|
has("createdAt", () => entity.createdAt());
|
||||||
});
|
});
|
||||||
|
|
||||||
const commit = Array.from(view.commits())[0];
|
const commit = Array.from(view.commits())[0];
|
||||||
|
@ -36,6 +36,7 @@ export default function schema(): Schema.Schema {
|
|||||||
issues: s.connection("Issue"),
|
issues: s.connection("Issue"),
|
||||||
pullRequests: s.connection("PullRequest"),
|
pullRequests: s.connection("PullRequest"),
|
||||||
defaultBranchRef: s.node("Ref"),
|
defaultBranchRef: s.node("Ref"),
|
||||||
|
createdAt: s.primitive(s.nonNull("DateTime")),
|
||||||
}),
|
}),
|
||||||
Issue: s.object({
|
Issue: s.object({
|
||||||
id: s.id(),
|
id: s.id(),
|
||||||
@ -46,6 +47,7 @@ export default function schema(): Schema.Schema {
|
|||||||
author: s.node("Actor"),
|
author: s.node("Actor"),
|
||||||
comments: s.connection("IssueComment"),
|
comments: s.connection("IssueComment"),
|
||||||
reactions: s.connection("Reaction"),
|
reactions: s.connection("Reaction"),
|
||||||
|
createdAt: s.primitive(s.nonNull("DateTime")),
|
||||||
}),
|
}),
|
||||||
PullRequest: s.object({
|
PullRequest: s.object({
|
||||||
id: s.id(),
|
id: s.id(),
|
||||||
@ -60,6 +62,7 @@ export default function schema(): Schema.Schema {
|
|||||||
comments: s.connection("IssueComment"), // yes, PRs have IssueComments
|
comments: s.connection("IssueComment"), // yes, PRs have IssueComments
|
||||||
reviews: s.connection("PullRequestReview"),
|
reviews: s.connection("PullRequestReview"),
|
||||||
reactions: s.connection("Reaction"),
|
reactions: s.connection("Reaction"),
|
||||||
|
createdAt: s.primitive(s.nonNull("DateTime")),
|
||||||
}),
|
}),
|
||||||
IssueComment: s.object({
|
IssueComment: s.object({
|
||||||
id: s.id(),
|
id: s.id(),
|
||||||
@ -67,6 +70,7 @@ export default function schema(): Schema.Schema {
|
|||||||
body: s.primitive(s.nonNull("String")),
|
body: s.primitive(s.nonNull("String")),
|
||||||
author: s.node("Actor"),
|
author: s.node("Actor"),
|
||||||
reactions: s.connection("Reaction"),
|
reactions: s.connection("Reaction"),
|
||||||
|
createdAt: s.primitive(s.nonNull("DateTime")),
|
||||||
}),
|
}),
|
||||||
PullRequestReview: s.object({
|
PullRequestReview: s.object({
|
||||||
id: s.id(),
|
id: s.id(),
|
||||||
@ -75,6 +79,7 @@ export default function schema(): Schema.Schema {
|
|||||||
author: s.node("Actor"),
|
author: s.node("Actor"),
|
||||||
state: s.primitive(s.nonNull("PullRequestReviewState")),
|
state: s.primitive(s.nonNull("PullRequestReviewState")),
|
||||||
comments: s.connection("PullRequestReviewComment"),
|
comments: s.connection("PullRequestReviewComment"),
|
||||||
|
createdAt: s.primitive(s.nonNull("DateTime")),
|
||||||
}),
|
}),
|
||||||
PullRequestReviewComment: s.object({
|
PullRequestReviewComment: s.object({
|
||||||
id: s.id(),
|
id: s.id(),
|
||||||
@ -82,6 +87,7 @@ export default function schema(): Schema.Schema {
|
|||||||
body: s.primitive(s.nonNull("String")),
|
body: s.primitive(s.nonNull("String")),
|
||||||
author: s.node("Actor"),
|
author: s.node("Actor"),
|
||||||
reactions: s.connection("Reaction"),
|
reactions: s.connection("Reaction"),
|
||||||
|
createdAt: s.primitive(s.nonNull("DateTime")),
|
||||||
}),
|
}),
|
||||||
Reaction: s.object({
|
Reaction: s.object({
|
||||||
id: s.id(),
|
id: s.id(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user