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