You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1528 lines
84 KiB

  1. package webhook
  2. import (
  3. "strings"
  4. "testing"
  5. )
  6. var ghtests = []struct {
  7. eventType string
  8. jsonBody string
  9. outHTML string
  10. outFullRepo string
  11. outType string
  12. }{
  13. {"issues",
  14. `{
  15. "action": "closed",
  16. "issue": {
  17. "url": "https://api.github.com/repos/DummyAccount/reponame/issues/15",
  18. "repository_url": "https://api.github.com/repos/DummyAccount/reponame",
  19. "labels_url": "https://api.github.com/repos/DummyAccount/reponame/issues/15/labels{/name}",
  20. "comments_url": "https://api.github.com/repos/DummyAccount/reponame/issues/15/comments",
  21. "events_url": "https://api.github.com/repos/DummyAccount/reponame/issues/15/events",
  22. "html_url": "https://github.com/DummyAccount/reponame/issues/15",
  23. "id": 159196956,
  24. "number": 15,
  25. "title": "aaaaaa",
  26. "user": {
  27. "login": "DummyAccount",
  28. "id": 7190048,
  29. "avatar_url": "https://avatars.githubusercontent.com/u/7190048?v=3",
  30. "gravatar_id": "",
  31. "url": "https://api.github.com/users/DummyAccount",
  32. "html_url": "https://github.com/DummyAccount",
  33. "followers_url": "https://api.github.com/users/DummyAccount/followers",
  34. "following_url": "https://api.github.com/users/DummyAccount/following{/other_user}",
  35. "gists_url": "https://api.github.com/users/DummyAccount/gists{/gist_id}",
  36. "starred_url": "https://api.github.com/users/DummyAccount/starred{/owner}{/repo}",
  37. "subscriptions_url": "https://api.github.com/users/DummyAccount/subscriptions",
  38. "organizations_url": "https://api.github.com/users/DummyAccount/orgs",
  39. "repos_url": "https://api.github.com/users/DummyAccount/repos",
  40. "events_url": "https://api.github.com/users/DummyAccount/events{/privacy}",
  41. "received_events_url": "https://api.github.com/users/DummyAccount/received_events",
  42. "type": "User",
  43. "site_admin": false
  44. },
  45. "labels": [
  46. ],
  47. "state": "closed",
  48. "locked": false,
  49. "assignee": null,
  50. "milestone": null,
  51. "comments": 1,
  52. "created_at": "2016-06-08T15:40:44Z",
  53. "updated_at": "2016-06-08T15:41:36Z",
  54. "closed_at": "2016-06-08T15:41:36Z",
  55. "body": ""
  56. },
  57. "repository": {
  58. "id": 21138172,
  59. "name": "reponame",
  60. "full_name": "DummyAccount/reponame",
  61. "owner": {
  62. "login": "DummyAccount",
  63. "id": 7190048,
  64. "avatar_url": "https://avatars.githubusercontent.com/u/7190048?v=3",
  65. "gravatar_id": "",
  66. "url": "https://api.github.com/users/DummyAccount",
  67. "html_url": "https://github.com/DummyAccount",
  68. "followers_url": "https://api.github.com/users/DummyAccount/followers",
  69. "following_url": "https://api.github.com/users/DummyAccount/following{/other_user}",
  70. "gists_url": "https://api.github.com/users/DummyAccount/gists{/gist_id}",
  71. "starred_url": "https://api.github.com/users/DummyAccount/starred{/owner}{/repo}",
  72. "subscriptions_url": "https://api.github.com/users/DummyAccount/subscriptions",
  73. "organizations_url": "https://api.github.com/users/DummyAccount/orgs",
  74. "repos_url": "https://api.github.com/users/DummyAccount/repos",
  75. "events_url": "https://api.github.com/users/DummyAccount/events{/privacy}",
  76. "received_events_url": "https://api.github.com/users/DummyAccount/received_events",
  77. "type": "User",
  78. "site_admin": false
  79. },
  80. "private": false,
  81. "html_url": "https://github.com/DummyAccount/reponame",
  82. "description": "Android Development Device Monitor",
  83. "fork": false,
  84. "url": "https://api.github.com/repos/DummyAccount/reponame",
  85. "forks_url": "https://api.github.com/repos/DummyAccount/reponame/forks",
  86. "keys_url": "https://api.github.com/repos/DummyAccount/reponame/keys{/key_id}",
  87. "collaborators_url": "https://api.github.com/repos/DummyAccount/reponame/collaborators{/collaborator}",
  88. "teams_url": "https://api.github.com/repos/DummyAccount/reponame/teams",
  89. "hooks_url": "https://api.github.com/repos/DummyAccount/reponame/hooks",
  90. "issue_events_url": "https://api.github.com/repos/DummyAccount/reponame/issues/events{/number}",
  91. "events_url": "https://api.github.com/repos/DummyAccount/reponame/events",
  92. "assignees_url": "https://api.github.com/repos/DummyAccount/reponame/assignees{/user}",
  93. "branches_url": "https://api.github.com/repos/DummyAccount/reponame/branches{/branch}",
  94. "tags_url": "https://api.github.com/repos/DummyAccount/reponame/tags",
  95. "blobs_url": "https://api.github.com/repos/DummyAccount/reponame/git/blobs{/sha}",
  96. "git_tags_url": "https://api.github.com/repos/DummyAccount/reponame/git/tags{/sha}",
  97. "git_refs_url": "https://api.github.com/repos/DummyAccount/reponame/git/refs{/sha}",
  98. "trees_url": "https://api.github.com/repos/DummyAccount/reponame/git/trees{/sha}",
  99. "statuses_url": "https://api.github.com/repos/DummyAccount/reponame/statuses/{sha}",
  100. "languages_url": "https://api.github.com/repos/DummyAccount/reponame/languages",
  101. "stargazers_url": "https://api.github.com/repos/DummyAccount/reponame/stargazers",
  102. "contributors_url": "https://api.github.com/repos/DummyAccount/reponame/contributors",
  103. "subscribers_url": "https://api.github.com/repos/DummyAccount/reponame/subscribers",
  104. "subscription_url": "https://api.github.com/repos/DummyAccount/reponame/subscription",
  105. "commits_url": "https://api.github.com/repos/DummyAccount/reponame/commits{/sha}",
  106. "git_commits_url": "https://api.github.com/repos/DummyAccount/reponame/git/commits{/sha}",
  107. "comments_url": "https://api.github.com/repos/DummyAccount/reponame/comments{/number}",
  108. "issue_comment_url": "https://api.github.com/repos/DummyAccount/reponame/issues/comments{/number}",
  109. "contents_url": "https://api.github.com/repos/DummyAccount/reponame/contents/{+path}",
  110. "compare_url": "https://api.github.com/repos/DummyAccount/reponame/compare/{base}...{head}",
  111. "merges_url": "https://api.github.com/repos/DummyAccount/reponame/merges",
  112. "archive_url": "https://api.github.com/repos/DummyAccount/reponame/{archive_format}{/ref}",
  113. "downloads_url": "https://api.github.com/repos/DummyAccount/reponame/downloads",
  114. "issues_url": "https://api.github.com/repos/DummyAccount/reponame/issues{/number}",
  115. "pulls_url": "https://api.github.com/repos/DummyAccount/reponame/pulls{/number}",
  116. "milestones_url": "https://api.github.com/repos/DummyAccount/reponame/milestones{/number}",
  117. "notifications_url": "https://api.github.com/repos/DummyAccount/reponame/notifications{?since,all,participating}",
  118. "labels_url": "https://api.github.com/repos/DummyAccount/reponame/labels{/name}",
  119. "releases_url": "https://api.github.com/repos/DummyAccount/reponame/releases{/id}",
  120. "deployments_url": "https://api.github.com/repos/DummyAccount/reponame/deployments",
  121. "created_at": "2014-06-23T18:51:33Z",
  122. "updated_at": "2015-07-22T07:42:19Z",
  123. "pushed_at": "2015-07-22T07:42:19Z",
  124. "git_url": "git://github.com/DummyAccount/reponame.git",
  125. "ssh_url": "git@github.com:DummyAccount/reponame.git",
  126. "clone_url": "https://github.com/DummyAccount/reponame.git",
  127. "svn_url": "https://github.com/DummyAccount/reponame",
  128. "homepage": null,
  129. "size": 725,
  130. "stargazers_count": 0,
  131. "watchers_count": 0,
  132. "language": "Java",
  133. "has_issues": true,
  134. "has_downloads": true,
  135. "has_wiki": true,
  136. "has_pages": false,
  137. "forks_count": 1,
  138. "mirror_url": null,
  139. "open_issues_count": 0,
  140. "forks": 1,
  141. "open_issues": 0,
  142. "watchers": 0,
  143. "default_branch": "master"
  144. },
  145. "sender": {
  146. "login": "DummyAccount",
  147. "id": 7190048,
  148. "avatar_url": "https://avatars.githubusercontent.com/u/7190048?v=3",
  149. "gravatar_id": "",
  150. "url": "https://api.github.com/users/DummyAccount",
  151. "html_url": "https://github.com/DummyAccount",
  152. "followers_url": "https://api.github.com/users/DummyAccount/followers",
  153. "following_url": "https://api.github.com/users/DummyAccount/following{/other_user}",
  154. "gists_url": "https://api.github.com/users/DummyAccount/gists{/gist_id}",
  155. "starred_url": "https://api.github.com/users/DummyAccount/starred{/owner}{/repo}",
  156. "subscriptions_url": "https://api.github.com/users/DummyAccount/subscriptions",
  157. "organizations_url": "https://api.github.com/users/DummyAccount/orgs",
  158. "repos_url": "https://api.github.com/users/DummyAccount/repos",
  159. "events_url": "https://api.github.com/users/DummyAccount/events{/privacy}",
  160. "received_events_url": "https://api.github.com/users/DummyAccount/received_events",
  161. "type": "User",
  162. "site_admin": false
  163. }
  164. }`,
  165. `[<u>DummyAccount/reponame</u>] DummyAccount closed <b>issue #15</b>: aaaaaa [closed] - https://github.com/DummyAccount/reponame/issues/15`,
  166. "DummyAccount/reponame", "issues"},
  167. // ==================================================================
  168. {
  169. "issue_comment",
  170. `{
  171. "action": "created",
  172. "issue": {
  173. "url": "https://api.github.com/repos/DummyAccount/arepo/issues/15",
  174. "repository_url": "https://api.github.com/repos/DummyAccount/arepo",
  175. "labels_url": "https://api.github.com/repos/DummyAccount/arepo/issues/15/labels{/name}",
  176. "comments_url": "https://api.github.com/repos/DummyAccount/arepo/issues/15/comments",
  177. "events_url": "https://api.github.com/repos/DummyAccount/arepo/issues/15/events",
  178. "html_url": "https://github.com/DummyAccount/arepo/issues/15",
  179. "id": 159196956,
  180. "number": 15,
  181. "title": "aaaaaa",
  182. "user": {
  183. "login": "DummyAccount",
  184. "id": 7190048,
  185. "avatar_url": "https://avatars.githubusercontent.com/u/7190048?v=3",
  186. "gravatar_id": "",
  187. "url": "https://api.github.com/users/DummyAccount",
  188. "html_url": "https://github.com/DummyAccount",
  189. "followers_url": "https://api.github.com/users/DummyAccount/followers",
  190. "following_url": "https://api.github.com/users/DummyAccount/following{/other_user}",
  191. "gists_url": "https://api.github.com/users/DummyAccount/gists{/gist_id}",
  192. "starred_url": "https://api.github.com/users/DummyAccount/starred{/owner}{/repo}",
  193. "subscriptions_url": "https://api.github.com/users/DummyAccount/subscriptions",
  194. "organizations_url": "https://api.github.com/users/DummyAccount/orgs",
  195. "repos_url": "https://api.github.com/users/DummyAccount/repos",
  196. "events_url": "https://api.github.com/users/DummyAccount/events{/privacy}",
  197. "received_events_url": "https://api.github.com/users/DummyAccount/received_events",
  198. "type": "User",
  199. "site_admin": false
  200. },
  201. "labels": [
  202. ],
  203. "state": "closed",
  204. "locked": false,
  205. "assignee": null,
  206. "milestone": null,
  207. "comments": 2,
  208. "created_at": "2016-06-08T15:40:44Z",
  209. "updated_at": "2016-06-08T15:55:25Z",
  210. "closed_at": "2016-06-08T15:41:36Z",
  211. "body": ""
  212. },
  213. "comment": {
  214. "url": "https://api.github.com/repos/DummyAccount/arepo/issues/comments/224636064",
  215. "html_url": "https://github.com/DummyAccount/arepo/issues/15#issuecomment-224636064",
  216. "issue_url": "https://api.github.com/repos/DummyAccount/arepo/issues/15",
  217. "id": 224636064,
  218. "user": {
  219. "login": "DummyAccount",
  220. "id": 7190048,
  221. "avatar_url": "https://avatars.githubusercontent.com/u/7190048?v=3",
  222. "gravatar_id": "",
  223. "url": "https://api.github.com/users/DummyAccount",
  224. "html_url": "https://github.com/DummyAccount",
  225. "followers_url": "https://api.github.com/users/DummyAccount/followers",
  226. "following_url": "https://api.github.com/users/DummyAccount/following{/other_user}",
  227. "gists_url": "https://api.github.com/users/DummyAccount/gists{/gist_id}",
  228. "starred_url": "https://api.github.com/users/DummyAccount/starred{/owner}{/repo}",
  229. "subscriptions_url": "https://api.github.com/users/DummyAccount/subscriptions",
  230. "organizations_url": "https://api.github.com/users/DummyAccount/orgs",
  231. "repos_url": "https://api.github.com/users/DummyAccount/repos",
  232. "events_url": "https://api.github.com/users/DummyAccount/events{/privacy}",
  233. "received_events_url": "https://api.github.com/users/DummyAccount/received_events",
  234. "type": "User",
  235. "site_admin": false
  236. },
  237. "created_at": "2016-06-08T15:55:25Z",
  238. "updated_at": "2016-06-08T15:55:25Z",
  239. "body": "cccccc"
  240. },
  241. "repository": {
  242. "id": 21138172,
  243. "name": "arepo",
  244. "full_name": "DummyAccount/arepo",
  245. "owner": {
  246. "login": "DummyAccount",
  247. "id": 7190048,
  248. "avatar_url": "https://avatars.githubusercontent.com/u/7190048?v=3",
  249. "gravatar_id": "",
  250. "url": "https://api.github.com/users/DummyAccount",
  251. "html_url": "https://github.com/DummyAccount",
  252. "followers_url": "https://api.github.com/users/DummyAccount/followers",
  253. "following_url": "https://api.github.com/users/DummyAccount/following{/other_user}",
  254. "gists_url": "https://api.github.com/users/DummyAccount/gists{/gist_id}",
  255. "starred_url": "https://api.github.com/users/DummyAccount/starred{/owner}{/repo}",
  256. "subscriptions_url": "https://api.github.com/users/DummyAccount/subscriptions",
  257. "organizations_url": "https://api.github.com/users/DummyAccount/orgs",
  258. "repos_url": "https://api.github.com/users/DummyAccount/repos",
  259. "events_url": "https://api.github.com/users/DummyAccount/events{/privacy}",
  260. "received_events_url": "https://api.github.com/users/DummyAccount/received_events",
  261. "type": "User",
  262. "site_admin": false
  263. },
  264. "private": false,
  265. "html_url": "https://github.com/DummyAccount/arepo",
  266. "description": "Android Development Device Monitor",
  267. "fork": false,
  268. "url": "https://api.github.com/repos/DummyAccount/arepo",
  269. "forks_url": "https://api.github.com/repos/DummyAccount/arepo/forks",
  270. "keys_url": "https://api.github.com/repos/DummyAccount/arepo/keys{/key_id}",
  271. "collaborators_url": "https://api.github.com/repos/DummyAccount/arepo/collaborators{/collaborator}",
  272. "teams_url": "https://api.github.com/repos/DummyAccount/arepo/teams",
  273. "hooks_url": "https://api.github.com/repos/DummyAccount/arepo/hooks",
  274. "issue_events_url": "https://api.github.com/repos/DummyAccount/arepo/issues/events{/number}",
  275. "events_url": "https://api.github.com/repos/DummyAccount/arepo/events",
  276. "assignees_url": "https://api.github.com/repos/DummyAccount/arepo/assignees{/user}",
  277. "branches_url": "https://api.github.com/repos/DummyAccount/arepo/branches{/branch}",
  278. "tags_url": "https://api.github.com/repos/DummyAccount/arepo/tags",
  279. "blobs_url": "https://api.github.com/repos/DummyAccount/arepo/git/blobs{/sha}",
  280. "git_tags_url": "https://api.github.com/repos/DummyAccount/arepo/git/tags{/sha}",
  281. "git_refs_url": "https://api.github.com/repos/DummyAccount/arepo/git/refs{/sha}",
  282. "trees_url": "https://api.github.com/repos/DummyAccount/arepo/git/trees{/sha}",
  283. "statuses_url": "https://api.github.com/repos/DummyAccount/arepo/statuses/{sha}",
  284. "languages_url": "https://api.github.com/repos/DummyAccount/arepo/languages",
  285. "stargazers_url": "https://api.github.com/repos/DummyAccount/arepo/stargazers",
  286. "contributors_url": "https://api.github.com/repos/DummyAccount/arepo/contributors",
  287. "subscribers_url": "https://api.github.com/repos/DummyAccount/arepo/subscribers",
  288. "subscription_url": "https://api.github.com/repos/DummyAccount/arepo/subscription",
  289. "commits_url": "https://api.github.com/repos/DummyAccount/arepo/commits{/sha}",
  290. "git_commits_url": "https://api.github.com/repos/DummyAccount/arepo/git/commits{/sha}",
  291. "comments_url": "https://api.github.com/repos/DummyAccount/arepo/comments{/number}",
  292. "issue_comment_url": "https://api.github.com/repos/DummyAccount/arepo/issues/comments{/number}",
  293. "contents_url": "https://api.github.com/repos/DummyAccount/arepo/contents/{+path}",
  294. "compare_url": "https://api.github.com/repos/DummyAccount/arepo/compare/{base}...{head}",
  295. "merges_url": "https://api.github.com/repos/DummyAccount/arepo/merges",
  296. "archive_url": "https://api.github.com/repos/DummyAccount/arepo/{archive_format}{/ref}",
  297. "downloads_url": "https://api.github.com/repos/DummyAccount/arepo/downloads",
  298. "issues_url": "https://api.github.com/repos/DummyAccount/arepo/issues{/number}",
  299. "pulls_url": "https://api.github.com/repos/DummyAccount/arepo/pulls{/number}",
  300. "milestones_url": "https://api.github.com/repos/DummyAccount/arepo/milestones{/number}",
  301. "notifications_url": "https://api.github.com/repos/DummyAccount/arepo/notifications{?since,all,participating}",
  302. "labels_url": "https://api.github.com/repos/DummyAccount/arepo/labels{/name}",
  303. "releases_url": "https://api.github.com/repos/DummyAccount/arepo/releases{/id}",
  304. "deployments_url": "https://api.github.com/repos/DummyAccount/arepo/deployments",
  305. "created_at": "2014-06-23T18:51:33Z",
  306. "updated_at": "2015-07-22T07:42:19Z",
  307. "pushed_at": "2015-07-22T07:42:19Z",
  308. "git_url": "git://github.com/DummyAccount/arepo.git",
  309. "ssh_url": "git@github.com:DummyAccount/arepo.git",
  310. "clone_url": "https://github.com/DummyAccount/arepo.git",
  311. "svn_url": "https://github.com/DummyAccount/arepo",
  312. "homepage": null,
  313. "size": 725,
  314. "stargazers_count": 0,
  315. "watchers_count": 0,
  316. "language": "Java",
  317. "has_issues": true,
  318. "has_downloads": true,
  319. "has_wiki": true,
  320. "has_pages": false,
  321. "forks_count": 1,
  322. "mirror_url": null,
  323. "open_issues_count": 0,
  324. "forks": 1,
  325. "open_issues": 0,
  326. "watchers": 0,
  327. "default_branch": "master"
  328. },
  329. "sender": {
  330. "login": "DummyAccount",
  331. "id": 7190048,
  332. "avatar_url": "https://avatars.githubusercontent.com/u/7190048?v=3",
  333. "gravatar_id": "",
  334. "url": "https://api.github.com/users/DummyAccount",
  335. "html_url": "https://github.com/DummyAccount",
  336. "followers_url": "https://api.github.com/users/DummyAccount/followers",
  337. "following_url": "https://api.github.com/users/DummyAccount/following{/other_user}",
  338. "gists_url": "https://api.github.com/users/DummyAccount/gists{/gist_id}",
  339. "starred_url": "https://api.github.com/users/DummyAccount/starred{/owner}{/repo}",
  340. "subscriptions_url": "https://api.github.com/users/DummyAccount/subscriptions",
  341. "organizations_url": "https://api.github.com/users/DummyAccount/orgs",
  342. "repos_url": "https://api.github.com/users/DummyAccount/repos",
  343. "events_url": "https://api.github.com/users/DummyAccount/events{/privacy}",
  344. "received_events_url": "https://api.github.com/users/DummyAccount/received_events",
  345. "type": "User",
  346. "site_admin": false
  347. }
  348. }`,
  349. "[<u>DummyAccount/arepo</u>] DummyAccount commented on DummyAccount's <b>issue #15</b>: aaaaaa - https://github.com/DummyAccount/arepo/issues/15",
  350. "DummyAccount/arepo", "issue_comment",
  351. },
  352. // ==================================================================
  353. {
  354. "push",
  355. `{
  356. "ref": "refs/heads/develop",
  357. "before": "352fe606a8ca6f732ad832d8443009599bcb33a8",
  358. "after": "4a05c601f6b806110e63160cf7cf41b37787461f",
  359. "created": false,
  360. "deleted": false,
  361. "forced": false,
  362. "base_ref": "refs/heads/markjh/disable_jenkins_synchrotron",
  363. "compare": "https://github.com/matrix-org/sytest/compare/352fe606a8ca...4a05c601f6b8",
  364. "commits": [
  365. {
  366. "id": "38367e20fe0f479d6eaaf0407c1e10ec0dadf52b",
  367. "tree_id": "618cf94bc0babe49377ab4a2c790a4749cc46c99",
  368. "distinct": false,
  369. "message": "Fix arguments to postgres connector to work with go",
  370. "timestamp": "2016-06-08T14:02:42+01:00",
  371. "url": "https://github.com/matrix-org/sytest/commit/38367e20fe0f479d6eaaf0407c1e10ec0dadf52b",
  372. "author": {
  373. "name": "Mark Haines",
  374. "email": "mark.haines@matrix.org",
  375. "username": "NegativeMjark"
  376. },
  377. "committer": {
  378. "name": "Mark Haines",
  379. "email": "mark.haines@matrix.org",
  380. "username": "NegativeMjark"
  381. },
  382. "added": [
  383. ],
  384. "removed": [
  385. ],
  386. "modified": [
  387. "jenkins/prep_sytest_for_postgres.sh"
  388. ]
  389. },
  390. {
  391. "id": "4a05c601f6b806110e63160cf7cf41b37787461f",
  392. "tree_id": "c97850f05b804882cbb746be123f110ce05311f7",
  393. "distinct": false,
  394. "message": "Add necessary info to the second postgres db",
  395. "timestamp": "2016-06-08T14:22:52+01:00",
  396. "url": "https://github.com/matrix-org/sytest/commit/4a05c601f6b806110e63160cf7cf41b37787461f",
  397. "author": {
  398. "name": "Mark Haines",
  399. "email": "mark.haines@matrix.org",
  400. "username": "NegativeMjark"
  401. },
  402. "committer": {
  403. "name": "Mark Haines",
  404. "email": "mark.haines@matrix.org",
  405. "username": "NegativeMjark"
  406. },
  407. "added": [
  408. ],
  409. "removed": [
  410. ],
  411. "modified": [
  412. "jenkins/prep_sytest_for_postgres.sh"
  413. ]
  414. }
  415. ],
  416. "head_commit": {
  417. "id": "4a05c601f6b806110e63160cf7cf41b37787461f",
  418. "tree_id": "c97850f05b804882cbb746be123f110ce05311f7",
  419. "distinct": false,
  420. "message": "Add necessary info to the second postgres db",
  421. "timestamp": "2016-06-08T14:22:52+01:00",
  422. "url": "https://github.com/matrix-org/sytest/commit/4a05c601f6b806110e63160cf7cf41b37787461f",
  423. "author": {
  424. "name": "Mark Haines",
  425. "email": "mark.haines@matrix.org",
  426. "username": "NegativeMjark"
  427. },
  428. "committer": {
  429. "name": "Mark Haines",
  430. "email": "mark.haines@matrix.org",
  431. "username": "NegativeMjark"
  432. },
  433. "added": [
  434. ],
  435. "removed": [
  436. ],
  437. "modified": [
  438. "jenkins/prep_sytest_for_postgres.sh"
  439. ]
  440. },
  441. "repository": {
  442. "id": 23436169,
  443. "name": "sytest",
  444. "full_name": "matrix-org/sytest",
  445. "owner": {
  446. "name": "matrix-org",
  447. "email": "matrix@matrix.org"
  448. },
  449. "private": false,
  450. "html_url": "https://github.com/matrix-org/sytest",
  451. "description": "Black-box integration testing for Matrix homeservers",
  452. "fork": false,
  453. "url": "https://github.com/matrix-org/sytest",
  454. "forks_url": "https://api.github.com/repos/matrix-org/sytest/forks",
  455. "keys_url": "https://api.github.com/repos/matrix-org/sytest/keys{/key_id}",
  456. "collaborators_url": "https://api.github.com/repos/matrix-org/sytest/collaborators{/collaborator}",
  457. "teams_url": "https://api.github.com/repos/matrix-org/sytest/teams",
  458. "hooks_url": "https://api.github.com/repos/matrix-org/sytest/hooks",
  459. "issue_events_url": "https://api.github.com/repos/matrix-org/sytest/issues/events{/number}",
  460. "events_url": "https://api.github.com/repos/matrix-org/sytest/events",
  461. "assignees_url": "https://api.github.com/repos/matrix-org/sytest/assignees{/user}",
  462. "branches_url": "https://api.github.com/repos/matrix-org/sytest/branches{/branch}",
  463. "tags_url": "https://api.github.com/repos/matrix-org/sytest/tags",
  464. "blobs_url": "https://api.github.com/repos/matrix-org/sytest/git/blobs{/sha}",
  465. "git_tags_url": "https://api.github.com/repos/matrix-org/sytest/git/tags{/sha}",
  466. "git_refs_url": "https://api.github.com/repos/matrix-org/sytest/git/refs{/sha}",
  467. "trees_url": "https://api.github.com/repos/matrix-org/sytest/git/trees{/sha}",
  468. "statuses_url": "https://api.github.com/repos/matrix-org/sytest/statuses/{sha}",
  469. "languages_url": "https://api.github.com/repos/matrix-org/sytest/languages",
  470. "stargazers_url": "https://api.github.com/repos/matrix-org/sytest/stargazers",
  471. "contributors_url": "https://api.github.com/repos/matrix-org/sytest/contributors",
  472. "subscribers_url": "https://api.github.com/repos/matrix-org/sytest/subscribers",
  473. "subscription_url": "https://api.github.com/repos/matrix-org/sytest/subscription",
  474. "commits_url": "https://api.github.com/repos/matrix-org/sytest/commits{/sha}",
  475. "git_commits_url": "https://api.github.com/repos/matrix-org/sytest/git/commits{/sha}",
  476. "comments_url": "https://api.github.com/repos/matrix-org/sytest/comments{/number}",
  477. "issue_comment_url": "https://api.github.com/repos/matrix-org/sytest/issues/comments{/number}",
  478. "contents_url": "https://api.github.com/repos/matrix-org/sytest/contents/{+path}",
  479. "compare_url": "https://api.github.com/repos/matrix-org/sytest/compare/{base}...{head}",
  480. "merges_url": "https://api.github.com/repos/matrix-org/sytest/merges",
  481. "archive_url": "https://api.github.com/repos/matrix-org/sytest/{archive_format}{/ref}",
  482. "downloads_url": "https://api.github.com/repos/matrix-org/sytest/downloads",
  483. "issues_url": "https://api.github.com/repos/matrix-org/sytest/issues{/number}",
  484. "pulls_url": "https://api.github.com/repos/matrix-org/sytest/pulls{/number}",
  485. "milestones_url": "https://api.github.com/repos/matrix-org/sytest/milestones{/number}",
  486. "notifications_url": "https://api.github.com/repos/matrix-org/sytest/notifications{?since,all,participating}",
  487. "labels_url": "https://api.github.com/repos/matrix-org/sytest/labels{/name}",
  488. "releases_url": "https://api.github.com/repos/matrix-org/sytest/releases{/id}",
  489. "deployments_url": "https://api.github.com/repos/matrix-org/sytest/deployments",
  490. "created_at": 1409245543,
  491. "updated_at": "2016-01-11T16:43:34Z",
  492. "pushed_at": 1465400172,
  493. "git_url": "git://github.com/matrix-org/sytest.git",
  494. "ssh_url": "git@github.com:matrix-org/sytest.git",
  495. "clone_url": "https://github.com/matrix-org/sytest.git",
  496. "svn_url": "https://github.com/matrix-org/sytest",
  497. "homepage": "",
  498. "size": 1831,
  499. "stargazers_count": 2,
  500. "watchers_count": 2,
  501. "language": "Perl",
  502. "has_issues": true,
  503. "has_downloads": true,
  504. "has_wiki": false,
  505. "has_pages": false,
  506. "forks_count": 0,
  507. "mirror_url": null,
  508. "open_issues_count": 6,
  509. "forks": 0,
  510. "open_issues": 6,
  511. "watchers": 2,
  512. "default_branch": "develop",
  513. "stargazers": 2,
  514. "master_branch": "develop",
  515. "organization": "matrix-org"
  516. },
  517. "pusher": {
  518. "name": "NegativeMjark",
  519. "email": "mjark@negativecurvature.net"
  520. },
  521. "organization": {
  522. "login": "matrix-org",
  523. "id": 8418310,
  524. "url": "https://api.github.com/orgs/matrix-org",
  525. "repos_url": "https://api.github.com/orgs/matrix-org/repos",
  526. "events_url": "https://api.github.com/orgs/matrix-org/events",
  527. "hooks_url": "https://api.github.com/orgs/matrix-org/hooks",
  528. "issues_url": "https://api.github.com/orgs/matrix-org/issues",
  529. "members_url": "https://api.github.com/orgs/matrix-org/members{/member}",
  530. "public_members_url": "https://api.github.com/orgs/matrix-org/public_members{/member}",
  531. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  532. "description": "A new basis for open, interoperable, decentralised real-time communication"
  533. },
  534. "sender": {
  535. "login": "NegativeMjark",
  536. "id": 904009,
  537. "avatar_url": "https://avatars.githubusercontent.com/u/904009?v=3",
  538. "gravatar_id": "",
  539. "url": "https://api.github.com/users/NegativeMjark",
  540. "html_url": "https://github.com/NegativeMjark",
  541. "followers_url": "https://api.github.com/users/NegativeMjark/followers",
  542. "following_url": "https://api.github.com/users/NegativeMjark/following{/other_user}",
  543. "gists_url": "https://api.github.com/users/NegativeMjark/gists{/gist_id}",
  544. "starred_url": "https://api.github.com/users/NegativeMjark/starred{/owner}{/repo}",
  545. "subscriptions_url": "https://api.github.com/users/NegativeMjark/subscriptions",
  546. "organizations_url": "https://api.github.com/users/NegativeMjark/orgs",
  547. "repos_url": "https://api.github.com/users/NegativeMjark/repos",
  548. "events_url": "https://api.github.com/users/NegativeMjark/events{/privacy}",
  549. "received_events_url": "https://api.github.com/users/NegativeMjark/received_events",
  550. "type": "User",
  551. "site_admin": false
  552. }
  553. }`,
  554. "[<u>matrix-org/sytest</u>] NegativeMjark pushed 2 commits to <b>develop</b>: https://github.com/matrix-org/sytest/commit/4a05c601f6b806110e63160cf7cf41b37787461f<br>NegativeMjark: Fix arguments to postgres connector to work with go<br>NegativeMjark: Add necessary info to the second postgres db",
  555. "matrix-org/sytest", "push",
  556. },
  557. // ==================================================================
  558. {
  559. "pull_request",
  560. `{
  561. "action": "assigned",
  562. "number": 303,
  563. "pull_request": {
  564. "url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/303",
  565. "id": 73186698,
  566. "html_url": "https://github.com/matrix-org/matrix-react-sdk/pull/303",
  567. "diff_url": "https://github.com/matrix-org/matrix-react-sdk/pull/303.diff",
  568. "patch_url": "https://github.com/matrix-org/matrix-react-sdk/pull/303.patch",
  569. "issue_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/303",
  570. "number": 303,
  571. "state": "open",
  572. "locked": false,
  573. "title": "Factor out common parts of room creation",
  574. "user": {
  575. "login": "richvdh",
  576. "id": 1389908,
  577. "avatar_url": "https://avatars.githubusercontent.com/u/1389908?v=3",
  578. "gravatar_id": "",
  579. "url": "https://api.github.com/users/richvdh",
  580. "html_url": "https://github.com/richvdh",
  581. "followers_url": "https://api.github.com/users/richvdh/followers",
  582. "following_url": "https://api.github.com/users/richvdh/following{/other_user}",
  583. "gists_url": "https://api.github.com/users/richvdh/gists{/gist_id}",
  584. "starred_url": "https://api.github.com/users/richvdh/starred{/owner}{/repo}",
  585. "subscriptions_url": "https://api.github.com/users/richvdh/subscriptions",
  586. "organizations_url": "https://api.github.com/users/richvdh/orgs",
  587. "repos_url": "https://api.github.com/users/richvdh/repos",
  588. "events_url": "https://api.github.com/users/richvdh/events{/privacy}",
  589. "received_events_url": "https://api.github.com/users/richvdh/received_events",
  590. "type": "User",
  591. "site_admin": false
  592. },
  593. "body": "Take the duplicated code out of MatrixChat and MemberInfo, and put it in a\nseparate 'createRoom' module",
  594. "created_at": "2016-06-09T10:00:02Z",
  595. "updated_at": "2016-06-09T10:00:11Z",
  596. "closed_at": null,
  597. "merged_at": null,
  598. "merge_commit_sha": "162bd3e4c940bcce1de3b98da14827e138121f5d",
  599. "assignee": {
  600. "login": "dbkr",
  601. "id": 986903,
  602. "avatar_url": "https://avatars.githubusercontent.com/u/986903?v=3",
  603. "gravatar_id": "",
  604. "url": "https://api.github.com/users/dbkr",
  605. "html_url": "https://github.com/dbkr",
  606. "followers_url": "https://api.github.com/users/dbkr/followers",
  607. "following_url": "https://api.github.com/users/dbkr/following{/other_user}",
  608. "gists_url": "https://api.github.com/users/dbkr/gists{/gist_id}",
  609. "starred_url": "https://api.github.com/users/dbkr/starred{/owner}{/repo}",
  610. "subscriptions_url": "https://api.github.com/users/dbkr/subscriptions",
  611. "organizations_url": "https://api.github.com/users/dbkr/orgs",
  612. "repos_url": "https://api.github.com/users/dbkr/repos",
  613. "events_url": "https://api.github.com/users/dbkr/events{/privacy}",
  614. "received_events_url": "https://api.github.com/users/dbkr/received_events",
  615. "type": "User",
  616. "site_admin": false
  617. },
  618. "milestone": null,
  619. "commits_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/303/commits",
  620. "review_comments_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/303/comments",
  621. "review_comment_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/comments{/number}",
  622. "comments_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/303/comments",
  623. "statuses_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/statuses/de36aa63fb61c9aee011221e2db6159fe1653ae9",
  624. "head": {
  625. "label": "matrix-org:rav/factor_out_createroom",
  626. "ref": "rav/factor_out_createroom",
  627. "sha": "de36aa63fb61c9aee011221e2db6159fe1653ae9",
  628. "user": {
  629. "login": "matrix-org",
  630. "id": 8418310,
  631. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  632. "gravatar_id": "",
  633. "url": "https://api.github.com/users/matrix-org",
  634. "html_url": "https://github.com/matrix-org",
  635. "followers_url": "https://api.github.com/users/matrix-org/followers",
  636. "following_url": "https://api.github.com/users/matrix-org/following{/other_user}",
  637. "gists_url": "https://api.github.com/users/matrix-org/gists{/gist_id}",
  638. "starred_url": "https://api.github.com/users/matrix-org/starred{/owner}{/repo}",
  639. "subscriptions_url": "https://api.github.com/users/matrix-org/subscriptions",
  640. "organizations_url": "https://api.github.com/users/matrix-org/orgs",
  641. "repos_url": "https://api.github.com/users/matrix-org/repos",
  642. "events_url": "https://api.github.com/users/matrix-org/events{/privacy}",
  643. "received_events_url": "https://api.github.com/users/matrix-org/received_events",
  644. "type": "Organization",
  645. "site_admin": false
  646. },
  647. "repo": {
  648. "id": 37144575,
  649. "name": "matrix-react-sdk",
  650. "full_name": "matrix-org/matrix-react-sdk",
  651. "owner": {
  652. "login": "matrix-org",
  653. "id": 8418310,
  654. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  655. "gravatar_id": "",
  656. "url": "https://api.github.com/users/matrix-org",
  657. "html_url": "https://github.com/matrix-org",
  658. "followers_url": "https://api.github.com/users/matrix-org/followers",
  659. "following_url": "https://api.github.com/users/matrix-org/following{/other_user}",
  660. "gists_url": "https://api.github.com/users/matrix-org/gists{/gist_id}",
  661. "starred_url": "https://api.github.com/users/matrix-org/starred{/owner}{/repo}",
  662. "subscriptions_url": "https://api.github.com/users/matrix-org/subscriptions",
  663. "organizations_url": "https://api.github.com/users/matrix-org/orgs",
  664. "repos_url": "https://api.github.com/users/matrix-org/repos",
  665. "events_url": "https://api.github.com/users/matrix-org/events{/privacy}",
  666. "received_events_url": "https://api.github.com/users/matrix-org/received_events",
  667. "type": "Organization",
  668. "site_admin": false
  669. },
  670. "private": false,
  671. "html_url": "https://github.com/matrix-org/matrix-react-sdk",
  672. "description": "Matrix SDK for React Javascript",
  673. "fork": false,
  674. "url": "https://api.github.com/repos/matrix-org/matrix-react-sdk",
  675. "forks_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/forks",
  676. "keys_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/keys{/key_id}",
  677. "collaborators_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/collaborators{/collaborator}",
  678. "teams_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/teams",
  679. "hooks_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/hooks",
  680. "issue_events_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/events{/number}",
  681. "events_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/events",
  682. "assignees_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/assignees{/user}",
  683. "branches_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/branches{/branch}",
  684. "tags_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/tags",
  685. "blobs_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/blobs{/sha}",
  686. "git_tags_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/tags{/sha}",
  687. "git_refs_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/refs{/sha}",
  688. "trees_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/trees{/sha}",
  689. "statuses_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/statuses/{sha}",
  690. "languages_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/languages",
  691. "stargazers_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/stargazers",
  692. "contributors_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/contributors",
  693. "subscribers_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/subscribers",
  694. "subscription_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/subscription",
  695. "commits_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/commits{/sha}",
  696. "git_commits_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/commits{/sha}",
  697. "comments_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/comments{/number}",
  698. "issue_comment_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/comments{/number}",
  699. "contents_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/contents/{+path}",
  700. "compare_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/compare/{base}...{head}",
  701. "merges_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/merges",
  702. "archive_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/{archive_format}{/ref}",
  703. "downloads_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/downloads",
  704. "issues_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues{/number}",
  705. "pulls_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls{/number}",
  706. "milestones_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/milestones{/number}",
  707. "notifications_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/notifications{?since,all,participating}",
  708. "labels_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/labels{/name}",
  709. "releases_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/releases{/id}",
  710. "deployments_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/deployments",
  711. "created_at": "2015-06-09T16:37:07Z",
  712. "updated_at": "2016-06-07T11:20:20Z",
  713. "pushed_at": "2016-06-09T10:00:02Z",
  714. "git_url": "git://github.com/matrix-org/matrix-react-sdk.git",
  715. "ssh_url": "git@github.com:matrix-org/matrix-react-sdk.git",
  716. "clone_url": "https://github.com/matrix-org/matrix-react-sdk.git",
  717. "svn_url": "https://github.com/matrix-org/matrix-react-sdk",
  718. "homepage": null,
  719. "size": 2721,
  720. "stargazers_count": 35,
  721. "watchers_count": 35,
  722. "language": "JavaScript",
  723. "has_issues": true,
  724. "has_downloads": true,
  725. "has_wiki": false,
  726. "has_pages": false,
  727. "forks_count": 17,
  728. "mirror_url": null,
  729. "open_issues_count": 7,
  730. "forks": 17,
  731. "open_issues": 7,
  732. "watchers": 35,
  733. "default_branch": "master"
  734. }
  735. },
  736. "base": {
  737. "label": "matrix-org:develop",
  738. "ref": "develop",
  739. "sha": "98ef793809a662f4864df75ade0856d0ce52ecd6",
  740. "user": {
  741. "login": "matrix-org",
  742. "id": 8418310,
  743. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  744. "gravatar_id": "",
  745. "url": "https://api.github.com/users/matrix-org",
  746. "html_url": "https://github.com/matrix-org",
  747. "followers_url": "https://api.github.com/users/matrix-org/followers",
  748. "following_url": "https://api.github.com/users/matrix-org/following{/other_user}",
  749. "gists_url": "https://api.github.com/users/matrix-org/gists{/gist_id}",
  750. "starred_url": "https://api.github.com/users/matrix-org/starred{/owner}{/repo}",
  751. "subscriptions_url": "https://api.github.com/users/matrix-org/subscriptions",
  752. "organizations_url": "https://api.github.com/users/matrix-org/orgs",
  753. "repos_url": "https://api.github.com/users/matrix-org/repos",
  754. "events_url": "https://api.github.com/users/matrix-org/events{/privacy}",
  755. "received_events_url": "https://api.github.com/users/matrix-org/received_events",
  756. "type": "Organization",
  757. "site_admin": false
  758. },
  759. "repo": {
  760. "id": 37144575,
  761. "name": "matrix-react-sdk",
  762. "full_name": "matrix-org/matrix-react-sdk",
  763. "owner": {
  764. "login": "matrix-org",
  765. "id": 8418310,
  766. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  767. "gravatar_id": "",
  768. "url": "https://api.github.com/users/matrix-org",
  769. "html_url": "https://github.com/matrix-org",
  770. "followers_url": "https://api.github.com/users/matrix-org/followers",
  771. "following_url": "https://api.github.com/users/matrix-org/following{/other_user}",
  772. "gists_url": "https://api.github.com/users/matrix-org/gists{/gist_id}",
  773. "starred_url": "https://api.github.com/users/matrix-org/starred{/owner}{/repo}",
  774. "subscriptions_url": "https://api.github.com/users/matrix-org/subscriptions",
  775. "organizations_url": "https://api.github.com/users/matrix-org/orgs",
  776. "repos_url": "https://api.github.com/users/matrix-org/repos",
  777. "events_url": "https://api.github.com/users/matrix-org/events{/privacy}",
  778. "received_events_url": "https://api.github.com/users/matrix-org/received_events",
  779. "type": "Organization",
  780. "site_admin": false
  781. },
  782. "private": false,
  783. "html_url": "https://github.com/matrix-org/matrix-react-sdk",
  784. "description": "Matrix SDK for React Javascript",
  785. "fork": false,
  786. "url": "https://api.github.com/repos/matrix-org/matrix-react-sdk",
  787. "forks_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/forks",
  788. "keys_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/keys{/key_id}",
  789. "collaborators_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/collaborators{/collaborator}",
  790. "teams_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/teams",
  791. "hooks_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/hooks",
  792. "issue_events_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/events{/number}",
  793. "events_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/events",
  794. "assignees_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/assignees{/user}",
  795. "branches_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/branches{/branch}",
  796. "tags_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/tags",
  797. "blobs_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/blobs{/sha}",
  798. "git_tags_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/tags{/sha}",
  799. "git_refs_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/refs{/sha}",
  800. "trees_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/trees{/sha}",
  801. "statuses_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/statuses/{sha}",
  802. "languages_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/languages",
  803. "stargazers_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/stargazers",
  804. "contributors_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/contributors",
  805. "subscribers_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/subscribers",
  806. "subscription_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/subscription",
  807. "commits_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/commits{/sha}",
  808. "git_commits_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/commits{/sha}",
  809. "comments_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/comments{/number}",
  810. "issue_comment_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/comments{/number}",
  811. "contents_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/contents/{+path}",
  812. "compare_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/compare/{base}...{head}",
  813. "merges_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/merges",
  814. "archive_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/{archive_format}{/ref}",
  815. "downloads_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/downloads",
  816. "issues_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues{/number}",
  817. "pulls_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls{/number}",
  818. "milestones_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/milestones{/number}",
  819. "notifications_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/notifications{?since,all,participating}",
  820. "labels_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/labels{/name}",
  821. "releases_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/releases{/id}",
  822. "deployments_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/deployments",
  823. "created_at": "2015-06-09T16:37:07Z",
  824. "updated_at": "2016-06-07T11:20:20Z",
  825. "pushed_at": "2016-06-09T10:00:02Z",
  826. "git_url": "git://github.com/matrix-org/matrix-react-sdk.git",
  827. "ssh_url": "git@github.com:matrix-org/matrix-react-sdk.git",
  828. "clone_url": "https://github.com/matrix-org/matrix-react-sdk.git",
  829. "svn_url": "https://github.com/matrix-org/matrix-react-sdk",
  830. "homepage": null,
  831. "size": 2721,
  832. "stargazers_count": 35,
  833. "watchers_count": 35,
  834. "language": "JavaScript",
  835. "has_issues": true,
  836. "has_downloads": true,
  837. "has_wiki": false,
  838. "has_pages": false,
  839. "forks_count": 17,
  840. "mirror_url": null,
  841. "open_issues_count": 7,
  842. "forks": 17,
  843. "open_issues": 7,
  844. "watchers": 35,
  845. "default_branch": "master"
  846. }
  847. },
  848. "_links": {
  849. "self": {
  850. "href": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/303"
  851. },
  852. "html": {
  853. "href": "https://github.com/matrix-org/matrix-react-sdk/pull/303"
  854. },
  855. "issue": {
  856. "href": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/303"
  857. },
  858. "comments": {
  859. "href": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/303/comments"
  860. },
  861. "review_comments": {
  862. "href": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/303/comments"
  863. },
  864. "review_comment": {
  865. "href": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/comments{/number}"
  866. },
  867. "commits": {
  868. "href": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls/303/commits"
  869. },
  870. "statuses": {
  871. "href": "https://api.github.com/repos/matrix-org/matrix-react-sdk/statuses/de36aa63fb61c9aee011221e2db6159fe1653ae9"
  872. }
  873. },
  874. "merged": false,
  875. "mergeable": true,
  876. "mergeable_state": "clean",
  877. "merged_by": null,
  878. "comments": 0,
  879. "review_comments": 0,
  880. "commits": 1,
  881. "additions": 97,
  882. "deletions": 86,
  883. "changed_files": 3
  884. },
  885. "assignee": {
  886. "login": "dbkr",
  887. "id": 986903,
  888. "avatar_url": "https://avatars.githubusercontent.com/u/986903?v=3",
  889. "gravatar_id": "",
  890. "url": "https://api.github.com/users/dbkr",
  891. "html_url": "https://github.com/dbkr",
  892. "followers_url": "https://api.github.com/users/dbkr/followers",
  893. "following_url": "https://api.github.com/users/dbkr/following{/other_user}",
  894. "gists_url": "https://api.github.com/users/dbkr/gists{/gist_id}",
  895. "starred_url": "https://api.github.com/users/dbkr/starred{/owner}{/repo}",
  896. "subscriptions_url": "https://api.github.com/users/dbkr/subscriptions",
  897. "organizations_url": "https://api.github.com/users/dbkr/orgs",
  898. "repos_url": "https://api.github.com/users/dbkr/repos",
  899. "events_url": "https://api.github.com/users/dbkr/events{/privacy}",
  900. "received_events_url": "https://api.github.com/users/dbkr/received_events",
  901. "type": "User",
  902. "site_admin": false
  903. },
  904. "repository": {
  905. "id": 37144575,
  906. "name": "matrix-react-sdk",
  907. "full_name": "matrix-org/matrix-react-sdk",
  908. "owner": {
  909. "login": "matrix-org",
  910. "id": 8418310,
  911. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  912. "gravatar_id": "",
  913. "url": "https://api.github.com/users/matrix-org",
  914. "html_url": "https://github.com/matrix-org",
  915. "followers_url": "https://api.github.com/users/matrix-org/followers",
  916. "following_url": "https://api.github.com/users/matrix-org/following{/other_user}",
  917. "gists_url": "https://api.github.com/users/matrix-org/gists{/gist_id}",
  918. "starred_url": "https://api.github.com/users/matrix-org/starred{/owner}{/repo}",
  919. "subscriptions_url": "https://api.github.com/users/matrix-org/subscriptions",
  920. "organizations_url": "https://api.github.com/users/matrix-org/orgs",
  921. "repos_url": "https://api.github.com/users/matrix-org/repos",
  922. "events_url": "https://api.github.com/users/matrix-org/events{/privacy}",
  923. "received_events_url": "https://api.github.com/users/matrix-org/received_events",
  924. "type": "Organization",
  925. "site_admin": false
  926. },
  927. "private": false,
  928. "html_url": "https://github.com/matrix-org/matrix-react-sdk",
  929. "description": "Matrix SDK for React Javascript",
  930. "fork": false,
  931. "url": "https://api.github.com/repos/matrix-org/matrix-react-sdk",
  932. "forks_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/forks",
  933. "keys_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/keys{/key_id}",
  934. "collaborators_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/collaborators{/collaborator}",
  935. "teams_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/teams",
  936. "hooks_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/hooks",
  937. "issue_events_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/events{/number}",
  938. "events_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/events",
  939. "assignees_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/assignees{/user}",
  940. "branches_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/branches{/branch}",
  941. "tags_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/tags",
  942. "blobs_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/blobs{/sha}",
  943. "git_tags_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/tags{/sha}",
  944. "git_refs_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/refs{/sha}",
  945. "trees_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/trees{/sha}",
  946. "statuses_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/statuses/{sha}",
  947. "languages_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/languages",
  948. "stargazers_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/stargazers",
  949. "contributors_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/contributors",
  950. "subscribers_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/subscribers",
  951. "subscription_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/subscription",
  952. "commits_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/commits{/sha}",
  953. "git_commits_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/git/commits{/sha}",
  954. "comments_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/comments{/number}",
  955. "issue_comment_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues/comments{/number}",
  956. "contents_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/contents/{+path}",
  957. "compare_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/compare/{base}...{head}",
  958. "merges_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/merges",
  959. "archive_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/{archive_format}{/ref}",
  960. "downloads_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/downloads",
  961. "issues_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/issues{/number}",
  962. "pulls_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/pulls{/number}",
  963. "milestones_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/milestones{/number}",
  964. "notifications_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/notifications{?since,all,participating}",
  965. "labels_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/labels{/name}",
  966. "releases_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/releases{/id}",
  967. "deployments_url": "https://api.github.com/repos/matrix-org/matrix-react-sdk/deployments",
  968. "created_at": "2015-06-09T16:37:07Z",
  969. "updated_at": "2016-06-07T11:20:20Z",
  970. "pushed_at": "2016-06-09T10:00:02Z",
  971. "git_url": "git://github.com/matrix-org/matrix-react-sdk.git",
  972. "ssh_url": "git@github.com:matrix-org/matrix-react-sdk.git",
  973. "clone_url": "https://github.com/matrix-org/matrix-react-sdk.git",
  974. "svn_url": "https://github.com/matrix-org/matrix-react-sdk",
  975. "homepage": null,
  976. "size": 2721,
  977. "stargazers_count": 35,
  978. "watchers_count": 35,
  979. "language": "JavaScript",
  980. "has_issues": true,
  981. "has_downloads": true,
  982. "has_wiki": false,
  983. "has_pages": false,
  984. "forks_count": 17,
  985. "mirror_url": null,
  986. "open_issues_count": 7,
  987. "forks": 17,
  988. "open_issues": 7,
  989. "watchers": 35,
  990. "default_branch": "master"
  991. },
  992. "organization": {
  993. "login": "matrix-org",
  994. "id": 8418310,
  995. "url": "https://api.github.com/orgs/matrix-org",
  996. "repos_url": "https://api.github.com/orgs/matrix-org/repos",
  997. "events_url": "https://api.github.com/orgs/matrix-org/events",
  998. "hooks_url": "https://api.github.com/orgs/matrix-org/hooks",
  999. "issues_url": "https://api.github.com/orgs/matrix-org/issues",
  1000. "members_url": "https://api.github.com/orgs/matrix-org/members{/member}",
  1001. "public_members_url": "https://api.github.com/orgs/matrix-org/public_members{/member}",
  1002. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  1003. "description": "A new basis for open, interoperable, decentralised real-time communication"
  1004. },
  1005. "sender": {
  1006. "login": "richvdh",
  1007. "id": 1389908,
  1008. "avatar_url": "https://avatars.githubusercontent.com/u/1389908?v=3",
  1009. "gravatar_id": "",
  1010. "url": "https://api.github.com/users/richvdh",
  1011. "html_url": "https://github.com/richvdh",
  1012. "followers_url": "https://api.github.com/users/richvdh/followers",
  1013. "following_url": "https://api.github.com/users/richvdh/following{/other_user}",
  1014. "gists_url": "https://api.github.com/users/richvdh/gists{/gist_id}",
  1015. "starred_url": "https://api.github.com/users/richvdh/starred{/owner}{/repo}",
  1016. "subscriptions_url": "https://api.github.com/users/richvdh/subscriptions",
  1017. "organizations_url": "https://api.github.com/users/richvdh/orgs",
  1018. "repos_url": "https://api.github.com/users/richvdh/repos",
  1019. "events_url": "https://api.github.com/users/richvdh/events{/privacy}",
  1020. "received_events_url": "https://api.github.com/users/richvdh/received_events",
  1021. "type": "User",
  1022. "site_admin": false
  1023. }
  1024. }`,
  1025. "[<u>matrix-org/matrix-react-sdk</u>] richvdh assigned <b>pull request #303</b>: Factor out common parts of room creation [open] to dbkr - https://github.com/matrix-org/matrix-react-sdk/pull/303",
  1026. "matrix-org/matrix-react-sdk", "assignments",
  1027. },
  1028. // ==================================================================
  1029. {
  1030. "pull_request_review_comment",
  1031. `{
  1032. "action": "created",
  1033. "comment": {
  1034. "url": "https://api.github.com/repos/matrix-org/synapse/pulls/comments/66413356",
  1035. "id": 66413356,
  1036. "diff_hunk": "@@ -388,8 +388,8 @@ def get_or_create_user(self, localpart, displayname, duration_seconds):\n \n user = UserID(localpart, self.hs.hostname)\n user_id = user.to_string()\n- auth_handler = self.hs.get_handlers().auth_handler\n- token = auth_handler.generate_short_term_login_token(user_id, duration_seconds)\n+ token = self.auth_handler().generate_short_term_login_token(\n+ user_id, duration_seconds)",
  1037. "path": "synapse/handlers/register.py",
  1038. "position": 7,
  1039. "original_position": 7,
  1040. "commit_id": "6e7dc7c7dde377794c23d5db6f25ffacfb08e82a",
  1041. "original_commit_id": "6e7dc7c7dde377794c23d5db6f25ffacfb08e82a",
  1042. "user": {
  1043. "login": "erikjohnston",
  1044. "id": 8428120,
  1045. "avatar_url": "https://avatars.githubusercontent.com/u/8428120?v=3",
  1046. "gravatar_id": "",
  1047. "url": "https://api.github.com/users/erikjohnston",
  1048. "html_url": "https://github.com/erikjohnston",
  1049. "followers_url": "https://api.github.com/users/erikjohnston/followers",
  1050. "following_url": "https://api.github.com/users/erikjohnston/following{/other_user}",
  1051. "gists_url": "https://api.github.com/users/erikjohnston/gists{/gist_id}",
  1052. "starred_url": "https://api.github.com/users/erikjohnston/starred{/owner}{/repo}",
  1053. "subscriptions_url": "https://api.github.com/users/erikjohnston/subscriptions",
  1054. "organizations_url": "https://api.github.com/users/erikjohnston/orgs",
  1055. "repos_url": "https://api.github.com/users/erikjohnston/repos",
  1056. "events_url": "https://api.github.com/users/erikjohnston/events{/privacy}",
  1057. "received_events_url": "https://api.github.com/users/erikjohnston/received_events",
  1058. "type": "User",
  1059. "site_admin": false
  1060. },
  1061. "body": "Code style wise we prefer the closing parenthesis to be on a new line",
  1062. "created_at": "2016-06-09T10:00:43Z",
  1063. "updated_at": "2016-06-09T10:00:43Z",
  1064. "html_url": "https://github.com/matrix-org/synapse/pull/860#discussion_r66413356",
  1065. "pull_request_url": "https://api.github.com/repos/matrix-org/synapse/pulls/860",
  1066. "_links": {
  1067. "self": {
  1068. "href": "https://api.github.com/repos/matrix-org/synapse/pulls/comments/66413356"
  1069. },
  1070. "html": {
  1071. "href": "https://github.com/matrix-org/synapse/pull/860#discussion_r66413356"
  1072. },
  1073. "pull_request": {
  1074. "href": "https://api.github.com/repos/matrix-org/synapse/pulls/860"
  1075. }
  1076. }
  1077. },
  1078. "pull_request": {
  1079. "url": "https://api.github.com/repos/matrix-org/synapse/pulls/860",
  1080. "id": 73166014,
  1081. "html_url": "https://github.com/matrix-org/synapse/pull/860",
  1082. "diff_url": "https://github.com/matrix-org/synapse/pull/860.diff",
  1083. "patch_url": "https://github.com/matrix-org/synapse/pull/860.patch",
  1084. "issue_url": "https://api.github.com/repos/matrix-org/synapse/issues/860",
  1085. "number": 860,
  1086. "state": "open",
  1087. "locked": false,
  1088. "title": "Fix a bug caused by a change in auth_handler function",
  1089. "user": {
  1090. "login": "negzi",
  1091. "id": 6698393,
  1092. "avatar_url": "https://avatars.githubusercontent.com/u/6698393?v=3",
  1093. "gravatar_id": "",
  1094. "url": "https://api.github.com/users/negzi",
  1095. "html_url": "https://github.com/negzi",
  1096. "followers_url": "https://api.github.com/users/negzi/followers",
  1097. "following_url": "https://api.github.com/users/negzi/following{/other_user}",
  1098. "gists_url": "https://api.github.com/users/negzi/gists{/gist_id}",
  1099. "starred_url": "https://api.github.com/users/negzi/starred{/owner}{/repo}",
  1100. "subscriptions_url": "https://api.github.com/users/negzi/subscriptions",
  1101. "organizations_url": "https://api.github.com/users/negzi/orgs",
  1102. "repos_url": "https://api.github.com/users/negzi/repos",
  1103. "events_url": "https://api.github.com/users/negzi/events{/privacy}",
  1104. "received_events_url": "https://api.github.com/users/negzi/received_events",
  1105. "type": "User",
  1106. "site_admin": false
  1107. },
  1108. "body": "Fix a bug caused by a change in auth_handler function\r\nalso fix the relevant unit test cases",
  1109. "created_at": "2016-06-09T07:03:30Z",
  1110. "updated_at": "2016-06-09T10:00:43Z",
  1111. "closed_at": null,
  1112. "merged_at": null,
  1113. "merge_commit_sha": "1ceebdb4f9cf46d32e04bc411276bb17e1150fce",
  1114. "assignee": null,
  1115. "milestone": null,
  1116. "commits_url": "https://api.github.com/repos/matrix-org/synapse/pulls/860/commits",
  1117. "review_comments_url": "https://api.github.com/repos/matrix-org/synapse/pulls/860/comments",
  1118. "review_comment_url": "https://api.github.com/repos/matrix-org/synapse/pulls/comments{/number}",
  1119. "comments_url": "https://api.github.com/repos/matrix-org/synapse/issues/860/comments",
  1120. "statuses_url": "https://api.github.com/repos/matrix-org/synapse/statuses/6e7dc7c7dde377794c23d5db6f25ffacfb08e82a",
  1121. "head": {
  1122. "label": "negzi:bug_fix_get_or_create_user",
  1123. "ref": "bug_fix_get_or_create_user",
  1124. "sha": "6e7dc7c7dde377794c23d5db6f25ffacfb08e82a",
  1125. "user": {
  1126. "login": "negzi",
  1127. "id": 6698393,
  1128. "avatar_url": "https://avatars.githubusercontent.com/u/6698393?v=3",
  1129. "gravatar_id": "",
  1130. "url": "https://api.github.com/users/negzi",
  1131. "html_url": "https://github.com/negzi",
  1132. "followers_url": "https://api.github.com/users/negzi/followers",
  1133. "following_url": "https://api.github.com/users/negzi/following{/other_user}",
  1134. "gists_url": "https://api.github.com/users/negzi/gists{/gist_id}",
  1135. "starred_url": "https://api.github.com/users/negzi/starred{/owner}{/repo}",
  1136. "subscriptions_url": "https://api.github.com/users/negzi/subscriptions",
  1137. "organizations_url": "https://api.github.com/users/negzi/orgs",
  1138. "repos_url": "https://api.github.com/users/negzi/repos",
  1139. "events_url": "https://api.github.com/users/negzi/events{/privacy}",
  1140. "received_events_url": "https://api.github.com/users/negzi/received_events",
  1141. "type": "User",
  1142. "site_admin": false
  1143. },
  1144. "repo": {
  1145. "id": 60715519,
  1146. "name": "synapse",
  1147. "full_name": "negzi/synapse",
  1148. "owner": {
  1149. "login": "negzi",
  1150. "id": 6698393,
  1151. "avatar_url": "https://avatars.githubusercontent.com/u/6698393?v=3",
  1152. "gravatar_id": "",
  1153. "url": "https://api.github.com/users/negzi",
  1154. "html_url": "https://github.com/negzi",
  1155. "followers_url": "https://api.github.com/users/negzi/followers",
  1156. "following_url": "https://api.github.com/users/negzi/following{/other_user}",
  1157. "gists_url": "https://api.github.com/users/negzi/gists{/gist_id}",
  1158. "starred_url": "https://api.github.com/users/negzi/starred{/owner}{/repo}",
  1159. "subscriptions_url": "https://api.github.com/users/negzi/subscriptions",
  1160. "organizations_url": "https://api.github.com/users/negzi/orgs",
  1161. "repos_url": "https://api.github.com/users/negzi/repos",
  1162. "events_url": "https://api.github.com/users/negzi/events{/privacy}",
  1163. "received_events_url": "https://api.github.com/users/negzi/received_events",
  1164. "type": "User",
  1165. "site_admin": false
  1166. },
  1167. "private": false,
  1168. "html_url": "https://github.com/negzi/synapse",
  1169. "description": "Synapse: Matrix reference homeserver",
  1170. "fork": true,
  1171. "url": "https://api.github.com/repos/negzi/synapse",
  1172. "forks_url": "https://api.github.com/repos/negzi/synapse/forks",
  1173. "keys_url": "https://api.github.com/repos/negzi/synapse/keys{/key_id}",
  1174. "collaborators_url": "https://api.github.com/repos/negzi/synapse/collaborators{/collaborator}",
  1175. "teams_url": "https://api.github.com/repos/negzi/synapse/teams",
  1176. "hooks_url": "https://api.github.com/repos/negzi/synapse/hooks",
  1177. "issue_events_url": "https://api.github.com/repos/negzi/synapse/issues/events{/number}",
  1178. "events_url": "https://api.github.com/repos/negzi/synapse/events",
  1179. "assignees_url": "https://api.github.com/repos/negzi/synapse/assignees{/user}",
  1180. "branches_url": "https://api.github.com/repos/negzi/synapse/branches{/branch}",
  1181. "tags_url": "https://api.github.com/repos/negzi/synapse/tags",
  1182. "blobs_url": "https://api.github.com/repos/negzi/synapse/git/blobs{/sha}",
  1183. "git_tags_url": "https://api.github.com/repos/negzi/synapse/git/tags{/sha}",
  1184. "git_refs_url": "https://api.github.com/repos/negzi/synapse/git/refs{/sha}",
  1185. "trees_url": "https://api.github.com/repos/negzi/synapse/git/trees{/sha}",
  1186. "statuses_url": "https://api.github.com/repos/negzi/synapse/statuses/{sha}",
  1187. "languages_url": "https://api.github.com/repos/negzi/synapse/languages",
  1188. "stargazers_url": "https://api.github.com/repos/negzi/synapse/stargazers",
  1189. "contributors_url": "https://api.github.com/repos/negzi/synapse/contributors",
  1190. "subscribers_url": "https://api.github.com/repos/negzi/synapse/subscribers",
  1191. "subscription_url": "https://api.github.com/repos/negzi/synapse/subscription",
  1192. "commits_url": "https://api.github.com/repos/negzi/synapse/commits{/sha}",
  1193. "git_commits_url": "https://api.github.com/repos/negzi/synapse/git/commits{/sha}",
  1194. "comments_url": "https://api.github.com/repos/negzi/synapse/comments{/number}",
  1195. "issue_comment_url": "https://api.github.com/repos/negzi/synapse/issues/comments{/number}",
  1196. "contents_url": "https://api.github.com/repos/negzi/synapse/contents/{+path}",
  1197. "compare_url": "https://api.github.com/repos/negzi/synapse/compare/{base}...{head}",
  1198. "merges_url": "https://api.github.com/repos/negzi/synapse/merges",
  1199. "archive_url": "https://api.github.com/repos/negzi/synapse/{archive_format}{/ref}",
  1200. "downloads_url": "https://api.github.com/repos/negzi/synapse/downloads",
  1201. "issues_url": "https://api.github.com/repos/negzi/synapse/issues{/number}",
  1202. "pulls_url": "https://api.github.com/repos/negzi/synapse/pulls{/number}",
  1203. "milestones_url": "https://api.github.com/repos/negzi/synapse/milestones{/number}",
  1204. "notifications_url": "https://api.github.com/repos/negzi/synapse/notifications{?since,all,participating}",
  1205. "labels_url": "https://api.github.com/repos/negzi/synapse/labels{/name}",
  1206. "releases_url": "https://api.github.com/repos/negzi/synapse/releases{/id}",
  1207. "deployments_url": "https://api.github.com/repos/negzi/synapse/deployments",
  1208. "created_at": "2016-06-08T17:09:39Z",
  1209. "updated_at": "2016-06-08T17:09:41Z",
  1210. "pushed_at": "2016-06-08T21:26:01Z",
  1211. "git_url": "git://github.com/negzi/synapse.git",
  1212. "ssh_url": "git@github.com:negzi/synapse.git",
  1213. "clone_url": "https://github.com/negzi/synapse.git",
  1214. "svn_url": "https://github.com/negzi/synapse",
  1215. "homepage": "http://matrix.org",
  1216. "size": 11243,
  1217. "stargazers_count": 0,
  1218. "watchers_count": 0,
  1219. "language": "Python",
  1220. "has_issues": false,
  1221. "has_downloads": true,
  1222. "has_wiki": true,
  1223. "has_pages": false,
  1224. "forks_count": 0,
  1225. "mirror_url": null,
  1226. "open_issues_count": 0,
  1227. "forks": 0,
  1228. "open_issues": 0,
  1229. "watchers": 0,
  1230. "default_branch": "master"
  1231. }
  1232. },
  1233. "base": {
  1234. "label": "matrix-org:develop",
  1235. "ref": "develop",
  1236. "sha": "b7fbc9bd9534c88e3c8ffdfab8447d9e9bb6eb75",
  1237. "user": {
  1238. "login": "matrix-org",
  1239. "id": 8418310,
  1240. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  1241. "gravatar_id": "",
  1242. "url": "https://api.github.com/users/matrix-org",
  1243. "html_url": "https://github.com/matrix-org",
  1244. "followers_url": "https://api.github.com/users/matrix-org/followers",
  1245. "following_url": "https://api.github.com/users/matrix-org/following{/other_user}",
  1246. "gists_url": "https://api.github.com/users/matrix-org/gists{/gist_id}",
  1247. "starred_url": "https://api.github.com/users/matrix-org/starred{/owner}{/repo}",
  1248. "subscriptions_url": "https://api.github.com/users/matrix-org/subscriptions",
  1249. "organizations_url": "https://api.github.com/users/matrix-org/orgs",
  1250. "repos_url": "https://api.github.com/users/matrix-org/repos",
  1251. "events_url": "https://api.github.com/users/matrix-org/events{/privacy}",
  1252. "received_events_url": "https://api.github.com/users/matrix-org/received_events",
  1253. "type": "Organization",
  1254. "site_admin": false
  1255. },
  1256. "repo": {
  1257. "id": 22844864,
  1258. "name": "synapse",
  1259. "full_name": "matrix-org/synapse",
  1260. "owner": {
  1261. "login": "matrix-org",
  1262. "id": 8418310,
  1263. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  1264. "gravatar_id": "",
  1265. "url": "https://api.github.com/users/matrix-org",
  1266. "html_url": "https://github.com/matrix-org",
  1267. "followers_url": "https://api.github.com/users/matrix-org/followers",
  1268. "following_url": "https://api.github.com/users/matrix-org/following{/other_user}",
  1269. "gists_url": "https://api.github.com/users/matrix-org/gists{/gist_id}",
  1270. "starred_url": "https://api.github.com/users/matrix-org/starred{/owner}{/repo}",
  1271. "subscriptions_url": "https://api.github.com/users/matrix-org/subscriptions",
  1272. "organizations_url": "https://api.github.com/users/matrix-org/orgs",
  1273. "repos_url": "https://api.github.com/users/matrix-org/repos",
  1274. "events_url": "https://api.github.com/users/matrix-org/events{/privacy}",
  1275. "received_events_url": "https://api.github.com/users/matrix-org/received_events",
  1276. "type": "Organization",
  1277. "site_admin": false
  1278. },
  1279. "private": false,
  1280. "html_url": "https://github.com/matrix-org/synapse",
  1281. "description": "Synapse: Matrix reference homeserver",
  1282. "fork": false,
  1283. "url": "https://api.github.com/repos/matrix-org/synapse",
  1284. "forks_url": "https://api.github.com/repos/matrix-org/synapse/forks",
  1285. "keys_url": "https://api.github.com/repos/matrix-org/synapse/keys{/key_id}",
  1286. "collaborators_url": "https://api.github.com/repos/matrix-org/synapse/collaborators{/collaborator}",
  1287. "teams_url": "https://api.github.com/repos/matrix-org/synapse/teams",
  1288. "hooks_url": "https://api.github.com/repos/matrix-org/synapse/hooks",
  1289. "issue_events_url": "https://api.github.com/repos/matrix-org/synapse/issues/events{/number}",
  1290. "events_url": "https://api.github.com/repos/matrix-org/synapse/events",
  1291. "assignees_url": "https://api.github.com/repos/matrix-org/synapse/assignees{/user}",
  1292. "branches_url": "https://api.github.com/repos/matrix-org/synapse/branches{/branch}",
  1293. "tags_url": "https://api.github.com/repos/matrix-org/synapse/tags",
  1294. "blobs_url": "https://api.github.com/repos/matrix-org/synapse/git/blobs{/sha}",
  1295. "git_tags_url": "https://api.github.com/repos/matrix-org/synapse/git/tags{/sha}",
  1296. "git_refs_url": "https://api.github.com/repos/matrix-org/synapse/git/refs{/sha}",
  1297. "trees_url": "https://api.github.com/repos/matrix-org/synapse/git/trees{/sha}",
  1298. "statuses_url": "https://api.github.com/repos/matrix-org/synapse/statuses/{sha}",
  1299. "languages_url": "https://api.github.com/repos/matrix-org/synapse/languages",
  1300. "stargazers_url": "https://api.github.com/repos/matrix-org/synapse/stargazers",
  1301. "contributors_url": "https://api.github.com/repos/matrix-org/synapse/contributors",
  1302. "subscribers_url": "https://api.github.com/repos/matrix-org/synapse/subscribers",
  1303. "subscription_url": "https://api.github.com/repos/matrix-org/synapse/subscription",
  1304. "commits_url": "https://api.github.com/repos/matrix-org/synapse/commits{/sha}",
  1305. "git_commits_url": "https://api.github.com/repos/matrix-org/synapse/git/commits{/sha}",
  1306. "comments_url": "https://api.github.com/repos/matrix-org/synapse/comments{/number}",
  1307. "issue_comment_url": "https://api.github.com/repos/matrix-org/synapse/issues/comments{/number}",
  1308. "contents_url": "https://api.github.com/repos/matrix-org/synapse/contents/{+path}",
  1309. "compare_url": "https://api.github.com/repos/matrix-org/synapse/compare/{base}...{head}",
  1310. "merges_url": "https://api.github.com/repos/matrix-org/synapse/merges",
  1311. "archive_url": "https://api.github.com/repos/matrix-org/synapse/{archive_format}{/ref}",
  1312. "downloads_url": "https://api.github.com/repos/matrix-org/synapse/downloads",
  1313. "issues_url": "https://api.github.com/repos/matrix-org/synapse/issues{/number}",
  1314. "pulls_url": "https://api.github.com/repos/matrix-org/synapse/pulls{/number}",
  1315. "milestones_url": "https://api.github.com/repos/matrix-org/synapse/milestones{/number}",
  1316. "notifications_url": "https://api.github.com/repos/matrix-org/synapse/notifications{?since,all,participating}",
  1317. "labels_url": "https://api.github.com/repos/matrix-org/synapse/labels{/name}",
  1318. "releases_url": "https://api.github.com/repos/matrix-org/synapse/releases{/id}",
  1319. "deployments_url": "https://api.github.com/repos/matrix-org/synapse/deployments",
  1320. "created_at": "2014-08-11T15:51:42Z",
  1321. "updated_at": "2016-06-09T00:24:47Z",
  1322. "pushed_at": "2016-06-09T09:58:32Z",
  1323. "git_url": "git://github.com/matrix-org/synapse.git",
  1324. "ssh_url": "git@github.com:matrix-org/synapse.git",
  1325. "clone_url": "https://github.com/matrix-org/synapse.git",
  1326. "svn_url": "https://github.com/matrix-org/synapse",
  1327. "homepage": "http://matrix.org",
  1328. "size": 17364,
  1329. "stargazers_count": 899,
  1330. "watchers_count": 899,
  1331. "language": "Python",
  1332. "has_issues": true,
  1333. "has_downloads": true,
  1334. "has_wiki": true,
  1335. "has_pages": false,
  1336. "forks_count": 92,
  1337. "mirror_url": null,
  1338. "open_issues_count": 16,
  1339. "forks": 92,
  1340. "open_issues": 16,
  1341. "watchers": 899,
  1342. "default_branch": "master"
  1343. }
  1344. },
  1345. "_links": {
  1346. "self": {
  1347. "href": "https://api.github.com/repos/matrix-org/synapse/pulls/860"
  1348. },
  1349. "html": {
  1350. "href": "https://github.com/matrix-org/synapse/pull/860"
  1351. },
  1352. "issue": {
  1353. "href": "https://api.github.com/repos/matrix-org/synapse/issues/860"
  1354. },
  1355. "comments": {
  1356. "href": "https://api.github.com/repos/matrix-org/synapse/issues/860/comments"
  1357. },
  1358. "review_comments": {
  1359. "href": "https://api.github.com/repos/matrix-org/synapse/pulls/860/comments"
  1360. },
  1361. "review_comment": {
  1362. "href": "https://api.github.com/repos/matrix-org/synapse/pulls/comments{/number}"
  1363. },
  1364. "commits": {
  1365. "href": "https://api.github.com/repos/matrix-org/synapse/pulls/860/commits"
  1366. },
  1367. "statuses": {
  1368. "href": "https://api.github.com/repos/matrix-org/synapse/statuses/6e7dc7c7dde377794c23d5db6f25ffacfb08e82a"
  1369. }
  1370. }
  1371. },
  1372. "repository": {
  1373. "id": 22844864,
  1374. "name": "synapse",
  1375. "full_name": "matrix-org/synapse",
  1376. "owner": {
  1377. "login": "matrix-org",
  1378. "id": 8418310,
  1379. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  1380. "gravatar_id": "",
  1381. "url": "https://api.github.com/users/matrix-org",
  1382. "html_url": "https://github.com/matrix-org",
  1383. "followers_url": "https://api.github.com/users/matrix-org/followers",
  1384. "following_url": "https://api.github.com/users/matrix-org/following{/other_user}",
  1385. "gists_url": "https://api.github.com/users/matrix-org/gists{/gist_id}",
  1386. "starred_url": "https://api.github.com/users/matrix-org/starred{/owner}{/repo}",
  1387. "subscriptions_url": "https://api.github.com/users/matrix-org/subscriptions",
  1388. "organizations_url": "https://api.github.com/users/matrix-org/orgs",
  1389. "repos_url": "https://api.github.com/users/matrix-org/repos",
  1390. "events_url": "https://api.github.com/users/matrix-org/events{/privacy}",
  1391. "received_events_url": "https://api.github.com/users/matrix-org/received_events",
  1392. "type": "Organization",
  1393. "site_admin": false
  1394. },
  1395. "private": false,
  1396. "html_url": "https://github.com/matrix-org/synapse",
  1397. "description": "Synapse: Matrix reference homeserver",
  1398. "fork": false,
  1399. "url": "https://api.github.com/repos/matrix-org/synapse",
  1400. "forks_url": "https://api.github.com/repos/matrix-org/synapse/forks",
  1401. "keys_url": "https://api.github.com/repos/matrix-org/synapse/keys{/key_id}",
  1402. "collaborators_url": "https://api.github.com/repos/matrix-org/synapse/collaborators{/collaborator}",
  1403. "teams_url": "https://api.github.com/repos/matrix-org/synapse/teams",
  1404. "hooks_url": "https://api.github.com/repos/matrix-org/synapse/hooks",
  1405. "issue_events_url": "https://api.github.com/repos/matrix-org/synapse/issues/events{/number}",
  1406. "events_url": "https://api.github.com/repos/matrix-org/synapse/events",
  1407. "assignees_url": "https://api.github.com/repos/matrix-org/synapse/assignees{/user}",
  1408. "branches_url": "https://api.github.com/repos/matrix-org/synapse/branches{/branch}",
  1409. "tags_url": "https://api.github.com/repos/matrix-org/synapse/tags",
  1410. "blobs_url": "https://api.github.com/repos/matrix-org/synapse/git/blobs{/sha}",
  1411. "git_tags_url": "https://api.github.com/repos/matrix-org/synapse/git/tags{/sha}",
  1412. "git_refs_url": "https://api.github.com/repos/matrix-org/synapse/git/refs{/sha}",
  1413. "trees_url": "https://api.github.com/repos/matrix-org/synapse/git/trees{/sha}",
  1414. "statuses_url": "https://api.github.com/repos/matrix-org/synapse/statuses/{sha}",
  1415. "languages_url": "https://api.github.com/repos/matrix-org/synapse/languages",
  1416. "stargazers_url": "https://api.github.com/repos/matrix-org/synapse/stargazers",
  1417. "contributors_url": "https://api.github.com/repos/matrix-org/synapse/contributors",
  1418. "subscribers_url": "https://api.github.com/repos/matrix-org/synapse/subscribers",
  1419. "subscription_url": "https://api.github.com/repos/matrix-org/synapse/subscription",
  1420. "commits_url": "https://api.github.com/repos/matrix-org/synapse/commits{/sha}",
  1421. "git_commits_url": "https://api.github.com/repos/matrix-org/synapse/git/commits{/sha}",
  1422. "comments_url": "https://api.github.com/repos/matrix-org/synapse/comments{/number}",
  1423. "issue_comment_url": "https://api.github.com/repos/matrix-org/synapse/issues/comments{/number}",
  1424. "contents_url": "https://api.github.com/repos/matrix-org/synapse/contents/{+path}",
  1425. "compare_url": "https://api.github.com/repos/matrix-org/synapse/compare/{base}...{head}",
  1426. "merges_url": "https://api.github.com/repos/matrix-org/synapse/merges",
  1427. "archive_url": "https://api.github.com/repos/matrix-org/synapse/{archive_format}{/ref}",
  1428. "downloads_url": "https://api.github.com/repos/matrix-org/synapse/downloads",
  1429. "issues_url": "https://api.github.com/repos/matrix-org/synapse/issues{/number}",
  1430. "pulls_url": "https://api.github.com/repos/matrix-org/synapse/pulls{/number}",
  1431. "milestones_url": "https://api.github.com/repos/matrix-org/synapse/milestones{/number}",
  1432. "notifications_url": "https://api.github.com/repos/matrix-org/synapse/notifications{?since,all,participating}",
  1433. "labels_url": "https://api.github.com/repos/matrix-org/synapse/labels{/name}",
  1434. "releases_url": "https://api.github.com/repos/matrix-org/synapse/releases{/id}",
  1435. "deployments_url": "https://api.github.com/repos/matrix-org/synapse/deployments",
  1436. "created_at": "2014-08-11T15:51:42Z",
  1437. "updated_at": "2016-06-09T00:24:47Z",
  1438. "pushed_at": "2016-06-09T09:58:32Z",
  1439. "git_url": "git://github.com/matrix-org/synapse.git",
  1440. "ssh_url": "git@github.com:matrix-org/synapse.git",
  1441. "clone_url": "https://github.com/matrix-org/synapse.git",
  1442. "svn_url": "https://github.com/matrix-org/synapse",
  1443. "homepage": "http://matrix.org",
  1444. "size": 17364,
  1445. "stargazers_count": 899,
  1446. "watchers_count": 899,
  1447. "language": "Python",
  1448. "has_issues": true,
  1449. "has_downloads": true,
  1450. "has_wiki": true,
  1451. "has_pages": false,
  1452. "forks_count": 92,
  1453. "mirror_url": null,
  1454. "open_issues_count": 16,
  1455. "forks": 92,
  1456. "open_issues": 16,
  1457. "watchers": 899,
  1458. "default_branch": "master"
  1459. },
  1460. "organization": {
  1461. "login": "matrix-org",
  1462. "id": 8418310,
  1463. "url": "https://api.github.com/orgs/matrix-org",
  1464. "repos_url": "https://api.github.com/orgs/matrix-org/repos",
  1465. "events_url": "https://api.github.com/orgs/matrix-org/events",
  1466. "hooks_url": "https://api.github.com/orgs/matrix-org/hooks",
  1467. "issues_url": "https://api.github.com/orgs/matrix-org/issues",
  1468. "members_url": "https://api.github.com/orgs/matrix-org/members{/member}",
  1469. "public_members_url": "https://api.github.com/orgs/matrix-org/public_members{/member}",
  1470. "avatar_url": "https://avatars.githubusercontent.com/u/8418310?v=3",
  1471. "description": "A new basis for open, interoperable, decentralised real-time communication"
  1472. },
  1473. "sender": {
  1474. "login": "erikjohnston",
  1475. "id": 8428120,
  1476. "avatar_url": "https://avatars.githubusercontent.com/u/8428120?v=3",
  1477. "gravatar_id": "",
  1478. "url": "https://api.github.com/users/erikjohnston",
  1479. "html_url": "https://github.com/erikjohnston",
  1480. "followers_url": "https://api.github.com/users/erikjohnston/followers",
  1481. "following_url": "https://api.github.com/users/erikjohnston/following{/other_user}",
  1482. "gists_url": "https://api.github.com/users/erikjohnston/gists{/gist_id}",
  1483. "starred_url": "https://api.github.com/users/erikjohnston/starred{/owner}{/repo}",
  1484. "subscriptions_url": "https://api.github.com/users/erikjohnston/subscriptions",
  1485. "organizations_url": "https://api.github.com/users/erikjohnston/orgs",
  1486. "repos_url": "https://api.github.com/users/erikjohnston/repos",
  1487. "events_url": "https://api.github.com/users/erikjohnston/events{/privacy}",
  1488. "received_events_url": "https://api.github.com/users/erikjohnston/received_events",
  1489. "type": "User",
  1490. "site_admin": false
  1491. }
  1492. }`,
  1493. "[<u>matrix-org/synapse</u>] erikjohnston made a line comment on negzi's <b>pull request #860</b> (assignee: None): Fix a bug caused by a change in auth_handler function - https://github.com/matrix-org/synapse/pull/860#discussion_r66413356",
  1494. "matrix-org/synapse", "pull_request_review_comment",
  1495. },
  1496. }
  1497. func TestParseGithubEvent(t *testing.T) {
  1498. for _, gh := range ghtests {
  1499. outHTML, outRepo, outType, outErr := parseGithubEvent(gh.eventType, []byte(gh.jsonBody))
  1500. if outErr != nil {
  1501. t.Fatal(outErr)
  1502. }
  1503. if strings.TrimSpace(outHTML) != strings.TrimSpace(gh.outHTML) {
  1504. t.Errorf("ParseGithubEvent(%s) => HTML output does not match. Got:\n%s\n\nExpected:\n%s", gh.eventType,
  1505. strings.TrimSpace(outHTML), strings.TrimSpace(gh.outHTML))
  1506. }
  1507. if outRepo == nil {
  1508. t.Errorf("ParseGithubEvent(%s) => Repo is nil", gh.eventType)
  1509. }
  1510. if *outRepo.FullName != gh.outFullRepo {
  1511. t.Errorf("ParseGithubEvent(%s) => Repo: Want %s got %s", gh.eventType, gh.outFullRepo, *outRepo.FullName)
  1512. }
  1513. if outType != gh.outType {
  1514. t.Errorf("ParseGithubEvent(%s) => Event type: Want %s got %s", gh.eventType, gh.outType, outType)
  1515. }
  1516. }
  1517. }