github.py 131 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546
  1. # we keep this as a raw string as order matters for hmac signing
  2. PUSH_EVENT_EXAMPLE_INSTALLATION = r"""{
  3. "ref": "refs/heads/changes",
  4. "installation" : {
  5. "id": 12345
  6. },
  7. "before": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
  8. "after": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  9. "created": false,
  10. "deleted": false,
  11. "forced": false,
  12. "base_ref": null,
  13. "compare": "https://github.com/baxterthehacker/public-repo/compare/9049f1265b7d...0d1a26e67d8f",
  14. "commits": [
  15. {
  16. "id": "133d60480286590a610a0eb7352ff6e02b9674c4",
  17. "tree_id": "f9d2a07e9488b91af2641b26b9407fe22a451433",
  18. "distinct": true,
  19. "message": "Update README.md (àgain)",
  20. "timestamp": "2015-05-05T19:45:15-04:00",
  21. "url": "https://github.com/baxterthehacker/public-repo/commit/133d60480286590a610a0eb7352ff6e02b9674c4",
  22. "author": {
  23. "name": "bàxterthehacker",
  24. "email": "baxterthehacker@users.noreply.github.com",
  25. "username": "baxterthehacker"
  26. },
  27. "committer": {
  28. "name": "baxterthehacker",
  29. "email": "baxterthehacker@users.noreply.github.com",
  30. "username": "baxterthehacker"
  31. },
  32. "added": [
  33. ],
  34. "removed": [
  35. ],
  36. "modified": [
  37. "README.md"
  38. ]
  39. },
  40. {
  41. "id": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  42. "tree_id": "f9d2a07e9488b91af2641b26b9407fe22a451433",
  43. "distinct": true,
  44. "message": "Update README.md",
  45. "timestamp": "2015-05-05T19:40:15-04:00",
  46. "url": "https://github.com/baxterthehacker/public-repo/commit/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  47. "author": {
  48. "name": "bàxterthehacker",
  49. "email": "baxterthehacker@users.noreply.github.com",
  50. "username": "baxterthehacker"
  51. },
  52. "committer": {
  53. "name": "baxterthehacker",
  54. "email": "baxterthehacker@users.noreply.github.com",
  55. "username": "baxterthehacker"
  56. },
  57. "added": [
  58. ],
  59. "removed": [
  60. ],
  61. "modified": [
  62. "README.md"
  63. ]
  64. },
  65. {
  66. "id": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  67. "tree_id": "f9d2a07e9488b91af2641b26b9407fe22a451433",
  68. "distinct": true,
  69. "message": "fix widget #skipsentry",
  70. "timestamp": "2015-05-05T19:40:15-04:00",
  71. "url": "https://github.com/baxterthehacker/public-repo/commit/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  72. "author": {
  73. "name": "bàxterthehacker",
  74. "email": "baxterthehacker@users.noreply.github.com",
  75. "username": "baxterthehacker"
  76. },
  77. "committer": {
  78. "name": "baxterthehacker",
  79. "email": "baxterthehacker@users.noreply.github.com",
  80. "username": "baxterthehacker"
  81. },
  82. "added": [
  83. ],
  84. "removed": [
  85. ],
  86. "modified": [
  87. "README.md"
  88. ]
  89. }
  90. ],
  91. "head_commit": {
  92. "id": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  93. "tree_id": "f9d2a07e9488b91af2641b26b9407fe22a451433",
  94. "distinct": true,
  95. "message": "Update README.md",
  96. "timestamp": "2015-05-05T19:40:15-04:00",
  97. "url": "https://github.com/baxterthehacker/public-repo/commit/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  98. "author": {
  99. "name": "baxterthehacker",
  100. "email": "baxterthehacker@users.noreply.github.com",
  101. "username": "baxterthehacker"
  102. },
  103. "committer": {
  104. "name": "baxterthehacker",
  105. "email": "baxterthehacker@users.noreply.github.com",
  106. "username": "baxterthehacker"
  107. },
  108. "added": [
  109. ],
  110. "removed": [
  111. ],
  112. "modified": [
  113. "README.md"
  114. ]
  115. },
  116. "repository": {
  117. "id": 35129377,
  118. "name": "public-repo",
  119. "full_name": "baxterthehacker/public-repo",
  120. "owner": {
  121. "name": "baxterthehacker",
  122. "email": "baxterthehacker@users.noreply.github.com"
  123. },
  124. "private": false,
  125. "html_url": "https://github.com/baxterthehacker/public-repo",
  126. "description": "",
  127. "fork": false,
  128. "url": "https://github.com/baxterthehacker/public-repo",
  129. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  130. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  131. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  132. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  133. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  134. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  135. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  136. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  137. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  138. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  139. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  140. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  141. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  142. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  143. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  144. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  145. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  146. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  147. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  148. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  149. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  150. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  151. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  152. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  153. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  154. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  155. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  156. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  157. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  158. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  159. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  160. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  161. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  162. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  163. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  164. "created_at": 1430869212,
  165. "updated_at": "2015-05-05T23:40:12Z",
  166. "pushed_at": 1430869217,
  167. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  168. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  169. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  170. "svn_url": "https://github.com/baxterthehacker/public-repo",
  171. "homepage": null,
  172. "size": 0,
  173. "stargazers_count": 0,
  174. "watchers_count": 0,
  175. "language": null,
  176. "has_issues": true,
  177. "has_downloads": true,
  178. "has_wiki": true,
  179. "has_pages": true,
  180. "forks_count": 0,
  181. "mirror_url": null,
  182. "open_issues_count": 0,
  183. "forks": 0,
  184. "open_issues": 0,
  185. "watchers": 0,
  186. "default_branch": "master",
  187. "stargazers": 0,
  188. "master_branch": "master"
  189. },
  190. "pusher": {
  191. "name": "baxterthehacker",
  192. "email": "baxterthehacker@users.noreply.github.com"
  193. },
  194. "sender": {
  195. "login": "baxterthehacker",
  196. "id": 6752317,
  197. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  198. "gravatar_id": "",
  199. "url": "https://api.github.com/users/baxterthehacker",
  200. "html_url": "https://github.com/baxterthehacker",
  201. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  202. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  203. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  204. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  205. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  206. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  207. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  208. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  209. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  210. "type": "User",
  211. "site_admin": false
  212. }
  213. }"""
  214. COMPARE_COMMITS_EXAMPLE = """{
  215. "url": "https://api.github.com/repos/octocat/Hello-World/compare/master...topic",
  216. "html_url": "https://github.com/octocat/Hello-World/compare/master...topic",
  217. "permalink_url": "https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17",
  218. "diff_url": "https://github.com/octocat/Hello-World/compare/master...topic.diff",
  219. "patch_url": "https://github.com/octocat/Hello-World/compare/master...topic.patch",
  220. "base_commit": {
  221. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  222. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  223. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  224. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  225. "commit": {
  226. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  227. "author": {
  228. "name": "Monalisa Octocat",
  229. "email": "support@github.com",
  230. "date": "2011-04-14T16:00:49Z"
  231. },
  232. "committer": {
  233. "name": "Monalisa Octocat",
  234. "email": "support@github.com",
  235. "date": "2011-04-14T16:00:49Z"
  236. },
  237. "message": "Fix all the bugs",
  238. "tree": {
  239. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  240. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  241. },
  242. "comment_count": 0,
  243. "verification": {
  244. "verified": true,
  245. "reason": "valid",
  246. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  247. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  248. }
  249. },
  250. "author": {
  251. "login": "octocat",
  252. "id": 1,
  253. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  254. "gravatar_id": "",
  255. "url": "https://api.github.com/users/octocat",
  256. "html_url": "https://github.com/octocat",
  257. "followers_url": "https://api.github.com/users/octocat/followers",
  258. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  259. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  260. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  261. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  262. "organizations_url": "https://api.github.com/users/octocat/orgs",
  263. "repos_url": "https://api.github.com/users/octocat/repos",
  264. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  265. "received_events_url": "https://api.github.com/users/octocat/received_events",
  266. "type": "User",
  267. "site_admin": false
  268. },
  269. "committer": {
  270. "login": "octocat",
  271. "id": 1,
  272. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  273. "gravatar_id": "",
  274. "url": "https://api.github.com/users/octocat",
  275. "html_url": "https://github.com/octocat",
  276. "followers_url": "https://api.github.com/users/octocat/followers",
  277. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  278. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  279. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  280. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  281. "organizations_url": "https://api.github.com/users/octocat/orgs",
  282. "repos_url": "https://api.github.com/users/octocat/repos",
  283. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  284. "received_events_url": "https://api.github.com/users/octocat/received_events",
  285. "type": "User",
  286. "site_admin": false
  287. },
  288. "parents": [
  289. {
  290. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  291. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  292. }
  293. ]
  294. },
  295. "merge_base_commit": {
  296. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  297. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  298. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  299. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  300. "commit": {
  301. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  302. "author": {
  303. "name": "Monalisa Octocat",
  304. "email": "support@github.com",
  305. "date": "2011-04-14T16:00:49Z"
  306. },
  307. "committer": {
  308. "name": "Monalisa Octocat",
  309. "email": "support@github.com",
  310. "date": "2011-04-14T16:00:49Z"
  311. },
  312. "message": "Fix all the bugs",
  313. "tree": {
  314. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  315. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  316. },
  317. "comment_count": 0,
  318. "verification": {
  319. "verified": true,
  320. "reason": "valid",
  321. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  322. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  323. }
  324. },
  325. "author": {
  326. "login": "octocat",
  327. "id": 1,
  328. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  329. "gravatar_id": "",
  330. "url": "https://api.github.com/users/octocat",
  331. "html_url": "https://github.com/octocat",
  332. "followers_url": "https://api.github.com/users/octocat/followers",
  333. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  334. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  335. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  336. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  337. "organizations_url": "https://api.github.com/users/octocat/orgs",
  338. "repos_url": "https://api.github.com/users/octocat/repos",
  339. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  340. "received_events_url": "https://api.github.com/users/octocat/received_events",
  341. "type": "User",
  342. "site_admin": false
  343. },
  344. "committer": {
  345. "login": "octocat",
  346. "id": 1,
  347. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  348. "gravatar_id": "",
  349. "url": "https://api.github.com/users/octocat",
  350. "html_url": "https://github.com/octocat",
  351. "followers_url": "https://api.github.com/users/octocat/followers",
  352. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  353. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  354. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  355. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  356. "organizations_url": "https://api.github.com/users/octocat/orgs",
  357. "repos_url": "https://api.github.com/users/octocat/repos",
  358. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  359. "received_events_url": "https://api.github.com/users/octocat/received_events",
  360. "type": "User",
  361. "site_admin": false
  362. },
  363. "parents": [
  364. {
  365. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  366. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  367. }
  368. ]
  369. },
  370. "status": "behind",
  371. "ahead_by": 1,
  372. "behind_by": 2,
  373. "total_commits": 1,
  374. "commits": [
  375. {
  376. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  377. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  378. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  379. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  380. "commit": {
  381. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  382. "author": {
  383. "name": "Monalisa Octocat",
  384. "email": "support@github.com",
  385. "date": "2011-04-14T16:00:49Z"
  386. },
  387. "committer": {
  388. "name": "Monalisa Octocat",
  389. "email": "support@github.com",
  390. "date": "2011-04-14T16:00:49Z"
  391. },
  392. "message": "Fix all the bugs",
  393. "tree": {
  394. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  395. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  396. },
  397. "comment_count": 0,
  398. "verification": {
  399. "verified": true,
  400. "reason": "valid",
  401. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  402. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  403. }
  404. },
  405. "author": {
  406. "login": "octocat",
  407. "id": 1,
  408. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  409. "gravatar_id": "",
  410. "url": "https://api.github.com/users/octocat",
  411. "html_url": "https://github.com/octocat",
  412. "followers_url": "https://api.github.com/users/octocat/followers",
  413. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  414. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  415. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  416. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  417. "organizations_url": "https://api.github.com/users/octocat/orgs",
  418. "repos_url": "https://api.github.com/users/octocat/repos",
  419. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  420. "received_events_url": "https://api.github.com/users/octocat/received_events",
  421. "type": "User",
  422. "site_admin": false
  423. },
  424. "committer": {
  425. "login": "octocat",
  426. "id": 1,
  427. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  428. "gravatar_id": "",
  429. "url": "https://api.github.com/users/octocat",
  430. "html_url": "https://github.com/octocat",
  431. "followers_url": "https://api.github.com/users/octocat/followers",
  432. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  433. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  434. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  435. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  436. "organizations_url": "https://api.github.com/users/octocat/orgs",
  437. "repos_url": "https://api.github.com/users/octocat/repos",
  438. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  439. "received_events_url": "https://api.github.com/users/octocat/received_events",
  440. "type": "User",
  441. "site_admin": false
  442. },
  443. "parents": [
  444. {
  445. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  446. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  447. }
  448. ]
  449. }
  450. ],
  451. "files": [
  452. {
  453. "sha": "bbcd538c8e72b8c175046e27cc8f907076331401",
  454. "filename": "file1.txt",
  455. "status": "added",
  456. "additions": 103,
  457. "deletions": 21,
  458. "changes": 124,
  459. "blob_url": "https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt",
  460. "raw_url": "https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt",
  461. "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e",
  462. "patch": "@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test"
  463. }
  464. ]
  465. }"""
  466. GET_LAST_COMMITS_EXAMPLE = """[
  467. {
  468. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  469. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  470. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  471. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  472. "commit": {
  473. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  474. "author": {
  475. "name": "Monalisa Octocat",
  476. "email": "support@github.com",
  477. "date": "2011-04-14T16:00:49Z"
  478. },
  479. "committer": {
  480. "name": "Monalisa Octocat",
  481. "email": "support@github.com",
  482. "date": "2011-04-14T16:00:49Z"
  483. },
  484. "message": "Fix all the bugs",
  485. "tree": {
  486. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  487. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  488. },
  489. "comment_count": 0,
  490. "verification": {
  491. "verified": true,
  492. "reason": "valid",
  493. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  494. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  495. }
  496. },
  497. "author": {
  498. "login": "octocat",
  499. "id": 1,
  500. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  501. "gravatar_id": "",
  502. "url": "https://api.github.com/users/octocat",
  503. "html_url": "https://github.com/octocat",
  504. "followers_url": "https://api.github.com/users/octocat/followers",
  505. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  506. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  507. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  508. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  509. "organizations_url": "https://api.github.com/users/octocat/orgs",
  510. "repos_url": "https://api.github.com/users/octocat/repos",
  511. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  512. "received_events_url": "https://api.github.com/users/octocat/received_events",
  513. "type": "User",
  514. "site_admin": false
  515. },
  516. "committer": {
  517. "login": "octocat",
  518. "id": 1,
  519. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  520. "gravatar_id": "",
  521. "url": "https://api.github.com/users/octocat",
  522. "html_url": "https://github.com/octocat",
  523. "followers_url": "https://api.github.com/users/octocat/followers",
  524. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  525. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  526. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  527. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  528. "organizations_url": "https://api.github.com/users/octocat/orgs",
  529. "repos_url": "https://api.github.com/users/octocat/repos",
  530. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  531. "received_events_url": "https://api.github.com/users/octocat/received_events",
  532. "type": "User",
  533. "site_admin": false
  534. },
  535. "parents": [
  536. {
  537. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  538. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  539. }
  540. ]
  541. }
  542. ]"""
  543. INSTALLATION_EVENT_EXAMPLE = """{
  544. "action": "created",
  545. "installation": {
  546. "id": 2,
  547. "account": {
  548. "login": "octocat",
  549. "id": 1,
  550. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  551. "gravatar_id": "",
  552. "url": "https://api.github.com/users/octocat",
  553. "html_url": "https://github.com/octocat",
  554. "followers_url": "https://api.github.com/users/octocat/followers",
  555. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  556. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  557. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  558. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  559. "organizations_url": "https://api.github.com/users/octocat/orgs",
  560. "repos_url": "https://api.github.com/users/octocat/repos",
  561. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  562. "received_events_url": "https://api.github.com/users/octocat/received_events",
  563. "type": "User",
  564. "site_admin": false
  565. },
  566. "access_tokens_url": "https://api.github.com/installations/2/access_tokens",
  567. "repositories_url": "https://api.github.com/installation/repositories"
  568. },
  569. "sender": {
  570. "login": "octocat",
  571. "id": 1,
  572. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  573. "gravatar_id": "",
  574. "url": "https://api.github.com/users/octocat",
  575. "html_url": "https://github.com/octocat",
  576. "followers_url": "https://api.github.com/users/octocat/followers",
  577. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  578. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  579. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  580. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  581. "organizations_url": "https://api.github.com/users/octocat/orgs",
  582. "repos_url": "https://api.github.com/users/octocat/repos",
  583. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  584. "received_events_url": "https://api.github.com/users/octocat/received_events",
  585. "type": "User",
  586. "site_admin": false
  587. }
  588. }"""
  589. INSTALLATION_REPO_EVENT = """{
  590. "action": "added",
  591. "installation": {
  592. "id": 2,
  593. "account": {
  594. "login": "octocat",
  595. "id": 1,
  596. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  597. "gravatar_id": "",
  598. "url": "https://api.github.com/users/octocat",
  599. "html_url": "https://github.com/octocat",
  600. "followers_url": "https://api.github.com/users/octocat/followers",
  601. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  602. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  603. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  604. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  605. "organizations_url": "https://api.github.com/users/octocat/orgs",
  606. "repos_url": "https://api.github.com/users/octocat/repos",
  607. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  608. "received_events_url": "https://api.github.com/users/octocat/received_events",
  609. "type": "User",
  610. "site_admin": false
  611. },
  612. "access_tokens_url": "https://api.github.com/installations/2/access_tokens",
  613. "repositories_url": "https://api.github.com/installation/repositories",
  614. "html_url": "https://github.com/settings/installations/2"
  615. },
  616. "repository_selection": "selected",
  617. "repositories_added": [
  618. {
  619. "id": 1296269,
  620. "name": "Hello-World",
  621. "full_name": "octocat/Hello-World"
  622. }
  623. ],
  624. "repositories_removed": [
  625. ],
  626. "sender": {
  627. "login": "octocat",
  628. "id": 1,
  629. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  630. "gravatar_id": "",
  631. "url": "https://api.github.com/users/octocat",
  632. "html_url": "https://github.com/octocat",
  633. "followers_url": "https://api.github.com/users/octocat/followers",
  634. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  635. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  636. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  637. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  638. "organizations_url": "https://api.github.com/users/octocat/orgs",
  639. "repos_url": "https://api.github.com/users/octocat/repos",
  640. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  641. "received_events_url": "https://api.github.com/users/octocat/received_events",
  642. "type": "User",
  643. "site_admin": false
  644. }
  645. }"""
  646. INTSTALLATION_REPOSITORIES_API_RESPONSE = """{
  647. "total_count": 1,
  648. "repositories": [
  649. {
  650. "id": 1296269,
  651. "owner": {
  652. "login": "octocat",
  653. "id": 1,
  654. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  655. "gravatar_id": "",
  656. "url": "https://api.github.com/users/octocat",
  657. "html_url": "https://github.com/octocat",
  658. "followers_url": "https://api.github.com/users/octocat/followers",
  659. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  660. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  661. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  662. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  663. "organizations_url": "https://api.github.com/users/octocat/orgs",
  664. "repos_url": "https://api.github.com/users/octocat/repos",
  665. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  666. "received_events_url": "https://api.github.com/users/octocat/received_events",
  667. "type": "User",
  668. "site_admin": false
  669. },
  670. "name": "Hello-World",
  671. "full_name": "octocat/Hello-World",
  672. "description": "This your first repo!",
  673. "private": false,
  674. "fork": false,
  675. "url": "https://api.github.com/repos/octocat/Hello-World",
  676. "html_url": "https://github.com/octocat/Hello-World",
  677. "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
  678. "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
  679. "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
  680. "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
  681. "clone_url": "https://github.com/octocat/Hello-World.git",
  682. "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
  683. "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
  684. "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
  685. "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
  686. "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
  687. "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
  688. "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
  689. "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
  690. "events_url": "http://api.github.com/repos/octocat/Hello-World/events",
  691. "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
  692. "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
  693. "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
  694. "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
  695. "git_url": "git:github.com/octocat/Hello-World.git",
  696. "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
  697. "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
  698. "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
  699. "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
  700. "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
  701. "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
  702. "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
  703. "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
  704. "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
  705. "mirror_url": "git:git.example.com/octocat/Hello-World",
  706. "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}",
  707. "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
  708. "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
  709. "ssh_url": "git@github.com:octocat/Hello-World.git",
  710. "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
  711. "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
  712. "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
  713. "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
  714. "svn_url": "https://svn.github.com/octocat/Hello-World",
  715. "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
  716. "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
  717. "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
  718. "homepage": "https://github.com",
  719. "language": null,
  720. "forks_count": 9,
  721. "stargazers_count": 80,
  722. "watchers_count": 80,
  723. "size": 108,
  724. "default_branch": "master",
  725. "open_issues_count": 0,
  726. "topics": [
  727. "octocat",
  728. "atom",
  729. "electron",
  730. "API"
  731. ],
  732. "has_issues": true,
  733. "has_wiki": true,
  734. "has_pages": false,
  735. "has_downloads": true,
  736. "pushed_at": "2011-01-26T19:06:43Z",
  737. "created_at": "2011-01-26T19:01:12Z",
  738. "updated_at": "2011-01-26T19:14:43Z",
  739. "allow_rebase_merge": true,
  740. "allow_squash_merge": true,
  741. "allow_merge_commit": true,
  742. "subscribers_count": 42,
  743. "network_count": 0
  744. }
  745. ]
  746. }"""
  747. LIST_INSTALLATION_API_RESPONSE = """{
  748. "total_count": 2,
  749. "installations": [
  750. {
  751. "id": 1,
  752. "account": {
  753. "login": "github",
  754. "id": 1,
  755. "url": "https://api.github.com/orgs/github",
  756. "repos_url": "https://api.github.com/orgs/github/repos",
  757. "events_url": "https://api.github.com/orgs/github/events",
  758. "hooks_url": "https://api.github.com/orgs/github/hooks",
  759. "issues_url": "https://api.github.com/orgs/github/issues",
  760. "members_url": "https://api.github.com/orgs/github/members{/member}",
  761. "public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
  762. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  763. "description": "A great organization"
  764. },
  765. "access_tokens_url": "https://api.github.com/installations/1/access_tokens",
  766. "repositories_url": "https://api.github.com/installation/repositories",
  767. "html_url": "https://github.com/organizations/github/settings/installations/1",
  768. "app_id": 1,
  769. "target_id": 1,
  770. "target_type": "Organization",
  771. "permissions": {
  772. "metadata": "read",
  773. "contents": "read",
  774. "issues": "write",
  775. "single_file": "write"
  776. },
  777. "events": [
  778. "push",
  779. "pull_request"
  780. ],
  781. "single_file_name": "config.yml"
  782. },
  783. {
  784. "id": 3,
  785. "account": {
  786. "login": "octocat",
  787. "id": 2,
  788. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  789. "gravatar_id": "",
  790. "url": "https://api.github.com/users/octocat",
  791. "html_url": "https://github.com/octocat",
  792. "followers_url": "https://api.github.com/users/octocat/followers",
  793. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  794. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  795. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  796. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  797. "organizations_url": "https://api.github.com/users/octocat/orgs",
  798. "repos_url": "https://api.github.com/users/octocat/repos",
  799. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  800. "received_events_url": "https://api.github.com/users/octocat/received_events",
  801. "type": "User",
  802. "site_admin": false
  803. },
  804. "access_tokens_url": "https://api.github.com/installations/1/access_tokens",
  805. "repositories_url": "https://api.github.com/installation/repositories",
  806. "html_url": "https://github.com/organizations/github/settings/installations/1",
  807. "app_id": 1,
  808. "target_id": 1,
  809. "target_type": "Organization",
  810. "permissions": {
  811. "metadata": "read",
  812. "contents": "read",
  813. "issues": "write",
  814. "single_file": "write"
  815. },
  816. "events": [
  817. "push",
  818. "pull_request"
  819. ],
  820. "single_file_name": "config.yml"
  821. }
  822. ]
  823. }"""
  824. PULL_REQUEST_OPENED_EVENT_EXAMPLE = b"""{
  825. "installation" : {
  826. "id": 12345
  827. },
  828. "action": "opened",
  829. "number": 1,
  830. "pull_request": {
  831. "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",
  832. "id": 34778301,
  833. "html_url": "https://github.com/baxterthehacker/public-repo/pull/1",
  834. "diff_url": "https://github.com/baxterthehacker/public-repo/pull/1.diff",
  835. "patch_url": "https://github.com/baxterthehacker/public-repo/pull/1.patch",
  836. "issue_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1",
  837. "number": 1,
  838. "state": "open",
  839. "locked": false,
  840. "title": "Update the README with new information",
  841. "user": {
  842. "login": "baxterthehacker",
  843. "id": 6752317,
  844. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  845. "gravatar_id": "",
  846. "url": "https://api.github.com/users/baxterthehacker",
  847. "html_url": "https://github.com/baxterthehacker",
  848. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  849. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  850. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  851. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  852. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  853. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  854. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  855. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  856. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  857. "type": "User",
  858. "site_admin": false
  859. },
  860. "body": "This is a pretty simple change that we need to pull into master. Fixes BAR-7",
  861. "created_at": "2015-05-05T23:40:27Z",
  862. "updated_at": "2015-05-05T23:40:27Z",
  863. "closed_at": null,
  864. "merged_at": null,
  865. "merge_commit_sha": null,
  866. "assignee": null,
  867. "milestone": null,
  868. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits",
  869. "review_comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments",
  870. "review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}",
  871. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments",
  872. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  873. "head": {
  874. "label": "baxterthehacker:changes",
  875. "ref": "changes",
  876. "sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  877. "user": {
  878. "login": "baxterthehacker",
  879. "id": 6752317,
  880. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  881. "gravatar_id": "",
  882. "url": "https://api.github.com/users/baxterthehacker",
  883. "html_url": "https://github.com/baxterthehacker",
  884. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  885. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  886. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  887. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  888. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  889. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  890. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  891. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  892. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  893. "type": "User",
  894. "site_admin": false
  895. },
  896. "repo": {
  897. "id": 35129377,
  898. "name": "public-repo",
  899. "full_name": "baxterthehacker/public-repo",
  900. "owner": {
  901. "login": "baxterthehacker",
  902. "id": 6752317,
  903. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  904. "gravatar_id": "",
  905. "url": "https://api.github.com/users/baxterthehacker",
  906. "html_url": "https://github.com/baxterthehacker",
  907. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  908. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  909. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  910. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  911. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  912. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  913. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  914. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  915. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  916. "type": "User",
  917. "site_admin": false
  918. },
  919. "private": false,
  920. "html_url": "https://github.com/baxterthehacker/public-repo",
  921. "description": "",
  922. "fork": false,
  923. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  924. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  925. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  926. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  927. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  928. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  929. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  930. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  931. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  932. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  933. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  934. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  935. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  936. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  937. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  938. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  939. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  940. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  941. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  942. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  943. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  944. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  945. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  946. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  947. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  948. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  949. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  950. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  951. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  952. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  953. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  954. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  955. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  956. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  957. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  958. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  959. "created_at": "2015-05-05T23:40:12Z",
  960. "updated_at": "2015-05-05T23:40:12Z",
  961. "pushed_at": "2015-05-05T23:40:26Z",
  962. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  963. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  964. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  965. "svn_url": "https://github.com/baxterthehacker/public-repo",
  966. "homepage": null,
  967. "size": 0,
  968. "stargazers_count": 0,
  969. "watchers_count": 0,
  970. "language": null,
  971. "has_issues": true,
  972. "has_downloads": true,
  973. "has_wiki": true,
  974. "has_pages": true,
  975. "forks_count": 0,
  976. "mirror_url": null,
  977. "open_issues_count": 1,
  978. "forks": 0,
  979. "open_issues": 1,
  980. "watchers": 0,
  981. "default_branch": "master"
  982. }
  983. },
  984. "base": {
  985. "label": "baxterthehacker:master",
  986. "ref": "master",
  987. "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
  988. "user": {
  989. "login": "baxterthehacker",
  990. "id": 6752317,
  991. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  992. "gravatar_id": "",
  993. "url": "https://api.github.com/users/baxterthehacker",
  994. "html_url": "https://github.com/baxterthehacker",
  995. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  996. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  997. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  998. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  999. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1000. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1001. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1002. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1003. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1004. "type": "User",
  1005. "site_admin": false
  1006. },
  1007. "repo": {
  1008. "id": 35129377,
  1009. "name": "public-repo",
  1010. "full_name": "baxterthehacker/public-repo",
  1011. "owner": {
  1012. "login": "baxterthehacker",
  1013. "id": 6752317,
  1014. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1015. "gravatar_id": "",
  1016. "url": "https://api.github.com/users/baxterthehacker",
  1017. "html_url": "https://github.com/baxterthehacker",
  1018. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1019. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1020. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1021. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1022. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1023. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1024. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1025. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1026. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1027. "type": "User",
  1028. "site_admin": false
  1029. },
  1030. "private": false,
  1031. "html_url": "https://github.com/baxterthehacker/public-repo",
  1032. "description": "",
  1033. "fork": false,
  1034. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1035. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1036. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1037. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1038. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1039. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1040. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1041. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1042. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1043. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1044. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1045. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1046. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1047. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1048. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1049. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1050. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1051. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1052. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1053. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1054. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1055. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1056. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1057. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1058. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1059. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1060. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1061. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1062. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1063. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1064. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1065. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1066. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1067. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1068. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1069. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1070. "created_at": "2015-05-05T23:40:12Z",
  1071. "updated_at": "2015-05-05T23:40:12Z",
  1072. "pushed_at": "2015-05-05T23:40:26Z",
  1073. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1074. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1075. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1076. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1077. "homepage": null,
  1078. "size": 0,
  1079. "stargazers_count": 0,
  1080. "watchers_count": 0,
  1081. "language": null,
  1082. "has_issues": true,
  1083. "has_downloads": true,
  1084. "has_wiki": true,
  1085. "has_pages": true,
  1086. "forks_count": 0,
  1087. "mirror_url": null,
  1088. "open_issues_count": 1,
  1089. "forks": 0,
  1090. "open_issues": 1,
  1091. "watchers": 0,
  1092. "default_branch": "master"
  1093. }
  1094. },
  1095. "_links": {
  1096. "self": {
  1097. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1"
  1098. },
  1099. "html": {
  1100. "href": "https://github.com/baxterthehacker/public-repo/pull/1"
  1101. },
  1102. "issue": {
  1103. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1"
  1104. },
  1105. "comments": {
  1106. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments"
  1107. },
  1108. "review_comments": {
  1109. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments"
  1110. },
  1111. "review_comment": {
  1112. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}"
  1113. },
  1114. "commits": {
  1115. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits"
  1116. },
  1117. "statuses": {
  1118. "href": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c"
  1119. }
  1120. },
  1121. "merged": false,
  1122. "mergeable": null,
  1123. "mergeable_state": "unknown",
  1124. "merged_by": null,
  1125. "comments": 0,
  1126. "review_comments": 0,
  1127. "commits": 1,
  1128. "additions": 1,
  1129. "deletions": 1,
  1130. "changed_files": 1
  1131. },
  1132. "repository": {
  1133. "id": 35129377,
  1134. "name": "public-repo",
  1135. "full_name": "baxterthehacker/public-repo",
  1136. "owner": {
  1137. "login": "baxterthehacker",
  1138. "id": 6752317,
  1139. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1140. "gravatar_id": "",
  1141. "url": "https://api.github.com/users/baxterthehacker",
  1142. "html_url": "https://github.com/baxterthehacker",
  1143. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1144. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1145. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1146. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1147. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1148. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1149. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1150. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1151. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1152. "type": "User",
  1153. "site_admin": false
  1154. },
  1155. "private": false,
  1156. "html_url": "https://github.com/baxterthehacker/public-repo",
  1157. "description": "",
  1158. "fork": false,
  1159. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1160. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1161. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1162. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1163. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1164. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1165. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1166. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1167. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1168. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1169. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1170. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1171. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1172. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1173. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1174. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1175. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1176. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1177. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1178. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1179. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1180. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1181. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1182. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1183. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1184. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1185. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1186. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1187. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1188. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1189. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1190. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1191. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1192. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1193. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1194. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1195. "created_at": "2015-05-05T23:40:12Z",
  1196. "updated_at": "2015-05-05T23:40:12Z",
  1197. "pushed_at": "2015-05-05T23:40:26Z",
  1198. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1199. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1200. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1201. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1202. "homepage": null,
  1203. "size": 0,
  1204. "stargazers_count": 0,
  1205. "watchers_count": 0,
  1206. "language": null,
  1207. "has_issues": true,
  1208. "has_downloads": true,
  1209. "has_wiki": true,
  1210. "has_pages": true,
  1211. "forks_count": 0,
  1212. "mirror_url": null,
  1213. "open_issues_count": 1,
  1214. "forks": 0,
  1215. "open_issues": 1,
  1216. "watchers": 0,
  1217. "default_branch": "master"
  1218. },
  1219. "sender": {
  1220. "login": "baxterthehacker",
  1221. "id": 6752317,
  1222. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1223. "gravatar_id": "",
  1224. "url": "https://api.github.com/users/baxterthehacker",
  1225. "html_url": "https://github.com/baxterthehacker",
  1226. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1227. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1228. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1229. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1230. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1231. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1232. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1233. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1234. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1235. "type": "User",
  1236. "site_admin": false
  1237. }
  1238. }"""
  1239. PULL_REQUEST_EDITED_EVENT_EXAMPLE = b"""{
  1240. "installation" : {
  1241. "id": 12345
  1242. },
  1243. "action": "edited",
  1244. "number": 1,
  1245. "pull_request": {
  1246. "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",
  1247. "id": 34778301,
  1248. "html_url": "https://github.com/baxterthehacker/public-repo/pull/1",
  1249. "diff_url": "https://github.com/baxterthehacker/public-repo/pull/1.diff",
  1250. "patch_url": "https://github.com/baxterthehacker/public-repo/pull/1.patch",
  1251. "issue_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1",
  1252. "number": 1,
  1253. "state": "open",
  1254. "locked": false,
  1255. "title": "new edited title",
  1256. "user": {
  1257. "login": "baxterthehacker",
  1258. "id": 6752317,
  1259. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1260. "gravatar_id": "",
  1261. "url": "https://api.github.com/users/baxterthehacker",
  1262. "html_url": "https://github.com/baxterthehacker",
  1263. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1264. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1265. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1266. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1267. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1268. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1269. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1270. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1271. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1272. "type": "User",
  1273. "site_admin": false
  1274. },
  1275. "body": "new edited body. Fixes BAR-7",
  1276. "created_at": "2015-05-05T23:40:27Z",
  1277. "updated_at": "2015-05-05T23:40:27Z",
  1278. "closed_at": null,
  1279. "merged_at": null,
  1280. "merge_commit_sha": null,
  1281. "assignee": null,
  1282. "milestone": null,
  1283. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits",
  1284. "review_comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments",
  1285. "review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}",
  1286. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments",
  1287. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  1288. "head": {
  1289. "label": "baxterthehacker:changes",
  1290. "ref": "changes",
  1291. "sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  1292. "user": {
  1293. "login": "baxterthehacker",
  1294. "id": 6752317,
  1295. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1296. "gravatar_id": "",
  1297. "url": "https://api.github.com/users/baxterthehacker",
  1298. "html_url": "https://github.com/baxterthehacker",
  1299. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1300. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1301. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1302. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1303. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1304. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1305. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1306. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1307. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1308. "type": "User",
  1309. "site_admin": false
  1310. },
  1311. "repo": {
  1312. "id": 35129377,
  1313. "name": "public-repo",
  1314. "full_name": "baxterthehacker/public-repo",
  1315. "owner": {
  1316. "login": "baxterthehacker",
  1317. "id": 6752317,
  1318. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1319. "gravatar_id": "",
  1320. "url": "https://api.github.com/users/baxterthehacker",
  1321. "html_url": "https://github.com/baxterthehacker",
  1322. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1323. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1324. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1325. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1326. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1327. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1328. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1329. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1330. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1331. "type": "User",
  1332. "site_admin": false
  1333. },
  1334. "private": false,
  1335. "html_url": "https://github.com/baxterthehacker/public-repo",
  1336. "description": "",
  1337. "fork": false,
  1338. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1339. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1340. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1341. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1342. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1343. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1344. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1345. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1346. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1347. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1348. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1349. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1350. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1351. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1352. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1353. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1354. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1355. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1356. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1357. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1358. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1359. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1360. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1361. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1362. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1363. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1364. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1365. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1366. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1367. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1368. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1369. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1370. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1371. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1372. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1373. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1374. "created_at": "2015-05-05T23:40:12Z",
  1375. "updated_at": "2015-05-05T23:40:12Z",
  1376. "pushed_at": "2015-05-05T23:40:26Z",
  1377. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1378. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1379. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1380. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1381. "homepage": null,
  1382. "size": 0,
  1383. "stargazers_count": 0,
  1384. "watchers_count": 0,
  1385. "language": null,
  1386. "has_issues": true,
  1387. "has_downloads": true,
  1388. "has_wiki": true,
  1389. "has_pages": true,
  1390. "forks_count": 0,
  1391. "mirror_url": null,
  1392. "open_issues_count": 1,
  1393. "forks": 0,
  1394. "open_issues": 1,
  1395. "watchers": 0,
  1396. "default_branch": "master"
  1397. }
  1398. },
  1399. "base": {
  1400. "label": "baxterthehacker:master",
  1401. "ref": "master",
  1402. "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
  1403. "user": {
  1404. "login": "baxterthehacker",
  1405. "id": 6752317,
  1406. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1407. "gravatar_id": "",
  1408. "url": "https://api.github.com/users/baxterthehacker",
  1409. "html_url": "https://github.com/baxterthehacker",
  1410. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1411. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1412. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1413. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1414. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1415. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1416. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1417. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1418. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1419. "type": "User",
  1420. "site_admin": false
  1421. },
  1422. "repo": {
  1423. "id": 35129377,
  1424. "name": "public-repo",
  1425. "full_name": "baxterthehacker/public-repo",
  1426. "owner": {
  1427. "login": "baxterthehacker",
  1428. "id": 6752317,
  1429. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1430. "gravatar_id": "",
  1431. "url": "https://api.github.com/users/baxterthehacker",
  1432. "html_url": "https://github.com/baxterthehacker",
  1433. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1434. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1435. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1436. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1437. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1438. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1439. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1440. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1441. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1442. "type": "User",
  1443. "site_admin": false
  1444. },
  1445. "private": false,
  1446. "html_url": "https://github.com/baxterthehacker/public-repo",
  1447. "description": "",
  1448. "fork": false,
  1449. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1450. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1451. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1452. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1453. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1454. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1455. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1456. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1457. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1458. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1459. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1460. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1461. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1462. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1463. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1464. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1465. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1466. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1467. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1468. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1469. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1470. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1471. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1472. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1473. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1474. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1475. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1476. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1477. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1478. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1479. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1480. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1481. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1482. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1483. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1484. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1485. "created_at": "2015-05-05T23:40:12Z",
  1486. "updated_at": "2015-05-05T23:40:12Z",
  1487. "pushed_at": "2015-05-05T23:40:26Z",
  1488. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1489. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1490. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1491. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1492. "homepage": null,
  1493. "size": 0,
  1494. "stargazers_count": 0,
  1495. "watchers_count": 0,
  1496. "language": null,
  1497. "has_issues": true,
  1498. "has_downloads": true,
  1499. "has_wiki": true,
  1500. "has_pages": true,
  1501. "forks_count": 0,
  1502. "mirror_url": null,
  1503. "open_issues_count": 1,
  1504. "forks": 0,
  1505. "open_issues": 1,
  1506. "watchers": 0,
  1507. "default_branch": "master"
  1508. }
  1509. },
  1510. "_links": {
  1511. "self": {
  1512. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1"
  1513. },
  1514. "html": {
  1515. "href": "https://github.com/baxterthehacker/public-repo/pull/1"
  1516. },
  1517. "issue": {
  1518. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1"
  1519. },
  1520. "comments": {
  1521. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments"
  1522. },
  1523. "review_comments": {
  1524. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments"
  1525. },
  1526. "review_comment": {
  1527. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}"
  1528. },
  1529. "commits": {
  1530. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits"
  1531. },
  1532. "statuses": {
  1533. "href": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c"
  1534. }
  1535. },
  1536. "merged": false,
  1537. "mergeable": null,
  1538. "mergeable_state": "unknown",
  1539. "merged_by": null,
  1540. "comments": 0,
  1541. "review_comments": 0,
  1542. "commits": 1,
  1543. "additions": 1,
  1544. "deletions": 1,
  1545. "changed_files": 1
  1546. },
  1547. "repository": {
  1548. "id": 35129377,
  1549. "name": "public-repo",
  1550. "full_name": "baxterthehacker/public-repo",
  1551. "owner": {
  1552. "login": "baxterthehacker",
  1553. "id": 6752317,
  1554. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1555. "gravatar_id": "",
  1556. "url": "https://api.github.com/users/baxterthehacker",
  1557. "html_url": "https://github.com/baxterthehacker",
  1558. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1559. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1560. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1561. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1562. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1563. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1564. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1565. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1566. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1567. "type": "User",
  1568. "site_admin": false
  1569. },
  1570. "private": false,
  1571. "html_url": "https://github.com/baxterthehacker/public-repo",
  1572. "description": "",
  1573. "fork": false,
  1574. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1575. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1576. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1577. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1578. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1579. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1580. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1581. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1582. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1583. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1584. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1585. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1586. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1587. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1588. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1589. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1590. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1591. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1592. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1593. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1594. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1595. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1596. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1597. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1598. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1599. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1600. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1601. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1602. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1603. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1604. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1605. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1606. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1607. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1608. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1609. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1610. "created_at": "2015-05-05T23:40:12Z",
  1611. "updated_at": "2015-05-05T23:40:12Z",
  1612. "pushed_at": "2015-05-05T23:40:26Z",
  1613. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1614. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1615. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1616. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1617. "homepage": null,
  1618. "size": 0,
  1619. "stargazers_count": 0,
  1620. "watchers_count": 0,
  1621. "language": null,
  1622. "has_issues": true,
  1623. "has_downloads": true,
  1624. "has_wiki": true,
  1625. "has_pages": true,
  1626. "forks_count": 0,
  1627. "mirror_url": null,
  1628. "open_issues_count": 1,
  1629. "forks": 0,
  1630. "open_issues": 1,
  1631. "watchers": 0,
  1632. "default_branch": "master"
  1633. },
  1634. "sender": {
  1635. "login": "baxterthehacker",
  1636. "id": 6752317,
  1637. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1638. "gravatar_id": "",
  1639. "url": "https://api.github.com/users/baxterthehacker",
  1640. "html_url": "https://github.com/baxterthehacker",
  1641. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1642. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1643. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1644. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1645. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1646. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1647. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1648. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1649. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1650. "type": "User",
  1651. "site_admin": false
  1652. }
  1653. }"""
  1654. PULL_REQUEST_CLOSED_EVENT_EXAMPLE = b"""{
  1655. "installation" : {
  1656. "id": 12345
  1657. },
  1658. "action": "closed",
  1659. "number": 1,
  1660. "pull_request": {
  1661. "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",
  1662. "id": 34778301,
  1663. "html_url": "https://github.com/baxterthehacker/public-repo/pull/1",
  1664. "diff_url": "https://github.com/baxterthehacker/public-repo/pull/1.diff",
  1665. "patch_url": "https://github.com/baxterthehacker/public-repo/pull/1.patch",
  1666. "issue_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1",
  1667. "number": 1,
  1668. "state": "open",
  1669. "locked": false,
  1670. "title": "new closed title",
  1671. "user": {
  1672. "login": "baxterthehacker",
  1673. "id": 6752317,
  1674. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1675. "gravatar_id": "",
  1676. "url": "https://api.github.com/users/baxterthehacker",
  1677. "html_url": "https://github.com/baxterthehacker",
  1678. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1679. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1680. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1681. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1682. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1683. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1684. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1685. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1686. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1687. "type": "User",
  1688. "site_admin": false
  1689. },
  1690. "body": "new closed body",
  1691. "created_at": "2015-05-05T23:40:27Z",
  1692. "updated_at": "2015-05-05T23:40:27Z",
  1693. "closed_at": "2015-05-05T23:40:27Z",
  1694. "merged_at": "2015-05-05T23:40:27Z",
  1695. "merge_commit_sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  1696. "assignee": null,
  1697. "milestone": null,
  1698. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits",
  1699. "review_comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments",
  1700. "review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}",
  1701. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments",
  1702. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  1703. "head": {
  1704. "label": "baxterthehacker:changes",
  1705. "ref": "changes",
  1706. "sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  1707. "user": {
  1708. "login": "baxterthehacker",
  1709. "id": 6752317,
  1710. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1711. "gravatar_id": "",
  1712. "url": "https://api.github.com/users/baxterthehacker",
  1713. "html_url": "https://github.com/baxterthehacker",
  1714. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1715. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1716. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1717. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1718. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1719. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1720. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1721. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1722. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1723. "type": "User",
  1724. "site_admin": false
  1725. },
  1726. "repo": {
  1727. "id": 35129377,
  1728. "name": "public-repo",
  1729. "full_name": "baxterthehacker/public-repo",
  1730. "owner": {
  1731. "login": "baxterthehacker",
  1732. "id": 6752317,
  1733. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1734. "gravatar_id": "",
  1735. "url": "https://api.github.com/users/baxterthehacker",
  1736. "html_url": "https://github.com/baxterthehacker",
  1737. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1738. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1739. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1740. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1741. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1742. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1743. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1744. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1745. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1746. "type": "User",
  1747. "site_admin": false
  1748. },
  1749. "private": false,
  1750. "html_url": "https://github.com/baxterthehacker/public-repo",
  1751. "description": "",
  1752. "fork": false,
  1753. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1754. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1755. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1756. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1757. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1758. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1759. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1760. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1761. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1762. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1763. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1764. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1765. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1766. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1767. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1768. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1769. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1770. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1771. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1772. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1773. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1774. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1775. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1776. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1777. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1778. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1779. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1780. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1781. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1782. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1783. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1784. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1785. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1786. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1787. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1788. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1789. "created_at": "2015-05-05T23:40:12Z",
  1790. "updated_at": "2015-05-05T23:40:12Z",
  1791. "pushed_at": "2015-05-05T23:40:26Z",
  1792. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1793. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1794. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1795. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1796. "homepage": null,
  1797. "size": 0,
  1798. "stargazers_count": 0,
  1799. "watchers_count": 0,
  1800. "language": null,
  1801. "has_issues": true,
  1802. "has_downloads": true,
  1803. "has_wiki": true,
  1804. "has_pages": true,
  1805. "forks_count": 0,
  1806. "mirror_url": null,
  1807. "open_issues_count": 1,
  1808. "forks": 0,
  1809. "open_issues": 1,
  1810. "watchers": 0,
  1811. "default_branch": "master"
  1812. }
  1813. },
  1814. "base": {
  1815. "label": "baxterthehacker:master",
  1816. "ref": "master",
  1817. "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
  1818. "user": {
  1819. "login": "baxterthehacker",
  1820. "id": 6752317,
  1821. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1822. "gravatar_id": "",
  1823. "url": "https://api.github.com/users/baxterthehacker",
  1824. "html_url": "https://github.com/baxterthehacker",
  1825. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1826. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1827. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1828. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1829. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1830. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1831. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1832. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1833. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1834. "type": "User",
  1835. "site_admin": false
  1836. },
  1837. "repo": {
  1838. "id": 35129377,
  1839. "name": "public-repo",
  1840. "full_name": "baxterthehacker/public-repo",
  1841. "owner": {
  1842. "login": "baxterthehacker",
  1843. "id": 6752317,
  1844. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1845. "gravatar_id": "",
  1846. "url": "https://api.github.com/users/baxterthehacker",
  1847. "html_url": "https://github.com/baxterthehacker",
  1848. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1849. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1850. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1851. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1852. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1853. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1854. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1855. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1856. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1857. "type": "User",
  1858. "site_admin": false
  1859. },
  1860. "private": false,
  1861. "html_url": "https://github.com/baxterthehacker/public-repo",
  1862. "description": "",
  1863. "fork": false,
  1864. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1865. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1866. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1867. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1868. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1869. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1870. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1871. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1872. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1873. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1874. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1875. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1876. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1877. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1878. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1879. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1880. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1881. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1882. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1883. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1884. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1885. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1886. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1887. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1888. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1889. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1890. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1891. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1892. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1893. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1894. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1895. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1896. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1897. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1898. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1899. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1900. "created_at": "2015-05-05T23:40:12Z",
  1901. "updated_at": "2015-05-05T23:40:12Z",
  1902. "pushed_at": "2015-05-05T23:40:26Z",
  1903. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1904. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1905. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1906. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1907. "homepage": null,
  1908. "size": 0,
  1909. "stargazers_count": 0,
  1910. "watchers_count": 0,
  1911. "language": null,
  1912. "has_issues": true,
  1913. "has_downloads": true,
  1914. "has_wiki": true,
  1915. "has_pages": true,
  1916. "forks_count": 0,
  1917. "mirror_url": null,
  1918. "open_issues_count": 1,
  1919. "forks": 0,
  1920. "open_issues": 1,
  1921. "watchers": 0,
  1922. "default_branch": "master"
  1923. }
  1924. },
  1925. "_links": {
  1926. "self": {
  1927. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1"
  1928. },
  1929. "html": {
  1930. "href": "https://github.com/baxterthehacker/public-repo/pull/1"
  1931. },
  1932. "issue": {
  1933. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1"
  1934. },
  1935. "comments": {
  1936. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments"
  1937. },
  1938. "review_comments": {
  1939. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments"
  1940. },
  1941. "review_comment": {
  1942. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}"
  1943. },
  1944. "commits": {
  1945. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits"
  1946. },
  1947. "statuses": {
  1948. "href": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c"
  1949. }
  1950. },
  1951. "merged": true,
  1952. "mergeable": null,
  1953. "mergeable_state": "unknown",
  1954. "merged_by": null,
  1955. "comments": 0,
  1956. "review_comments": 0,
  1957. "commits": 1,
  1958. "additions": 1,
  1959. "deletions": 1,
  1960. "changed_files": 1
  1961. },
  1962. "repository": {
  1963. "id": 35129377,
  1964. "name": "public-repo",
  1965. "full_name": "baxterthehacker/public-repo",
  1966. "owner": {
  1967. "login": "baxterthehacker",
  1968. "id": 6752317,
  1969. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1970. "gravatar_id": "",
  1971. "url": "https://api.github.com/users/baxterthehacker",
  1972. "html_url": "https://github.com/baxterthehacker",
  1973. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1974. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1975. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1976. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1977. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1978. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1979. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1980. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1981. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1982. "type": "User",
  1983. "site_admin": false
  1984. },
  1985. "private": false,
  1986. "html_url": "https://github.com/baxterthehacker/public-repo",
  1987. "description": "",
  1988. "fork": false,
  1989. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1990. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1991. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1992. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1993. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1994. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1995. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1996. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1997. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1998. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1999. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  2000. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  2001. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  2002. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  2003. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  2004. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  2005. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  2006. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  2007. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  2008. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  2009. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  2010. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  2011. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  2012. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  2013. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  2014. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  2015. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  2016. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  2017. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  2018. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  2019. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  2020. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  2021. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  2022. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  2023. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  2024. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  2025. "created_at": "2015-05-05T23:40:12Z",
  2026. "updated_at": "2015-05-05T23:40:12Z",
  2027. "pushed_at": "2015-05-05T23:40:26Z",
  2028. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  2029. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  2030. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  2031. "svn_url": "https://github.com/baxterthehacker/public-repo",
  2032. "homepage": null,
  2033. "size": 0,
  2034. "stargazers_count": 0,
  2035. "watchers_count": 0,
  2036. "language": null,
  2037. "has_issues": true,
  2038. "has_downloads": true,
  2039. "has_wiki": true,
  2040. "has_pages": true,
  2041. "forks_count": 0,
  2042. "mirror_url": null,
  2043. "open_issues_count": 1,
  2044. "forks": 0,
  2045. "open_issues": 1,
  2046. "watchers": 0,
  2047. "default_branch": "master"
  2048. },
  2049. "sender": {
  2050. "login": "baxterthehacker",
  2051. "id": 6752317,
  2052. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  2053. "gravatar_id": "",
  2054. "url": "https://api.github.com/users/baxterthehacker",
  2055. "html_url": "https://github.com/baxterthehacker",
  2056. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  2057. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  2058. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  2059. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  2060. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  2061. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  2062. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  2063. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  2064. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  2065. "type": "User",
  2066. "site_admin": false
  2067. }
  2068. }"""
  2069. COMPARE_COMMITS_EXAMPLE = """{
  2070. "url": "https://api.github.com/repos/octocat/Hello-World/compare/master...topic",
  2071. "html_url": "https://github.com/octocat/Hello-World/compare/master...topic",
  2072. "permalink_url": "https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17",
  2073. "diff_url": "https://github.com/octocat/Hello-World/compare/master...topic.diff",
  2074. "patch_url": "https://github.com/octocat/Hello-World/compare/master...topic.patch",
  2075. "base_commit": {
  2076. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2077. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2078. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2079. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  2080. "commit": {
  2081. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2082. "author": {
  2083. "name": "Monalisa Octocat",
  2084. "email": "support@github.com",
  2085. "date": "2011-04-14T16:00:49Z"
  2086. },
  2087. "committer": {
  2088. "name": "Monalisa Octocat",
  2089. "email": "support@github.com",
  2090. "date": "2011-04-14T16:00:49Z"
  2091. },
  2092. "message": "Fix all the bugs",
  2093. "tree": {
  2094. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2095. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2096. },
  2097. "comment_count": 0,
  2098. "verification": {
  2099. "verified": true,
  2100. "reason": "valid",
  2101. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  2102. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  2103. }
  2104. },
  2105. "author": {
  2106. "login": "octocat",
  2107. "id": 1,
  2108. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2109. "gravatar_id": "",
  2110. "url": "https://api.github.com/users/octocat",
  2111. "html_url": "https://github.com/octocat",
  2112. "followers_url": "https://api.github.com/users/octocat/followers",
  2113. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2114. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2115. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2116. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2117. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2118. "repos_url": "https://api.github.com/users/octocat/repos",
  2119. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2120. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2121. "type": "User",
  2122. "site_admin": false
  2123. },
  2124. "committer": {
  2125. "login": "octocat",
  2126. "id": 1,
  2127. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2128. "gravatar_id": "",
  2129. "url": "https://api.github.com/users/octocat",
  2130. "html_url": "https://github.com/octocat",
  2131. "followers_url": "https://api.github.com/users/octocat/followers",
  2132. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2133. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2134. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2135. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2136. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2137. "repos_url": "https://api.github.com/users/octocat/repos",
  2138. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2139. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2140. "type": "User",
  2141. "site_admin": false
  2142. },
  2143. "parents": [
  2144. {
  2145. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2146. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2147. }
  2148. ]
  2149. },
  2150. "merge_base_commit": {
  2151. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2152. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2153. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2154. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  2155. "commit": {
  2156. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2157. "author": {
  2158. "name": "Monalisa Octocat",
  2159. "email": "support@github.com",
  2160. "date": "2011-04-14T16:00:49Z"
  2161. },
  2162. "committer": {
  2163. "name": "Monalisa Octocat",
  2164. "email": "support@github.com",
  2165. "date": "2011-04-14T16:00:49Z"
  2166. },
  2167. "message": "Fix all the bugs",
  2168. "tree": {
  2169. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2170. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2171. },
  2172. "comment_count": 0,
  2173. "verification": {
  2174. "verified": true,
  2175. "reason": "valid",
  2176. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  2177. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  2178. }
  2179. },
  2180. "author": {
  2181. "login": "octocat",
  2182. "id": 1,
  2183. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2184. "gravatar_id": "",
  2185. "url": "https://api.github.com/users/octocat",
  2186. "html_url": "https://github.com/octocat",
  2187. "followers_url": "https://api.github.com/users/octocat/followers",
  2188. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2189. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2190. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2191. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2192. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2193. "repos_url": "https://api.github.com/users/octocat/repos",
  2194. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2195. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2196. "type": "User",
  2197. "site_admin": false
  2198. },
  2199. "committer": {
  2200. "login": "octocat",
  2201. "id": 1,
  2202. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2203. "gravatar_id": "",
  2204. "url": "https://api.github.com/users/octocat",
  2205. "html_url": "https://github.com/octocat",
  2206. "followers_url": "https://api.github.com/users/octocat/followers",
  2207. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2208. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2209. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2210. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2211. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2212. "repos_url": "https://api.github.com/users/octocat/repos",
  2213. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2214. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2215. "type": "User",
  2216. "site_admin": false
  2217. },
  2218. "parents": [
  2219. {
  2220. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2221. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2222. }
  2223. ]
  2224. },
  2225. "status": "behind",
  2226. "ahead_by": 1,
  2227. "behind_by": 2,
  2228. "total_commits": 1,
  2229. "commits": [
  2230. {
  2231. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2232. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2233. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2234. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  2235. "commit": {
  2236. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2237. "author": {
  2238. "name": "Monalisa Octocat",
  2239. "email": "support@github.com",
  2240. "date": "2011-04-14T16:00:49Z"
  2241. },
  2242. "committer": {
  2243. "name": "Monalisa Octocat",
  2244. "email": "support@github.com",
  2245. "date": "2011-04-14T16:00:49Z"
  2246. },
  2247. "message": "Fix all the bugs",
  2248. "tree": {
  2249. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2250. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2251. },
  2252. "comment_count": 0,
  2253. "verification": {
  2254. "verified": true,
  2255. "reason": "valid",
  2256. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  2257. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  2258. }
  2259. },
  2260. "author": {
  2261. "login": "octocat",
  2262. "id": 1,
  2263. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2264. "gravatar_id": "",
  2265. "url": "https://api.github.com/users/octocat",
  2266. "html_url": "https://github.com/octocat",
  2267. "followers_url": "https://api.github.com/users/octocat/followers",
  2268. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2269. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2270. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2271. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2272. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2273. "repos_url": "https://api.github.com/users/octocat/repos",
  2274. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2275. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2276. "type": "User",
  2277. "site_admin": false
  2278. },
  2279. "committer": {
  2280. "login": "octocat",
  2281. "id": 1,
  2282. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2283. "gravatar_id": "",
  2284. "url": "https://api.github.com/users/octocat",
  2285. "html_url": "https://github.com/octocat",
  2286. "followers_url": "https://api.github.com/users/octocat/followers",
  2287. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2288. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2289. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2290. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2291. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2292. "repos_url": "https://api.github.com/users/octocat/repos",
  2293. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2294. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2295. "type": "User",
  2296. "site_admin": false
  2297. },
  2298. "parents": [
  2299. {
  2300. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2301. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2302. }
  2303. ]
  2304. }
  2305. ],
  2306. "files": [
  2307. {
  2308. "sha": "bbcd538c8e72b8c175046e27cc8f907076331401",
  2309. "filename": "file1.txt",
  2310. "status": "added",
  2311. "additions": 103,
  2312. "deletions": 21,
  2313. "changes": 124,
  2314. "blob_url": "https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt",
  2315. "raw_url": "https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt",
  2316. "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2317. "patch": "@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test"
  2318. }
  2319. ]
  2320. }"""
  2321. GET_LAST_COMMITS_EXAMPLE = """[
  2322. {
  2323. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2324. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2325. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2326. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  2327. "commit": {
  2328. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2329. "author": {
  2330. "name": "Monalisa Octocat",
  2331. "email": "support@github.com",
  2332. "date": "2011-04-14T16:00:49Z"
  2333. },
  2334. "committer": {
  2335. "name": "Monalisa Octocat",
  2336. "email": "support@github.com",
  2337. "date": "2011-04-14T16:00:49Z"
  2338. },
  2339. "message": "Fix all the bugs",
  2340. "tree": {
  2341. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2342. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2343. },
  2344. "comment_count": 0,
  2345. "verification": {
  2346. "verified": true,
  2347. "reason": "valid",
  2348. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  2349. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  2350. }
  2351. },
  2352. "author": {
  2353. "login": "octocat",
  2354. "id": 1,
  2355. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2356. "gravatar_id": "",
  2357. "url": "https://api.github.com/users/octocat",
  2358. "html_url": "https://github.com/octocat",
  2359. "followers_url": "https://api.github.com/users/octocat/followers",
  2360. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2361. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2362. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2363. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2364. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2365. "repos_url": "https://api.github.com/users/octocat/repos",
  2366. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2367. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2368. "type": "User",
  2369. "site_admin": false
  2370. },
  2371. "committer": {
  2372. "login": "octocat",
  2373. "id": 1,
  2374. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2375. "gravatar_id": "",
  2376. "url": "https://api.github.com/users/octocat",
  2377. "html_url": "https://github.com/octocat",
  2378. "followers_url": "https://api.github.com/users/octocat/followers",
  2379. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2380. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2381. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2382. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2383. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2384. "repos_url": "https://api.github.com/users/octocat/repos",
  2385. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2386. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2387. "type": "User",
  2388. "site_admin": false
  2389. },
  2390. "parents": [
  2391. {
  2392. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2393. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2394. }
  2395. ]
  2396. }
  2397. ]"""
  2398. GET_COMMIT_EXAMPLE = r"""
  2399. {
  2400. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2401. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2402. "node_id": "MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==",
  2403. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2404. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  2405. "commit": {
  2406. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2407. "author": {
  2408. "name": "Monalisa Octocat",
  2409. "email": "support@github.com",
  2410. "date": "2011-04-14T16:00:49Z"
  2411. },
  2412. "committer": {
  2413. "name": "Monalisa Octocat",
  2414. "email": "support@github.com",
  2415. "date": "2011-04-14T16:00:49Z"
  2416. },
  2417. "message": "Fix all the bugs",
  2418. "tree": {
  2419. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2420. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2421. },
  2422. "comment_count": 0,
  2423. "verification": {
  2424. "verified": false,
  2425. "reason": "unsigned",
  2426. "signature": null,
  2427. "payload": null
  2428. }
  2429. },
  2430. "author": {
  2431. "login": "octocat",
  2432. "id": 1,
  2433. "node_id": "MDQ6VXNlcjE=",
  2434. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2435. "gravatar_id": "",
  2436. "url": "https://api.github.com/users/octocat",
  2437. "html_url": "https://github.com/octocat",
  2438. "followers_url": "https://api.github.com/users/octocat/followers",
  2439. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2440. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2441. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2442. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2443. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2444. "repos_url": "https://api.github.com/users/octocat/repos",
  2445. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2446. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2447. "type": "User",
  2448. "site_admin": false
  2449. },
  2450. "committer": {
  2451. "login": "octocat",
  2452. "id": 1,
  2453. "node_id": "MDQ6VXNlcjE=",
  2454. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2455. "gravatar_id": "",
  2456. "url": "https://api.github.com/users/octocat",
  2457. "html_url": "https://github.com/octocat",
  2458. "followers_url": "https://api.github.com/users/octocat/followers",
  2459. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2460. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2461. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2462. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2463. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2464. "repos_url": "https://api.github.com/users/octocat/repos",
  2465. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2466. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2467. "type": "User",
  2468. "site_admin": false
  2469. },
  2470. "parents": [
  2471. {
  2472. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2473. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2474. }
  2475. ],
  2476. "stats": {
  2477. "additions": 104,
  2478. "deletions": 4,
  2479. "total": 108
  2480. },
  2481. "files": [
  2482. {
  2483. "filename": "file1.txt",
  2484. "additions": 10,
  2485. "deletions": 2,
  2486. "changes": 12,
  2487. "status": "modified",
  2488. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt",
  2489. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt",
  2490. "patch": "@@ -29,7 +29,7 @@\n....."
  2491. },
  2492. {
  2493. "filename": "added.txt",
  2494. "additions": 10,
  2495. "deletions": 0,
  2496. "changes": 0,
  2497. "status": "added",
  2498. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2499. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2500. "patch": "@@ -29,7 +29,7 @@\n....."
  2501. },
  2502. {
  2503. "filename": "removed.txt",
  2504. "additions": 0,
  2505. "deletions": 10,
  2506. "changes": 0,
  2507. "status": "removed",
  2508. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2509. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2510. "patch": "@@ -29,7 +29,7 @@\n....."
  2511. },
  2512. {
  2513. "filename": "renamed.txt",
  2514. "previous_filename": "old_name.txt",
  2515. "additions": 0,
  2516. "deletions": 0,
  2517. "changes": 0,
  2518. "status": "renamed",
  2519. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2520. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2521. "patch": "@@ -29,7 +29,7 @@\n....."
  2522. }
  2523. ]
  2524. }
  2525. """