diff --git a/src/plugins/github/__snapshots__/githubPlugin.test.js.snap b/src/plugins/github/__snapshots__/githubPlugin.test.js.snap index af4593a..a6eed37 100644 --- a/src/plugins/github/__snapshots__/githubPlugin.test.js.snap +++ b/src/plugins/github/__snapshots__/githubPlugin.test.js.snap @@ -483,6 +483,32 @@ Object { "repositoryName": "sourcecred/example-repo", }, }, + "{\\"pluginName\\":\\"sourcecred/github-beta\\",\\"repositoryName\\":\\"sourcecred/example-repo\\",\\"id\\":\\"{\\\\\\"authorID\\\\\\":{\\\\\\"id\\\\\\":\\\\\\"MDQ6VXNlcjE0MDAwMjM=\\\\\\",\\\\\\"type\\\\\\":\\\\\\"USER\\\\\\"},\\\\\\"contributionID\\\\\\":{\\\\\\"id\\\\\\":\\\\\\"MDU6SXNzdWUzMDY5ODM1NTI=\\\\\\",\\\\\\"type\\\\\\":\\\\\\"ISSUE\\\\\\"},\\\\\\"type\\\\\\":\\\\\\"AUTHORSHIP\\\\\\"}\\"}": Object { + "dst": Object { + "id": "{\\"id\\":\\"MDQ6VXNlcjE0MDAwMjM=\\",\\"type\\":\\"USER\\"}", + "pluginName": "sourcecred/github-beta", + "repositoryName": "sourcecred/example-repo", + }, + "payload": Object {}, + "src": Object { + "id": "{\\"id\\":\\"MDU6SXNzdWUzMDY5ODM1NTI=\\",\\"type\\":\\"ISSUE\\"}", + "pluginName": "sourcecred/github-beta", + "repositoryName": "sourcecred/example-repo", + }, + }, + "{\\"pluginName\\":\\"sourcecred/github-beta\\",\\"repositoryName\\":\\"sourcecred/example-repo\\",\\"id\\":\\"{\\\\\\"authorID\\\\\\":{\\\\\\"id\\\\\\":\\\\\\"MDQ6VXNlcjE0MDAwMjM=\\\\\\",\\\\\\"type\\\\\\":\\\\\\"USER\\\\\\"},\\\\\\"contributionID\\\\\\":{\\\\\\"id\\\\\\":\\\\\\"MDU6SXNzdWUzMDY5ODUzNjc=\\\\\\",\\\\\\"type\\\\\\":\\\\\\"ISSUE\\\\\\"},\\\\\\"type\\\\\\":\\\\\\"AUTHORSHIP\\\\\\"}\\"}": Object { + "dst": Object { + "id": "{\\"id\\":\\"MDQ6VXNlcjE0MDAwMjM=\\",\\"type\\":\\"USER\\"}", + "pluginName": "sourcecred/github-beta", + "repositoryName": "sourcecred/example-repo", + }, + "payload": Object {}, + "src": Object { + "id": "{\\"id\\":\\"MDU6SXNzdWUzMDY5ODUzNjc=\\",\\"type\\":\\"ISSUE\\"}", + "pluginName": "sourcecred/github-beta", + "repositoryName": "sourcecred/example-repo", + }, + }, "{\\"pluginName\\":\\"sourcecred/github-beta\\",\\"repositoryName\\":\\"sourcecred/example-repo\\",\\"id\\":\\"{\\\\\\"authorID\\\\\\":{\\\\\\"id\\\\\\":\\\\\\"MDQ6VXNlcjQzMTc4MDY=\\\\\\",\\\\\\"type\\\\\\":\\\\\\"USER\\\\\\"},\\\\\\"contributionID\\\\\\":{\\\\\\"id\\\\\\":\\\\\\"MDE3OlB1bGxSZXF1ZXN0UmV2aWV3MTAwMzE0MDM4\\\\\\",\\\\\\"type\\\\\\":\\\\\\"PULL_REQUEST_REVIEW\\\\\\"},\\\\\\"type\\\\\\":\\\\\\"AUTHORSHIP\\\\\\"}\\"}": Object { "dst": Object { "id": "{\\"id\\":\\"MDQ6VXNlcjQzMTc4MDY=\\",\\"type\\":\\"USER\\"}", @@ -733,6 +759,21 @@ https://github.com/sourcecred/example-repo/issues/6#issuecomment-373768538", "title": "An issue with comments", }, }, + "{\\"pluginName\\":\\"sourcecred/github-beta\\",\\"repositoryName\\":\\"sourcecred/example-repo\\",\\"id\\":\\"{\\\\\\"id\\\\\\":\\\\\\"MDU6SXNzdWUzMDY5ODM1NTI=\\\\\\",\\\\\\"type\\\\\\":\\\\\\"ISSUE\\\\\\"}\\"}": Object { + "payload": Object { + "body": "Deal with this, naive string display algorithms!!!!!", + "number": 7, + "title": "An issue with an extremely long title, which even has a VerySuperFragicalisticialiManyCharacterUberLongTriplePlusGood word in it, and should really be truncated intelligently or something", + }, + }, + "{\\"pluginName\\":\\"sourcecred/github-beta\\",\\"repositoryName\\":\\"sourcecred/example-repo\\",\\"id\\":\\"{\\\\\\"id\\\\\\":\\\\\\"MDU6SXNzdWUzMDY5ODUzNjc=\\\\\\",\\\\\\"type\\\\\\":\\\\\\"ISSUE\\\\\\"}\\"}": Object { + "payload": Object { + "body": "Issue with Unicode: ศดแˆฒ๐ฃณๆฅข๐Ÿ‘ :heart: ๐ค”๐ค๐ค€๐ค‘๐ค๐ค‰๐ค”๐คŒ๐ค„๐ค๐ค โค๏ธ +Issue with Unicode: ศดแˆฒ๐ฃณๆฅข๐Ÿ‘ :heart: ๐ค”๐ค๐ค€๐ค‘๐ค๐ค‰๐ค”๐คŒ๐ค„๐ค๐ค โค๏ธ", + "number": 8, + "title": "Issue with Unicode: ศดแˆฒ๐ฃณๆฅข๐Ÿ‘ :heart: ๐ค”๐ค๐ค€๐ค‘๐ค๐ค‰๐ค”๐คŒ๐ค„๐ค๐ค โค๏ธ", + }, + }, }, } `; diff --git a/src/plugins/github/demoData/example-repo.json b/src/plugins/github/demoData/example-repo.json index 434d6c4..8a5ad23 100644 --- a/src/plugins/github/demoData/example-repo.json +++ b/src/plugins/github/demoData/example-repo.json @@ -114,6 +114,42 @@ "id": "MDU6SXNzdWUzMDU5OTM3NzM=", "number": 6, "title": "An issue with comments" + }, + { + "author": { + "__typename": "User", + "id": "MDQ6VXNlcjE0MDAwMjM=", + "login": "dandelionmane" + }, + "body": "Deal with this, naive string display algorithms!!!!!", + "comments": { + "nodes": [ + ], + "pageInfo": { + "hasNextPage": false + } + }, + "id": "MDU6SXNzdWUzMDY5ODM1NTI=", + "number": 7, + "title": "An issue with an extremely long title, which even has a VerySuperFragicalisticialiManyCharacterUberLongTriplePlusGood word in it, and should really be truncated intelligently or something" + }, + { + "author": { + "__typename": "User", + "id": "MDQ6VXNlcjE0MDAwMjM=", + "login": "dandelionmane" + }, + "body": "Issue with Unicode: ศดแˆฒ๐ฃณๆฅข๐Ÿ‘ :heart: ๐ค”๐ค๐ค€๐ค‘๐ค๐ค‰๐ค”๐คŒ๐ค„๐ค๐ค โค๏ธ\r\nIssue with Unicode: ศดแˆฒ๐ฃณๆฅข๐Ÿ‘ :heart: ๐ค”๐ค๐ค€๐ค‘๐ค๐ค‰๐ค”๐คŒ๐ค„๐ค๐ค โค๏ธ", + "comments": { + "nodes": [ + ], + "pageInfo": { + "hasNextPage": false + } + }, + "id": "MDU6SXNzdWUzMDY5ODUzNjc=", + "number": 8, + "title": "Issue with Unicode: ศดแˆฒ๐ฃณๆฅข๐Ÿ‘ :heart: ๐ค”๐ค๐ค€๐ค‘๐ค๐ค‰๐ค”๐คŒ๐ค„๐ค๐ค โค๏ธ" } ], "pageInfo": {