github.py 143 KB

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