github.py 145 KB

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