github.py 149 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958
  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_DELETE_EVENT_EXAMPLE = """{
  596. "action": "deleted",
  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. },
  621. "sender": {
  622. "login": "octocat",
  623. "id": 1,
  624. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  625. "gravatar_id": "",
  626. "url": "https://api.github.com/users/octocat",
  627. "html_url": "https://github.com/octocat",
  628. "followers_url": "https://api.github.com/users/octocat/followers",
  629. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  630. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  631. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  632. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  633. "organizations_url": "https://api.github.com/users/octocat/orgs",
  634. "repos_url": "https://api.github.com/users/octocat/repos",
  635. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  636. "received_events_url": "https://api.github.com/users/octocat/received_events",
  637. "type": "User",
  638. "site_admin": false
  639. }
  640. }"""
  641. INSTALLATION_REPO_EVENT = """{
  642. "action": "added",
  643. "installation": {
  644. "id": 2,
  645. "account": {
  646. "login": "octocat",
  647. "id": 1,
  648. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  649. "gravatar_id": "",
  650. "url": "https://api.github.com/users/octocat",
  651. "html_url": "https://github.com/octocat",
  652. "followers_url": "https://api.github.com/users/octocat/followers",
  653. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  654. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  655. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  656. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  657. "organizations_url": "https://api.github.com/users/octocat/orgs",
  658. "repos_url": "https://api.github.com/users/octocat/repos",
  659. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  660. "received_events_url": "https://api.github.com/users/octocat/received_events",
  661. "type": "User",
  662. "site_admin": false
  663. },
  664. "access_tokens_url": "https://api.github.com/installations/2/access_tokens",
  665. "repositories_url": "https://api.github.com/installation/repositories",
  666. "html_url": "https://github.com/settings/installations/2"
  667. },
  668. "repository_selection": "selected",
  669. "repositories_added": [
  670. {
  671. "id": 1296269,
  672. "name": "Hello-World",
  673. "full_name": "octocat/Hello-World"
  674. }
  675. ],
  676. "repositories_removed": [
  677. ],
  678. "sender": {
  679. "login": "octocat",
  680. "id": 1,
  681. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  682. "gravatar_id": "",
  683. "url": "https://api.github.com/users/octocat",
  684. "html_url": "https://github.com/octocat",
  685. "followers_url": "https://api.github.com/users/octocat/followers",
  686. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  687. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  688. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  689. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  690. "organizations_url": "https://api.github.com/users/octocat/orgs",
  691. "repos_url": "https://api.github.com/users/octocat/repos",
  692. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  693. "received_events_url": "https://api.github.com/users/octocat/received_events",
  694. "type": "User",
  695. "site_admin": false
  696. }
  697. }"""
  698. INSTALLATION_REPOSITORIES_API_RESPONSE = """{
  699. "total_count": 1,
  700. "repositories": [
  701. {
  702. "id": 1296269,
  703. "owner": {
  704. "login": "octocat",
  705. "id": 1,
  706. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  707. "gravatar_id": "",
  708. "url": "https://api.github.com/users/octocat",
  709. "html_url": "https://github.com/octocat",
  710. "followers_url": "https://api.github.com/users/octocat/followers",
  711. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  712. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  713. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  714. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  715. "organizations_url": "https://api.github.com/users/octocat/orgs",
  716. "repos_url": "https://api.github.com/users/octocat/repos",
  717. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  718. "received_events_url": "https://api.github.com/users/octocat/received_events",
  719. "type": "User",
  720. "site_admin": false
  721. },
  722. "name": "Hello-World",
  723. "full_name": "octocat/Hello-World",
  724. "description": "This your first repo!",
  725. "private": false,
  726. "fork": false,
  727. "url": "https://api.github.com/repos/octocat/Hello-World",
  728. "html_url": "https://github.com/octocat/Hello-World",
  729. "archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
  730. "assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
  731. "blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
  732. "branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
  733. "clone_url": "https://github.com/octocat/Hello-World.git",
  734. "collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
  735. "comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
  736. "commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
  737. "compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
  738. "contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
  739. "contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
  740. "deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
  741. "downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
  742. "events_url": "http://api.github.com/repos/octocat/Hello-World/events",
  743. "forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
  744. "git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
  745. "git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
  746. "git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
  747. "git_url": "git:github.com/octocat/Hello-World.git",
  748. "hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
  749. "issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
  750. "issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
  751. "issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
  752. "keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
  753. "labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
  754. "languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
  755. "merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
  756. "milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
  757. "mirror_url": "git:git.example.com/octocat/Hello-World",
  758. "notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}",
  759. "pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
  760. "releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
  761. "ssh_url": "git@github.com:octocat/Hello-World.git",
  762. "stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
  763. "statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
  764. "subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
  765. "subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
  766. "svn_url": "https://svn.github.com/octocat/Hello-World",
  767. "tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
  768. "teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
  769. "trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
  770. "homepage": "https://github.com",
  771. "language": null,
  772. "forks_count": 9,
  773. "stargazers_count": 80,
  774. "watchers_count": 80,
  775. "size": 108,
  776. "default_branch": "master",
  777. "open_issues_count": 0,
  778. "topics": [
  779. "octocat",
  780. "atom",
  781. "electron",
  782. "API"
  783. ],
  784. "has_issues": true,
  785. "has_wiki": true,
  786. "has_pages": false,
  787. "has_downloads": true,
  788. "pushed_at": "2011-01-26T19:06:43Z",
  789. "created_at": "2011-01-26T19:01:12Z",
  790. "updated_at": "2011-01-26T19:14:43Z",
  791. "allow_rebase_merge": true,
  792. "allow_squash_merge": true,
  793. "allow_merge_commit": true,
  794. "subscribers_count": 42,
  795. "network_count": 0
  796. }
  797. ]
  798. }"""
  799. INSTALLATION_API_RESPONSE = """{
  800. "id": 2,
  801. "account": {
  802. "login": "octocat",
  803. "id": 2,
  804. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  805. "gravatar_id": "",
  806. "url": "https://api.github.com/users/octocat",
  807. "html_url": "https://github.com/octocat",
  808. "followers_url": "https://api.github.com/users/octocat/followers",
  809. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  810. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  811. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  812. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  813. "organizations_url": "https://api.github.com/users/octocat/orgs",
  814. "repos_url": "https://api.github.com/users/octocat/repos",
  815. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  816. "received_events_url": "https://api.github.com/users/octocat/received_events",
  817. "type": "User",
  818. "site_admin": false
  819. },
  820. "access_tokens_url": "https://api.github.com/installations/1/access_tokens",
  821. "repositories_url": "https://api.github.com/installation/repositories",
  822. "html_url": "https://github.com/organizations/github/settings/installations/1",
  823. "app_id": 1,
  824. "target_id": 1,
  825. "target_type": "Organization",
  826. "permissions": {
  827. "metadata": "read",
  828. "contents": "read",
  829. "issues": "write",
  830. "single_file": "write"
  831. },
  832. "events": [
  833. "push",
  834. "pull_request"
  835. ],
  836. "single_file_name": "config.yml"
  837. }"""
  838. LIST_INSTALLATION_API_RESPONSE = """{
  839. "total_count": 2,
  840. "installations": [
  841. {
  842. "id": 1,
  843. "account": {
  844. "login": "github",
  845. "id": 1,
  846. "url": "https://api.github.com/orgs/github",
  847. "repos_url": "https://api.github.com/orgs/github/repos",
  848. "events_url": "https://api.github.com/orgs/github/events",
  849. "hooks_url": "https://api.github.com/orgs/github/hooks",
  850. "issues_url": "https://api.github.com/orgs/github/issues",
  851. "members_url": "https://api.github.com/orgs/github/members{/member}",
  852. "public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
  853. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  854. "description": "A great organization"
  855. },
  856. "access_tokens_url": "https://api.github.com/installations/1/access_tokens",
  857. "repositories_url": "https://api.github.com/installation/repositories",
  858. "html_url": "https://github.com/organizations/github/settings/installations/1",
  859. "app_id": 1,
  860. "target_id": 1,
  861. "target_type": "Organization",
  862. "permissions": {
  863. "metadata": "read",
  864. "contents": "read",
  865. "issues": "write",
  866. "single_file": "write"
  867. },
  868. "events": [
  869. "push",
  870. "pull_request"
  871. ],
  872. "single_file_name": "config.yml"
  873. },
  874. {
  875. "id": 3,
  876. "account": {
  877. "login": "octocat",
  878. "id": 2,
  879. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  880. "gravatar_id": "",
  881. "url": "https://api.github.com/users/octocat",
  882. "html_url": "https://github.com/octocat",
  883. "followers_url": "https://api.github.com/users/octocat/followers",
  884. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  885. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  886. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  887. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  888. "organizations_url": "https://api.github.com/users/octocat/orgs",
  889. "repos_url": "https://api.github.com/users/octocat/repos",
  890. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  891. "received_events_url": "https://api.github.com/users/octocat/received_events",
  892. "type": "User",
  893. "site_admin": false
  894. },
  895. "access_tokens_url": "https://api.github.com/installations/1/access_tokens",
  896. "repositories_url": "https://api.github.com/installation/repositories",
  897. "html_url": "https://github.com/organizations/github/settings/installations/1",
  898. "app_id": 1,
  899. "target_id": 1,
  900. "target_type": "Organization",
  901. "permissions": {
  902. "metadata": "read",
  903. "contents": "read",
  904. "issues": "write",
  905. "single_file": "write"
  906. },
  907. "events": [
  908. "push",
  909. "pull_request"
  910. ],
  911. "single_file_name": "config.yml"
  912. }
  913. ]
  914. }"""
  915. PULL_REQUEST_OPENED_EVENT_EXAMPLE = b"""{
  916. "installation" : {
  917. "id": 12345
  918. },
  919. "action": "opened",
  920. "number": 1,
  921. "pull_request": {
  922. "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",
  923. "id": 34778301,
  924. "html_url": "https://github.com/baxterthehacker/public-repo/pull/1",
  925. "diff_url": "https://github.com/baxterthehacker/public-repo/pull/1.diff",
  926. "patch_url": "https://github.com/baxterthehacker/public-repo/pull/1.patch",
  927. "issue_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1",
  928. "number": 1,
  929. "state": "open",
  930. "locked": false,
  931. "title": "Update the README with new information",
  932. "user": {
  933. "login": "baxterthehacker",
  934. "id": 6752317,
  935. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  936. "gravatar_id": "",
  937. "url": "https://api.github.com/users/baxterthehacker",
  938. "html_url": "https://github.com/baxterthehacker",
  939. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  940. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  941. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  942. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  943. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  944. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  945. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  946. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  947. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  948. "type": "User",
  949. "site_admin": false
  950. },
  951. "body": "This is a pretty simple change that we need to pull into master. Fixes BAR-7",
  952. "created_at": "2015-05-05T23:40:27Z",
  953. "updated_at": "2015-05-05T23:40:27Z",
  954. "closed_at": null,
  955. "merged_at": null,
  956. "merge_commit_sha": null,
  957. "assignee": null,
  958. "milestone": null,
  959. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits",
  960. "review_comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments",
  961. "review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}",
  962. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments",
  963. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  964. "head": {
  965. "label": "baxterthehacker:changes",
  966. "ref": "changes",
  967. "sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  968. "user": {
  969. "login": "baxterthehacker",
  970. "id": 6752317,
  971. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  972. "gravatar_id": "",
  973. "url": "https://api.github.com/users/baxterthehacker",
  974. "html_url": "https://github.com/baxterthehacker",
  975. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  976. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  977. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  978. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  979. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  980. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  981. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  982. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  983. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  984. "type": "User",
  985. "site_admin": false
  986. },
  987. "repo": {
  988. "id": 35129377,
  989. "name": "public-repo",
  990. "full_name": "baxterthehacker/public-repo",
  991. "owner": {
  992. "login": "baxterthehacker",
  993. "id": 6752317,
  994. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  995. "gravatar_id": "",
  996. "url": "https://api.github.com/users/baxterthehacker",
  997. "html_url": "https://github.com/baxterthehacker",
  998. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  999. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1000. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1001. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1002. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1003. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1004. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1005. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1006. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1007. "type": "User",
  1008. "site_admin": false
  1009. },
  1010. "private": false,
  1011. "html_url": "https://github.com/baxterthehacker/public-repo",
  1012. "description": "",
  1013. "fork": false,
  1014. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1015. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1016. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1017. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1018. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1019. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1020. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1021. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1022. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1023. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1024. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1025. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1026. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1027. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1028. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1029. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1030. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1031. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1032. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1033. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1034. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1035. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1036. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1037. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1038. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1039. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1040. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1041. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1042. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1043. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1044. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1045. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1046. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1047. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1048. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1049. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1050. "created_at": "2015-05-05T23:40:12Z",
  1051. "updated_at": "2015-05-05T23:40:12Z",
  1052. "pushed_at": "2015-05-05T23:40:26Z",
  1053. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1054. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1055. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1056. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1057. "homepage": null,
  1058. "size": 0,
  1059. "stargazers_count": 0,
  1060. "watchers_count": 0,
  1061. "language": null,
  1062. "has_issues": true,
  1063. "has_downloads": true,
  1064. "has_wiki": true,
  1065. "has_pages": true,
  1066. "forks_count": 0,
  1067. "mirror_url": null,
  1068. "open_issues_count": 1,
  1069. "forks": 0,
  1070. "open_issues": 1,
  1071. "watchers": 0,
  1072. "default_branch": "master"
  1073. }
  1074. },
  1075. "base": {
  1076. "label": "baxterthehacker:master",
  1077. "ref": "master",
  1078. "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
  1079. "user": {
  1080. "login": "baxterthehacker",
  1081. "id": 6752317,
  1082. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1083. "gravatar_id": "",
  1084. "url": "https://api.github.com/users/baxterthehacker",
  1085. "html_url": "https://github.com/baxterthehacker",
  1086. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1087. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1088. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1089. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1090. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1091. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1092. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1093. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1094. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1095. "type": "User",
  1096. "site_admin": false
  1097. },
  1098. "repo": {
  1099. "id": 35129377,
  1100. "name": "public-repo",
  1101. "full_name": "baxterthehacker/public-repo",
  1102. "owner": {
  1103. "login": "baxterthehacker",
  1104. "id": 6752317,
  1105. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1106. "gravatar_id": "",
  1107. "url": "https://api.github.com/users/baxterthehacker",
  1108. "html_url": "https://github.com/baxterthehacker",
  1109. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1110. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1111. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1112. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1113. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1114. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1115. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1116. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1117. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1118. "type": "User",
  1119. "site_admin": false
  1120. },
  1121. "private": false,
  1122. "html_url": "https://github.com/baxterthehacker/public-repo",
  1123. "description": "",
  1124. "fork": false,
  1125. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1126. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1127. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1128. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1129. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1130. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1131. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1132. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1133. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1134. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1135. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1136. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1137. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1138. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1139. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1140. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1141. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1142. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1143. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1144. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1145. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1146. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1147. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1148. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1149. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1150. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1151. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1152. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1153. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1154. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1155. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1156. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1157. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1158. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1159. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1160. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1161. "created_at": "2015-05-05T23:40:12Z",
  1162. "updated_at": "2015-05-05T23:40:12Z",
  1163. "pushed_at": "2015-05-05T23:40:26Z",
  1164. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1165. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1166. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1167. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1168. "homepage": null,
  1169. "size": 0,
  1170. "stargazers_count": 0,
  1171. "watchers_count": 0,
  1172. "language": null,
  1173. "has_issues": true,
  1174. "has_downloads": true,
  1175. "has_wiki": true,
  1176. "has_pages": true,
  1177. "forks_count": 0,
  1178. "mirror_url": null,
  1179. "open_issues_count": 1,
  1180. "forks": 0,
  1181. "open_issues": 1,
  1182. "watchers": 0,
  1183. "default_branch": "master"
  1184. }
  1185. },
  1186. "_links": {
  1187. "self": {
  1188. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1"
  1189. },
  1190. "html": {
  1191. "href": "https://github.com/baxterthehacker/public-repo/pull/1"
  1192. },
  1193. "issue": {
  1194. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1"
  1195. },
  1196. "comments": {
  1197. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments"
  1198. },
  1199. "review_comments": {
  1200. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments"
  1201. },
  1202. "review_comment": {
  1203. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}"
  1204. },
  1205. "commits": {
  1206. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits"
  1207. },
  1208. "statuses": {
  1209. "href": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c"
  1210. }
  1211. },
  1212. "merged": false,
  1213. "mergeable": null,
  1214. "mergeable_state": "unknown",
  1215. "merged_by": null,
  1216. "comments": 0,
  1217. "review_comments": 0,
  1218. "commits": 1,
  1219. "additions": 1,
  1220. "deletions": 1,
  1221. "changed_files": 1
  1222. },
  1223. "repository": {
  1224. "id": 35129377,
  1225. "name": "public-repo",
  1226. "full_name": "baxterthehacker/public-repo",
  1227. "owner": {
  1228. "login": "baxterthehacker",
  1229. "id": 6752317,
  1230. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1231. "gravatar_id": "",
  1232. "url": "https://api.github.com/users/baxterthehacker",
  1233. "html_url": "https://github.com/baxterthehacker",
  1234. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1235. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1236. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1237. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1238. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1239. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1240. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1241. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1242. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1243. "type": "User",
  1244. "site_admin": false
  1245. },
  1246. "private": false,
  1247. "html_url": "https://github.com/baxterthehacker/public-repo",
  1248. "description": "",
  1249. "fork": false,
  1250. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1251. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1252. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1253. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1254. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1255. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1256. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1257. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1258. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1259. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1260. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1261. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1262. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1263. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1264. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1265. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1266. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1267. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1268. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1269. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1270. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1271. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1272. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1273. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1274. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1275. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1276. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1277. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1278. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1279. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1280. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1281. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1282. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1283. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1284. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1285. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1286. "created_at": "2015-05-05T23:40:12Z",
  1287. "updated_at": "2015-05-05T23:40:12Z",
  1288. "pushed_at": "2015-05-05T23:40:26Z",
  1289. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1290. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1291. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1292. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1293. "homepage": null,
  1294. "size": 0,
  1295. "stargazers_count": 0,
  1296. "watchers_count": 0,
  1297. "language": null,
  1298. "has_issues": true,
  1299. "has_downloads": true,
  1300. "has_wiki": true,
  1301. "has_pages": true,
  1302. "forks_count": 0,
  1303. "mirror_url": null,
  1304. "open_issues_count": 1,
  1305. "forks": 0,
  1306. "open_issues": 1,
  1307. "watchers": 0,
  1308. "default_branch": "master"
  1309. },
  1310. "sender": {
  1311. "login": "baxterthehacker",
  1312. "id": 6752317,
  1313. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1314. "gravatar_id": "",
  1315. "url": "https://api.github.com/users/baxterthehacker",
  1316. "html_url": "https://github.com/baxterthehacker",
  1317. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1318. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1319. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1320. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1321. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1322. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1323. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1324. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1325. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1326. "type": "User",
  1327. "site_admin": false
  1328. }
  1329. }"""
  1330. PULL_REQUEST_EDITED_EVENT_EXAMPLE = b"""{
  1331. "installation" : {
  1332. "id": 12345
  1333. },
  1334. "action": "edited",
  1335. "number": 1,
  1336. "pull_request": {
  1337. "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",
  1338. "id": 34778301,
  1339. "html_url": "https://github.com/baxterthehacker/public-repo/pull/1",
  1340. "diff_url": "https://github.com/baxterthehacker/public-repo/pull/1.diff",
  1341. "patch_url": "https://github.com/baxterthehacker/public-repo/pull/1.patch",
  1342. "issue_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1",
  1343. "number": 1,
  1344. "state": "open",
  1345. "locked": false,
  1346. "title": "new edited title",
  1347. "user": {
  1348. "login": "baxterthehacker",
  1349. "id": 6752317,
  1350. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1351. "gravatar_id": "",
  1352. "url": "https://api.github.com/users/baxterthehacker",
  1353. "html_url": "https://github.com/baxterthehacker",
  1354. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1355. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1356. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1357. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1358. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1359. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1360. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1361. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1362. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1363. "type": "User",
  1364. "site_admin": false
  1365. },
  1366. "body": "new edited body. Fixes BAR-7",
  1367. "created_at": "2015-05-05T23:40:27Z",
  1368. "updated_at": "2015-05-05T23:40:27Z",
  1369. "closed_at": null,
  1370. "merged_at": null,
  1371. "merge_commit_sha": null,
  1372. "assignee": null,
  1373. "milestone": null,
  1374. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits",
  1375. "review_comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments",
  1376. "review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}",
  1377. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments",
  1378. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  1379. "head": {
  1380. "label": "baxterthehacker:changes",
  1381. "ref": "changes",
  1382. "sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  1383. "user": {
  1384. "login": "baxterthehacker",
  1385. "id": 6752317,
  1386. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1387. "gravatar_id": "",
  1388. "url": "https://api.github.com/users/baxterthehacker",
  1389. "html_url": "https://github.com/baxterthehacker",
  1390. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1391. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1392. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1393. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1394. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1395. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1396. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1397. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1398. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1399. "type": "User",
  1400. "site_admin": false
  1401. },
  1402. "repo": {
  1403. "id": 35129377,
  1404. "name": "public-repo",
  1405. "full_name": "baxterthehacker/public-repo",
  1406. "owner": {
  1407. "login": "baxterthehacker",
  1408. "id": 6752317,
  1409. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1410. "gravatar_id": "",
  1411. "url": "https://api.github.com/users/baxterthehacker",
  1412. "html_url": "https://github.com/baxterthehacker",
  1413. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1414. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1415. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1416. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1417. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1418. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1419. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1420. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1421. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1422. "type": "User",
  1423. "site_admin": false
  1424. },
  1425. "private": false,
  1426. "html_url": "https://github.com/baxterthehacker/public-repo",
  1427. "description": "",
  1428. "fork": false,
  1429. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1430. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1431. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1432. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1433. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1434. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1435. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1436. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1437. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1438. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1439. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1440. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1441. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1442. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1443. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1444. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1445. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1446. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1447. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1448. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1449. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1450. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1451. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1452. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1453. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1454. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1455. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1456. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1457. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1458. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1459. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1460. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1461. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1462. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1463. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1464. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1465. "created_at": "2015-05-05T23:40:12Z",
  1466. "updated_at": "2015-05-05T23:40:12Z",
  1467. "pushed_at": "2015-05-05T23:40:26Z",
  1468. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1469. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1470. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1471. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1472. "homepage": null,
  1473. "size": 0,
  1474. "stargazers_count": 0,
  1475. "watchers_count": 0,
  1476. "language": null,
  1477. "has_issues": true,
  1478. "has_downloads": true,
  1479. "has_wiki": true,
  1480. "has_pages": true,
  1481. "forks_count": 0,
  1482. "mirror_url": null,
  1483. "open_issues_count": 1,
  1484. "forks": 0,
  1485. "open_issues": 1,
  1486. "watchers": 0,
  1487. "default_branch": "master"
  1488. }
  1489. },
  1490. "base": {
  1491. "label": "baxterthehacker:master",
  1492. "ref": "master",
  1493. "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
  1494. "user": {
  1495. "login": "baxterthehacker",
  1496. "id": 6752317,
  1497. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1498. "gravatar_id": "",
  1499. "url": "https://api.github.com/users/baxterthehacker",
  1500. "html_url": "https://github.com/baxterthehacker",
  1501. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1502. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1503. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1504. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1505. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1506. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1507. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1508. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1509. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1510. "type": "User",
  1511. "site_admin": false
  1512. },
  1513. "repo": {
  1514. "id": 35129377,
  1515. "name": "public-repo",
  1516. "full_name": "baxterthehacker/public-repo",
  1517. "owner": {
  1518. "login": "baxterthehacker",
  1519. "id": 6752317,
  1520. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1521. "gravatar_id": "",
  1522. "url": "https://api.github.com/users/baxterthehacker",
  1523. "html_url": "https://github.com/baxterthehacker",
  1524. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1525. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1526. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1527. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1528. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1529. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1530. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1531. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1532. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1533. "type": "User",
  1534. "site_admin": false
  1535. },
  1536. "private": false,
  1537. "html_url": "https://github.com/baxterthehacker/public-repo",
  1538. "description": "",
  1539. "fork": false,
  1540. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1541. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1542. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1543. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1544. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1545. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1546. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1547. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1548. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1549. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1550. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1551. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1552. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1553. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1554. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1555. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1556. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1557. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1558. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1559. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1560. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1561. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1562. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1563. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1564. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1565. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1566. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1567. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1568. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1569. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1570. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1571. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1572. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1573. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1574. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1575. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1576. "created_at": "2015-05-05T23:40:12Z",
  1577. "updated_at": "2015-05-05T23:40:12Z",
  1578. "pushed_at": "2015-05-05T23:40:26Z",
  1579. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1580. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1581. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1582. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1583. "homepage": null,
  1584. "size": 0,
  1585. "stargazers_count": 0,
  1586. "watchers_count": 0,
  1587. "language": null,
  1588. "has_issues": true,
  1589. "has_downloads": true,
  1590. "has_wiki": true,
  1591. "has_pages": true,
  1592. "forks_count": 0,
  1593. "mirror_url": null,
  1594. "open_issues_count": 1,
  1595. "forks": 0,
  1596. "open_issues": 1,
  1597. "watchers": 0,
  1598. "default_branch": "master"
  1599. }
  1600. },
  1601. "_links": {
  1602. "self": {
  1603. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1"
  1604. },
  1605. "html": {
  1606. "href": "https://github.com/baxterthehacker/public-repo/pull/1"
  1607. },
  1608. "issue": {
  1609. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1"
  1610. },
  1611. "comments": {
  1612. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments"
  1613. },
  1614. "review_comments": {
  1615. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments"
  1616. },
  1617. "review_comment": {
  1618. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}"
  1619. },
  1620. "commits": {
  1621. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits"
  1622. },
  1623. "statuses": {
  1624. "href": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c"
  1625. }
  1626. },
  1627. "merged": false,
  1628. "mergeable": null,
  1629. "mergeable_state": "unknown",
  1630. "merged_by": null,
  1631. "comments": 0,
  1632. "review_comments": 0,
  1633. "commits": 1,
  1634. "additions": 1,
  1635. "deletions": 1,
  1636. "changed_files": 1
  1637. },
  1638. "repository": {
  1639. "id": 35129377,
  1640. "name": "public-repo",
  1641. "full_name": "baxterthehacker/public-repo",
  1642. "owner": {
  1643. "login": "baxterthehacker",
  1644. "id": 6752317,
  1645. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1646. "gravatar_id": "",
  1647. "url": "https://api.github.com/users/baxterthehacker",
  1648. "html_url": "https://github.com/baxterthehacker",
  1649. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1650. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1651. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1652. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1653. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1654. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1655. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1656. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1657. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1658. "type": "User",
  1659. "site_admin": false
  1660. },
  1661. "private": false,
  1662. "html_url": "https://github.com/baxterthehacker/public-repo",
  1663. "description": "",
  1664. "fork": false,
  1665. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1666. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1667. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1668. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1669. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1670. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1671. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1672. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1673. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1674. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1675. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1676. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1677. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1678. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1679. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1680. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1681. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1682. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1683. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1684. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1685. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1686. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1687. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1688. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1689. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1690. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1691. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1692. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1693. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1694. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1695. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1696. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1697. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1698. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1699. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1700. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1701. "created_at": "2015-05-05T23:40:12Z",
  1702. "updated_at": "2015-05-05T23:40:12Z",
  1703. "pushed_at": "2015-05-05T23:40:26Z",
  1704. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1705. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1706. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1707. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1708. "homepage": null,
  1709. "size": 0,
  1710. "stargazers_count": 0,
  1711. "watchers_count": 0,
  1712. "language": null,
  1713. "has_issues": true,
  1714. "has_downloads": true,
  1715. "has_wiki": true,
  1716. "has_pages": true,
  1717. "forks_count": 0,
  1718. "mirror_url": null,
  1719. "open_issues_count": 1,
  1720. "forks": 0,
  1721. "open_issues": 1,
  1722. "watchers": 0,
  1723. "default_branch": "master"
  1724. },
  1725. "sender": {
  1726. "login": "baxterthehacker",
  1727. "id": 6752317,
  1728. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1729. "gravatar_id": "",
  1730. "url": "https://api.github.com/users/baxterthehacker",
  1731. "html_url": "https://github.com/baxterthehacker",
  1732. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1733. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1734. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1735. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1736. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1737. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1738. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1739. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1740. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1741. "type": "User",
  1742. "site_admin": false
  1743. }
  1744. }"""
  1745. PULL_REQUEST_CLOSED_EVENT_EXAMPLE = b"""{
  1746. "installation" : {
  1747. "id": 12345
  1748. },
  1749. "action": "closed",
  1750. "number": 1,
  1751. "pull_request": {
  1752. "url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1",
  1753. "id": 34778301,
  1754. "html_url": "https://github.com/baxterthehacker/public-repo/pull/1",
  1755. "diff_url": "https://github.com/baxterthehacker/public-repo/pull/1.diff",
  1756. "patch_url": "https://github.com/baxterthehacker/public-repo/pull/1.patch",
  1757. "issue_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1",
  1758. "number": 1,
  1759. "state": "open",
  1760. "locked": false,
  1761. "title": "new closed title",
  1762. "user": {
  1763. "login": "baxterthehacker",
  1764. "id": 6752317,
  1765. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1766. "gravatar_id": "",
  1767. "url": "https://api.github.com/users/baxterthehacker",
  1768. "html_url": "https://github.com/baxterthehacker",
  1769. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1770. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1771. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1772. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1773. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1774. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1775. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1776. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1777. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1778. "type": "User",
  1779. "site_admin": false
  1780. },
  1781. "body": "new closed body",
  1782. "created_at": "2015-05-05T23:40:27Z",
  1783. "updated_at": "2015-05-05T23:40:27Z",
  1784. "closed_at": "2015-05-05T23:40:27Z",
  1785. "merged_at": "2015-05-05T23:40:27Z",
  1786. "merge_commit_sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  1787. "assignee": null,
  1788. "milestone": null,
  1789. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits",
  1790. "review_comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments",
  1791. "review_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}",
  1792. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments",
  1793. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  1794. "head": {
  1795. "label": "baxterthehacker:changes",
  1796. "ref": "changes",
  1797. "sha": "0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c",
  1798. "user": {
  1799. "login": "baxterthehacker",
  1800. "id": 6752317,
  1801. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1802. "gravatar_id": "",
  1803. "url": "https://api.github.com/users/baxterthehacker",
  1804. "html_url": "https://github.com/baxterthehacker",
  1805. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1806. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1807. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1808. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1809. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1810. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1811. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1812. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1813. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1814. "type": "User",
  1815. "site_admin": false
  1816. },
  1817. "repo": {
  1818. "id": 35129377,
  1819. "name": "public-repo",
  1820. "full_name": "baxterthehacker/public-repo",
  1821. "owner": {
  1822. "login": "baxterthehacker",
  1823. "id": 6752317,
  1824. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1825. "gravatar_id": "",
  1826. "url": "https://api.github.com/users/baxterthehacker",
  1827. "html_url": "https://github.com/baxterthehacker",
  1828. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1829. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1830. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1831. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1832. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1833. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1834. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1835. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1836. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1837. "type": "User",
  1838. "site_admin": false
  1839. },
  1840. "private": false,
  1841. "html_url": "https://github.com/baxterthehacker/public-repo",
  1842. "description": "",
  1843. "fork": false,
  1844. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1845. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1846. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1847. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1848. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1849. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1850. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1851. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1852. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1853. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1854. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1855. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1856. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1857. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1858. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1859. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1860. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1861. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1862. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1863. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1864. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1865. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1866. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1867. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1868. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1869. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1870. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1871. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1872. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1873. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1874. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1875. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1876. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1877. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1878. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1879. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1880. "created_at": "2015-05-05T23:40:12Z",
  1881. "updated_at": "2015-05-05T23:40:12Z",
  1882. "pushed_at": "2015-05-05T23:40:26Z",
  1883. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1884. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1885. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1886. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1887. "homepage": null,
  1888. "size": 0,
  1889. "stargazers_count": 0,
  1890. "watchers_count": 0,
  1891. "language": null,
  1892. "has_issues": true,
  1893. "has_downloads": true,
  1894. "has_wiki": true,
  1895. "has_pages": true,
  1896. "forks_count": 0,
  1897. "mirror_url": null,
  1898. "open_issues_count": 1,
  1899. "forks": 0,
  1900. "open_issues": 1,
  1901. "watchers": 0,
  1902. "default_branch": "master"
  1903. }
  1904. },
  1905. "base": {
  1906. "label": "baxterthehacker:master",
  1907. "ref": "master",
  1908. "sha": "9049f1265b7d61be4a8904a9a27120d2064dab3b",
  1909. "user": {
  1910. "login": "baxterthehacker",
  1911. "id": 6752317,
  1912. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1913. "gravatar_id": "",
  1914. "url": "https://api.github.com/users/baxterthehacker",
  1915. "html_url": "https://github.com/baxterthehacker",
  1916. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1917. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1918. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1919. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1920. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1921. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1922. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1923. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1924. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1925. "type": "User",
  1926. "site_admin": false
  1927. },
  1928. "repo": {
  1929. "id": 35129377,
  1930. "name": "public-repo",
  1931. "full_name": "baxterthehacker/public-repo",
  1932. "owner": {
  1933. "login": "baxterthehacker",
  1934. "id": 6752317,
  1935. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  1936. "gravatar_id": "",
  1937. "url": "https://api.github.com/users/baxterthehacker",
  1938. "html_url": "https://github.com/baxterthehacker",
  1939. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  1940. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  1941. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  1942. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  1943. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  1944. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  1945. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  1946. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  1947. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  1948. "type": "User",
  1949. "site_admin": false
  1950. },
  1951. "private": false,
  1952. "html_url": "https://github.com/baxterthehacker/public-repo",
  1953. "description": "",
  1954. "fork": false,
  1955. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  1956. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  1957. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  1958. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  1959. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  1960. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  1961. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  1962. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  1963. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  1964. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  1965. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  1966. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  1967. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  1968. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  1969. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  1970. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  1971. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  1972. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  1973. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  1974. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  1975. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  1976. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  1977. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  1978. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  1979. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  1980. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  1981. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  1982. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  1983. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  1984. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  1985. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  1986. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  1987. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  1988. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  1989. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  1990. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  1991. "created_at": "2015-05-05T23:40:12Z",
  1992. "updated_at": "2015-05-05T23:40:12Z",
  1993. "pushed_at": "2015-05-05T23:40:26Z",
  1994. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  1995. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  1996. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  1997. "svn_url": "https://github.com/baxterthehacker/public-repo",
  1998. "homepage": null,
  1999. "size": 0,
  2000. "stargazers_count": 0,
  2001. "watchers_count": 0,
  2002. "language": null,
  2003. "has_issues": true,
  2004. "has_downloads": true,
  2005. "has_wiki": true,
  2006. "has_pages": true,
  2007. "forks_count": 0,
  2008. "mirror_url": null,
  2009. "open_issues_count": 1,
  2010. "forks": 0,
  2011. "open_issues": 1,
  2012. "watchers": 0,
  2013. "default_branch": "master"
  2014. }
  2015. },
  2016. "_links": {
  2017. "self": {
  2018. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1"
  2019. },
  2020. "html": {
  2021. "href": "https://github.com/baxterthehacker/public-repo/pull/1"
  2022. },
  2023. "issue": {
  2024. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1"
  2025. },
  2026. "comments": {
  2027. "href": "https://api.github.com/repos/baxterthehacker/public-repo/issues/1/comments"
  2028. },
  2029. "review_comments": {
  2030. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/comments"
  2031. },
  2032. "review_comment": {
  2033. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/comments{/number}"
  2034. },
  2035. "commits": {
  2036. "href": "https://api.github.com/repos/baxterthehacker/public-repo/pulls/1/commits"
  2037. },
  2038. "statuses": {
  2039. "href": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/0d1a26e67d8f5eaf1f6ba5c57fc3c7d91ac0fd1c"
  2040. }
  2041. },
  2042. "merged": true,
  2043. "mergeable": null,
  2044. "mergeable_state": "unknown",
  2045. "merged_by": null,
  2046. "comments": 0,
  2047. "review_comments": 0,
  2048. "commits": 1,
  2049. "additions": 1,
  2050. "deletions": 1,
  2051. "changed_files": 1
  2052. },
  2053. "repository": {
  2054. "id": 35129377,
  2055. "name": "public-repo",
  2056. "full_name": "baxterthehacker/public-repo",
  2057. "owner": {
  2058. "login": "baxterthehacker",
  2059. "id": 6752317,
  2060. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  2061. "gravatar_id": "",
  2062. "url": "https://api.github.com/users/baxterthehacker",
  2063. "html_url": "https://github.com/baxterthehacker",
  2064. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  2065. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  2066. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  2067. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  2068. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  2069. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  2070. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  2071. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  2072. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  2073. "type": "User",
  2074. "site_admin": false
  2075. },
  2076. "private": false,
  2077. "html_url": "https://github.com/baxterthehacker/public-repo",
  2078. "description": "",
  2079. "fork": false,
  2080. "url": "https://api.github.com/repos/baxterthehacker/public-repo",
  2081. "forks_url": "https://api.github.com/repos/baxterthehacker/public-repo/forks",
  2082. "keys_url": "https://api.github.com/repos/baxterthehacker/public-repo/keys{/key_id}",
  2083. "collaborators_url": "https://api.github.com/repos/baxterthehacker/public-repo/collaborators{/collaborator}",
  2084. "teams_url": "https://api.github.com/repos/baxterthehacker/public-repo/teams",
  2085. "hooks_url": "https://api.github.com/repos/baxterthehacker/public-repo/hooks",
  2086. "issue_events_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/events{/number}",
  2087. "events_url": "https://api.github.com/repos/baxterthehacker/public-repo/events",
  2088. "assignees_url": "https://api.github.com/repos/baxterthehacker/public-repo/assignees{/user}",
  2089. "branches_url": "https://api.github.com/repos/baxterthehacker/public-repo/branches{/branch}",
  2090. "tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/tags",
  2091. "blobs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/blobs{/sha}",
  2092. "git_tags_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/tags{/sha}",
  2093. "git_refs_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/refs{/sha}",
  2094. "trees_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/trees{/sha}",
  2095. "statuses_url": "https://api.github.com/repos/baxterthehacker/public-repo/statuses/{sha}",
  2096. "languages_url": "https://api.github.com/repos/baxterthehacker/public-repo/languages",
  2097. "stargazers_url": "https://api.github.com/repos/baxterthehacker/public-repo/stargazers",
  2098. "contributors_url": "https://api.github.com/repos/baxterthehacker/public-repo/contributors",
  2099. "subscribers_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscribers",
  2100. "subscription_url": "https://api.github.com/repos/baxterthehacker/public-repo/subscription",
  2101. "commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/commits{/sha}",
  2102. "git_commits_url": "https://api.github.com/repos/baxterthehacker/public-repo/git/commits{/sha}",
  2103. "comments_url": "https://api.github.com/repos/baxterthehacker/public-repo/comments{/number}",
  2104. "issue_comment_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues/comments{/number}",
  2105. "contents_url": "https://api.github.com/repos/baxterthehacker/public-repo/contents/{+path}",
  2106. "compare_url": "https://api.github.com/repos/baxterthehacker/public-repo/compare/{base}...{head}",
  2107. "merges_url": "https://api.github.com/repos/baxterthehacker/public-repo/merges",
  2108. "archive_url": "https://api.github.com/repos/baxterthehacker/public-repo/{archive_format}{/ref}",
  2109. "downloads_url": "https://api.github.com/repos/baxterthehacker/public-repo/downloads",
  2110. "issues_url": "https://api.github.com/repos/baxterthehacker/public-repo/issues{/number}",
  2111. "pulls_url": "https://api.github.com/repos/baxterthehacker/public-repo/pulls{/number}",
  2112. "milestones_url": "https://api.github.com/repos/baxterthehacker/public-repo/milestones{/number}",
  2113. "notifications_url": "https://api.github.com/repos/baxterthehacker/public-repo/notifications{?since,all,participating}",
  2114. "labels_url": "https://api.github.com/repos/baxterthehacker/public-repo/labels{/name}",
  2115. "releases_url": "https://api.github.com/repos/baxterthehacker/public-repo/releases{/id}",
  2116. "created_at": "2015-05-05T23:40:12Z",
  2117. "updated_at": "2015-05-05T23:40:12Z",
  2118. "pushed_at": "2015-05-05T23:40:26Z",
  2119. "git_url": "git://github.com/baxterthehacker/public-repo.git",
  2120. "ssh_url": "git@github.com:baxterthehacker/public-repo.git",
  2121. "clone_url": "https://github.com/baxterthehacker/public-repo.git",
  2122. "svn_url": "https://github.com/baxterthehacker/public-repo",
  2123. "homepage": null,
  2124. "size": 0,
  2125. "stargazers_count": 0,
  2126. "watchers_count": 0,
  2127. "language": null,
  2128. "has_issues": true,
  2129. "has_downloads": true,
  2130. "has_wiki": true,
  2131. "has_pages": true,
  2132. "forks_count": 0,
  2133. "mirror_url": null,
  2134. "open_issues_count": 1,
  2135. "forks": 0,
  2136. "open_issues": 1,
  2137. "watchers": 0,
  2138. "default_branch": "master"
  2139. },
  2140. "sender": {
  2141. "login": "baxterthehacker",
  2142. "id": 6752317,
  2143. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=3",
  2144. "gravatar_id": "",
  2145. "url": "https://api.github.com/users/baxterthehacker",
  2146. "html_url": "https://github.com/baxterthehacker",
  2147. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  2148. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  2149. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  2150. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  2151. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  2152. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  2153. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  2154. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  2155. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  2156. "type": "User",
  2157. "site_admin": false
  2158. }
  2159. }"""
  2160. # https://api.github.com/users/baxterthehacker
  2161. API_GITHUB_COM_USERS_BAXTERTHEHACKER = """\
  2162. {
  2163. "login": "baxterthehacker",
  2164. "id": 6752317,
  2165. "node_id": "MDQ6VXNlcjY3NTIzMTc=",
  2166. "avatar_url": "https://avatars.githubusercontent.com/u/6752317?v=4",
  2167. "gravatar_id": "",
  2168. "url": "https://api.github.com/users/baxterthehacker",
  2169. "html_url": "https://github.com/baxterthehacker",
  2170. "followers_url": "https://api.github.com/users/baxterthehacker/followers",
  2171. "following_url": "https://api.github.com/users/baxterthehacker/following{/other_user}",
  2172. "gists_url": "https://api.github.com/users/baxterthehacker/gists{/gist_id}",
  2173. "starred_url": "https://api.github.com/users/baxterthehacker/starred{/owner}{/repo}",
  2174. "subscriptions_url": "https://api.github.com/users/baxterthehacker/subscriptions",
  2175. "organizations_url": "https://api.github.com/users/baxterthehacker/orgs",
  2176. "repos_url": "https://api.github.com/users/baxterthehacker/repos",
  2177. "events_url": "https://api.github.com/users/baxterthehacker/events{/privacy}",
  2178. "received_events_url": "https://api.github.com/users/baxterthehacker/received_events",
  2179. "type": "User",
  2180. "site_admin": false,
  2181. "name": null,
  2182. "company": null,
  2183. "blog": "",
  2184. "location": null,
  2185. "email": null,
  2186. "hireable": null,
  2187. "bio": null,
  2188. "twitter_username": null,
  2189. "public_repos": 6,
  2190. "public_gists": 0,
  2191. "followers": 9,
  2192. "following": 1,
  2193. "created_at": "2014-02-21T22:24:28Z",
  2194. "updated_at": "2023-12-22T12:36:56Z"
  2195. }
  2196. """
  2197. # Example taken from github with additional example commit added https://docs.github.com/en/rest/commits/commits#compare-two-commits
  2198. COMPARE_COMMITS_EXAMPLE_WITH_INTERMEDIATE = """{
  2199. "url": "https://api.github.com/repos/octocat/Hello-World/compare/master...topic",
  2200. "html_url": "https://github.com/octocat/Hello-World/compare/master...topic",
  2201. "permalink_url": "https://github.com/octocat/Hello-World/compare/octocat:bbcd538c8e72b8c175046e27cc8f907076331401...octocat:0328041d1152db8ae77652d1618a02e57f745f17",
  2202. "diff_url": "https://github.com/octocat/Hello-World/compare/master...topic.diff",
  2203. "patch_url": "https://github.com/octocat/Hello-World/compare/master...topic.patch",
  2204. "base_commit": {
  2205. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2206. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2207. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2208. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  2209. "commit": {
  2210. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2211. "author": {
  2212. "name": "Monalisa Octocat",
  2213. "email": "support@github.com",
  2214. "date": "2011-04-14T16:00:49Z"
  2215. },
  2216. "committer": {
  2217. "name": "Monalisa Octocat",
  2218. "email": "support@github.com",
  2219. "date": "2011-04-14T16:00:49Z"
  2220. },
  2221. "message": "Fix all the bugs",
  2222. "tree": {
  2223. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2224. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2225. },
  2226. "comment_count": 0,
  2227. "verification": {
  2228. "verified": true,
  2229. "reason": "valid",
  2230. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  2231. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  2232. }
  2233. },
  2234. "author": {
  2235. "login": "octocat",
  2236. "id": 1,
  2237. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2238. "gravatar_id": "",
  2239. "url": "https://api.github.com/users/octocat",
  2240. "html_url": "https://github.com/octocat",
  2241. "followers_url": "https://api.github.com/users/octocat/followers",
  2242. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2243. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2244. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2245. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2246. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2247. "repos_url": "https://api.github.com/users/octocat/repos",
  2248. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2249. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2250. "type": "User",
  2251. "site_admin": false
  2252. },
  2253. "committer": {
  2254. "login": "octocat",
  2255. "id": 1,
  2256. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2257. "gravatar_id": "",
  2258. "url": "https://api.github.com/users/octocat",
  2259. "html_url": "https://github.com/octocat",
  2260. "followers_url": "https://api.github.com/users/octocat/followers",
  2261. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2262. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2263. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2264. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2265. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2266. "repos_url": "https://api.github.com/users/octocat/repos",
  2267. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2268. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2269. "type": "User",
  2270. "site_admin": false
  2271. },
  2272. "parents": [
  2273. {
  2274. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2275. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2276. }
  2277. ]
  2278. },
  2279. "merge_base_commit": {
  2280. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2281. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2282. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2283. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  2284. "commit": {
  2285. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2286. "author": {
  2287. "name": "Monalisa Octocat",
  2288. "email": "support@github.com",
  2289. "date": "2011-04-14T16:00:49Z"
  2290. },
  2291. "committer": {
  2292. "name": "Monalisa Octocat",
  2293. "email": "support@github.com",
  2294. "date": "2011-04-14T16:00:49Z"
  2295. },
  2296. "message": "Fix all the bugs",
  2297. "tree": {
  2298. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2299. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2300. },
  2301. "comment_count": 0,
  2302. "verification": {
  2303. "verified": true,
  2304. "reason": "valid",
  2305. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  2306. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  2307. }
  2308. },
  2309. "author": {
  2310. "login": "octocat",
  2311. "id": 1,
  2312. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2313. "gravatar_id": "",
  2314. "url": "https://api.github.com/users/octocat",
  2315. "html_url": "https://github.com/octocat",
  2316. "followers_url": "https://api.github.com/users/octocat/followers",
  2317. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2318. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2319. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2320. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2321. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2322. "repos_url": "https://api.github.com/users/octocat/repos",
  2323. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2324. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2325. "type": "User",
  2326. "site_admin": false
  2327. },
  2328. "committer": {
  2329. "login": "octocat",
  2330. "id": 1,
  2331. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2332. "gravatar_id": "",
  2333. "url": "https://api.github.com/users/octocat",
  2334. "html_url": "https://github.com/octocat",
  2335. "followers_url": "https://api.github.com/users/octocat/followers",
  2336. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2337. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2338. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2339. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2340. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2341. "repos_url": "https://api.github.com/users/octocat/repos",
  2342. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2343. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2344. "type": "User",
  2345. "site_admin": false
  2346. },
  2347. "parents": [
  2348. {
  2349. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2350. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2351. }
  2352. ]
  2353. },
  2354. "status": "ahead",
  2355. "ahead_by": 2,
  2356. "behind_by": 0,
  2357. "total_commits": 2,
  2358. "commits": [
  2359. {
  2360. "url": "https://api.github.com/repos/octocat/Hello-World/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2361. "sha": "2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2362. "html_url": "https://github.com/octocat/Hello-World/commit/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2363. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39/comments",
  2364. "commit": {
  2365. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2366. "author": {
  2367. "name": "Monalisa Octocat",
  2368. "email": "support@github.com",
  2369. "date": "2011-04-14T16:00:49Z"
  2370. },
  2371. "committer": {
  2372. "name": "Monalisa Octocat",
  2373. "email": "support@github.com",
  2374. "date": "2011-04-14T16:00:49Z"
  2375. },
  2376. "message": "Fix all the bugs",
  2377. "tree": {
  2378. "url": "https://api.github.com/repos/octocat/Hello-World/tree/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2379. "sha": "2edc6bc02366b2b9b0e8fa2ace3f93502e324b39"
  2380. },
  2381. "comment_count": 0,
  2382. "verification": {
  2383. "verified": true,
  2384. "reason": "valid",
  2385. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  2386. "payload": "tree 2edc6bc02366b2b9b0e8fa2ace3f93502e324b39..."
  2387. }
  2388. },
  2389. "author": {
  2390. "login": "octocat",
  2391. "id": 1,
  2392. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2393. "gravatar_id": "",
  2394. "url": "https://api.github.com/users/octocat",
  2395. "html_url": "https://github.com/octocat",
  2396. "followers_url": "https://api.github.com/users/octocat/followers",
  2397. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2398. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2399. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2400. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2401. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2402. "repos_url": "https://api.github.com/users/octocat/repos",
  2403. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2404. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2405. "type": "User",
  2406. "site_admin": false
  2407. },
  2408. "committer": {
  2409. "login": "octocat",
  2410. "id": 1,
  2411. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2412. "gravatar_id": "",
  2413. "url": "https://api.github.com/users/octocat",
  2414. "html_url": "https://github.com/octocat",
  2415. "followers_url": "https://api.github.com/users/octocat/followers",
  2416. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2417. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2418. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2419. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2420. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2421. "repos_url": "https://api.github.com/users/octocat/repos",
  2422. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2423. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2424. "type": "User",
  2425. "site_admin": false
  2426. },
  2427. "parents": [
  2428. {
  2429. "url": "https://api.github.com/repos/octocat/Hello-World/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2430. "sha": "2edc6bc02366b2b9b0e8fa2ace3f93502e324b39"
  2431. }
  2432. ]
  2433. },
  2434. {
  2435. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2436. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2437. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2438. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  2439. "commit": {
  2440. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2441. "author": {
  2442. "name": "Monalisa Octocat",
  2443. "email": "support@github.com",
  2444. "date": "2011-04-14T16:00:49Z"
  2445. },
  2446. "committer": {
  2447. "name": "Monalisa Octocat",
  2448. "email": "support@github.com",
  2449. "date": "2011-04-14T16:00:49Z"
  2450. },
  2451. "message": "Fix all the bugs",
  2452. "tree": {
  2453. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2454. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2455. },
  2456. "comment_count": 0,
  2457. "verification": {
  2458. "verified": true,
  2459. "reason": "valid",
  2460. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  2461. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  2462. }
  2463. },
  2464. "author": {
  2465. "login": "octocat",
  2466. "id": 1,
  2467. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2468. "gravatar_id": "",
  2469. "url": "https://api.github.com/users/octocat",
  2470. "html_url": "https://github.com/octocat",
  2471. "followers_url": "https://api.github.com/users/octocat/followers",
  2472. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2473. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2474. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2475. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2476. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2477. "repos_url": "https://api.github.com/users/octocat/repos",
  2478. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2479. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2480. "type": "User",
  2481. "site_admin": false
  2482. },
  2483. "committer": {
  2484. "login": "octocat",
  2485. "id": 1,
  2486. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2487. "gravatar_id": "",
  2488. "url": "https://api.github.com/users/octocat",
  2489. "html_url": "https://github.com/octocat",
  2490. "followers_url": "https://api.github.com/users/octocat/followers",
  2491. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2492. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2493. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2494. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2495. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2496. "repos_url": "https://api.github.com/users/octocat/repos",
  2497. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2498. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2499. "type": "User",
  2500. "site_admin": false
  2501. },
  2502. "parents": [
  2503. {
  2504. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2505. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2506. }
  2507. ]
  2508. }
  2509. ],
  2510. "files": [
  2511. {
  2512. "sha": "bbcd538c8e72b8c175046e27cc8f907076331401",
  2513. "filename": "file1.txt",
  2514. "status": "added",
  2515. "additions": 103,
  2516. "deletions": 21,
  2517. "changes": 124,
  2518. "blob_url": "https://github.com/octocat/Hello-World/blob/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt",
  2519. "raw_url": "https://github.com/octocat/Hello-World/raw/6dcb09b5b57875f334f61aebed695e2e4193db5e/file1.txt",
  2520. "contents_url": "https://api.github.com/repos/octocat/Hello-World/contents/file1.txt?ref=6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2521. "patch": "@@ -132,7 +132,7 @@ module Test @@ -1000,7 +1000,7 @@ module Test"
  2522. }
  2523. ]
  2524. }"""
  2525. # Example taken from github https://docs.github.com/en/rest/commits/commits#get-a-commit
  2526. GET_COMMIT_EXAMPLE = r"""
  2527. {
  2528. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2529. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2530. "node_id": "MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==",
  2531. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2532. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  2533. "commit": {
  2534. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2535. "author": {
  2536. "name": "Monalisa Octocat",
  2537. "email": "support@github.com",
  2538. "date": "2011-04-14T16:00:49Z"
  2539. },
  2540. "committer": {
  2541. "name": "Monalisa Octocat",
  2542. "email": "support@github.com",
  2543. "date": "2011-04-14T16:00:49Z"
  2544. },
  2545. "message": "Fix all the bugs",
  2546. "tree": {
  2547. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2548. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2549. },
  2550. "comment_count": 0,
  2551. "verification": {
  2552. "verified": false,
  2553. "reason": "unsigned",
  2554. "signature": null,
  2555. "payload": null
  2556. }
  2557. },
  2558. "author": {
  2559. "login": "octocat",
  2560. "id": 1,
  2561. "node_id": "MDQ6VXNlcjE=",
  2562. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2563. "gravatar_id": "",
  2564. "url": "https://api.github.com/users/octocat",
  2565. "html_url": "https://github.com/octocat",
  2566. "followers_url": "https://api.github.com/users/octocat/followers",
  2567. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2568. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2569. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2570. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2571. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2572. "repos_url": "https://api.github.com/users/octocat/repos",
  2573. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2574. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2575. "type": "User",
  2576. "site_admin": false
  2577. },
  2578. "committer": {
  2579. "login": "octocat",
  2580. "id": 1,
  2581. "node_id": "MDQ6VXNlcjE=",
  2582. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2583. "gravatar_id": "",
  2584. "url": "https://api.github.com/users/octocat",
  2585. "html_url": "https://github.com/octocat",
  2586. "followers_url": "https://api.github.com/users/octocat/followers",
  2587. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2588. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2589. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2590. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2591. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2592. "repos_url": "https://api.github.com/users/octocat/repos",
  2593. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2594. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2595. "type": "User",
  2596. "site_admin": false
  2597. },
  2598. "parents": [
  2599. {
  2600. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2601. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2602. }
  2603. ],
  2604. "stats": {
  2605. "additions": 104,
  2606. "deletions": 4,
  2607. "total": 108
  2608. },
  2609. "files": [
  2610. {
  2611. "filename": "file1.txt",
  2612. "additions": 10,
  2613. "deletions": 2,
  2614. "changes": 12,
  2615. "status": "modified",
  2616. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt",
  2617. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt",
  2618. "patch": "@@ -29,7 +29,7 @@\n....."
  2619. },
  2620. {
  2621. "filename": "added.txt",
  2622. "additions": 10,
  2623. "deletions": 0,
  2624. "changes": 0,
  2625. "status": "added",
  2626. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2627. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2628. "patch": "@@ -29,7 +29,7 @@\n....."
  2629. },
  2630. {
  2631. "filename": "removed.txt",
  2632. "additions": 0,
  2633. "deletions": 10,
  2634. "changes": 0,
  2635. "status": "removed",
  2636. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2637. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2638. "patch": "@@ -29,7 +29,7 @@\n....."
  2639. },
  2640. {
  2641. "filename": "renamed.txt",
  2642. "previous_filename": "old_name.txt",
  2643. "additions": 0,
  2644. "deletions": 0,
  2645. "changes": 0,
  2646. "status": "renamed",
  2647. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2648. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2649. "patch": "@@ -29,7 +29,7 @@\n....."
  2650. }
  2651. ]
  2652. }
  2653. """
  2654. # Example taken from github https://docs.github.com/en/rest/commits/commits#get-a-commit
  2655. GET_PRIOR_COMMIT_EXAMPLE = r"""
  2656. {
  2657. "url": "https://api.github.com/repos/octocat/Hello-World/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2658. "sha": "2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2659. "node_id": "MDY6Q29tbWl0NmRjYjA5YjViNTc4NzVmMzM0ZjYxYWViZWQ2OTVlMmU0MTkzZGI1ZQ==",
  2660. "html_url": "https://github.com/octocat/Hello-World/commit/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2661. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39/comments",
  2662. "commit": {
  2663. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2664. "author": {
  2665. "name": "Monalisa Octocat",
  2666. "email": "support@github.com",
  2667. "date": "2011-04-14T16:00:49Z"
  2668. },
  2669. "committer": {
  2670. "name": "Monalisa Octocat",
  2671. "email": "support@github.com",
  2672. "date": "2011-04-14T16:00:49Z"
  2673. },
  2674. "message": "Fix all the bugs",
  2675. "tree": {
  2676. "url": "https://api.github.com/repos/octocat/Hello-World/tree/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2677. "sha": "2edc6bc02366b2b9b0e8fa2ace3f93502e324b39"
  2678. },
  2679. "comment_count": 0,
  2680. "verification": {
  2681. "verified": false,
  2682. "reason": "unsigned",
  2683. "signature": null,
  2684. "payload": null
  2685. }
  2686. },
  2687. "author": {
  2688. "login": "octocat",
  2689. "id": 1,
  2690. "node_id": "MDQ6VXNlcjE=",
  2691. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2692. "gravatar_id": "",
  2693. "url": "https://api.github.com/users/octocat",
  2694. "html_url": "https://github.com/octocat",
  2695. "followers_url": "https://api.github.com/users/octocat/followers",
  2696. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2697. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2698. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2699. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2700. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2701. "repos_url": "https://api.github.com/users/octocat/repos",
  2702. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2703. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2704. "type": "User",
  2705. "site_admin": false
  2706. },
  2707. "committer": {
  2708. "login": "octocat",
  2709. "id": 1,
  2710. "node_id": "MDQ6VXNlcjE=",
  2711. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2712. "gravatar_id": "",
  2713. "url": "https://api.github.com/users/octocat",
  2714. "html_url": "https://github.com/octocat",
  2715. "followers_url": "https://api.github.com/users/octocat/followers",
  2716. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2717. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2718. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2719. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2720. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2721. "repos_url": "https://api.github.com/users/octocat/repos",
  2722. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2723. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2724. "type": "User",
  2725. "site_admin": false
  2726. },
  2727. "parents": [
  2728. {
  2729. "url": "https://api.github.com/repos/octocat/Hello-World/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2730. "sha": "2edc6bc02366b2b9b0e8fa2ace3f93502e324b39"
  2731. }
  2732. ],
  2733. "stats": {
  2734. "additions": 104,
  2735. "deletions": 4,
  2736. "total": 108
  2737. },
  2738. "files": [
  2739. {
  2740. "filename": "file1.txt",
  2741. "additions": 10,
  2742. "deletions": 2,
  2743. "changes": 12,
  2744. "status": "modified",
  2745. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt",
  2746. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/file1.txt",
  2747. "patch": "@@ -29,7 +29,7 @@\n....."
  2748. },
  2749. {
  2750. "filename": "added.txt",
  2751. "additions": 10,
  2752. "deletions": 0,
  2753. "changes": 0,
  2754. "status": "added",
  2755. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2756. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2757. "patch": "@@ -29,7 +29,7 @@\n....."
  2758. },
  2759. {
  2760. "filename": "removed.txt",
  2761. "additions": 0,
  2762. "deletions": 10,
  2763. "changes": 0,
  2764. "status": "removed",
  2765. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2766. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2767. "patch": "@@ -29,7 +29,7 @@\n....."
  2768. },
  2769. {
  2770. "filename": "renamed.txt",
  2771. "previous_filename": "old_name.txt",
  2772. "additions": 0,
  2773. "deletions": 0,
  2774. "changes": 0,
  2775. "status": "renamed",
  2776. "raw_url": "https://github.com/octocat/Hello-World/raw/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2777. "blob_url": "https://github.com/octocat/Hello-World/blob/7ca483543807a51b6079e54ac4cc392bc29ae284/added.txt",
  2778. "patch": "@@ -29,7 +29,7 @@\n....."
  2779. }
  2780. ]
  2781. }
  2782. """
  2783. # Example taken from github with extra commit added https://docs.github.com/en/rest/commits/commits#list-commits
  2784. GET_LAST_2_COMMITS_EXAMPLE = """[
  2785. {
  2786. "url": "https://api.github.com/repos/octocat/Hello-World/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2787. "sha": "2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2788. "html_url": "https://github.com/octocat/Hello-World/commit/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2789. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39/comments",
  2790. "commit": {
  2791. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2792. "author": {
  2793. "name": "Monalisa Octocat",
  2794. "email": "support@github.com",
  2795. "date": "2011-04-14T16:00:49Z"
  2796. },
  2797. "committer": {
  2798. "name": "Monalisa Octocat",
  2799. "email": "support@github.com",
  2800. "date": "2011-04-14T16:00:49Z"
  2801. },
  2802. "message": "Fix all the bugs",
  2803. "tree": {
  2804. "url": "https://api.github.com/repos/octocat/Hello-World/tree/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2805. "sha": "2edc6bc02366b2b9b0e8fa2ace3f93502e324b39"
  2806. },
  2807. "comment_count": 0,
  2808. "verification": {
  2809. "verified": true,
  2810. "reason": "valid",
  2811. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  2812. "payload": "tree 2edc6bc02366b2b9b0e8fa2ace3f93502e324b39..."
  2813. }
  2814. },
  2815. "author": {
  2816. "login": "octocat",
  2817. "id": 1,
  2818. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2819. "gravatar_id": "",
  2820. "url": "https://api.github.com/users/octocat",
  2821. "html_url": "https://github.com/octocat",
  2822. "followers_url": "https://api.github.com/users/octocat/followers",
  2823. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2824. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2825. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2826. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2827. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2828. "repos_url": "https://api.github.com/users/octocat/repos",
  2829. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2830. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2831. "type": "User",
  2832. "site_admin": false
  2833. },
  2834. "committer": {
  2835. "login": "octocat",
  2836. "id": 1,
  2837. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2838. "gravatar_id": "",
  2839. "url": "https://api.github.com/users/octocat",
  2840. "html_url": "https://github.com/octocat",
  2841. "followers_url": "https://api.github.com/users/octocat/followers",
  2842. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2843. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2844. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2845. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2846. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2847. "repos_url": "https://api.github.com/users/octocat/repos",
  2848. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2849. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2850. "type": "User",
  2851. "site_admin": false
  2852. },
  2853. "parents": [
  2854. {
  2855. "url": "https://api.github.com/repos/octocat/Hello-World/commits/2edc6bc02366b2b9b0e8fa2ace3f93502e324b39",
  2856. "sha": "2edc6bc02366b2b9b0e8fa2ace3f93502e324b39"
  2857. }
  2858. ]
  2859. },
  2860. {
  2861. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2862. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2863. "html_url": "https://github.com/octocat/Hello-World/commit/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2864. "comments_url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e/comments",
  2865. "commit": {
  2866. "url": "https://api.github.com/repos/octocat/Hello-World/git/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2867. "author": {
  2868. "name": "Monalisa Octocat",
  2869. "email": "support@github.com",
  2870. "date": "2011-04-14T16:00:49Z"
  2871. },
  2872. "committer": {
  2873. "name": "Monalisa Octocat",
  2874. "email": "support@github.com",
  2875. "date": "2011-04-14T16:00:49Z"
  2876. },
  2877. "message": "Fix all the bugs",
  2878. "tree": {
  2879. "url": "https://api.github.com/repos/octocat/Hello-World/tree/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2880. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2881. },
  2882. "comment_count": 0,
  2883. "verification": {
  2884. "verified": true,
  2885. "reason": "valid",
  2886. "signature": "-----BEGIN PGP MESSAGE----------END PGP MESSAGE-----",
  2887. "payload": "tree 6dcb09b5b57875f334f61aebed695e2e4193db5e..."
  2888. }
  2889. },
  2890. "author": {
  2891. "login": "octocat",
  2892. "id": 1,
  2893. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2894. "gravatar_id": "",
  2895. "url": "https://api.github.com/users/octocat",
  2896. "html_url": "https://github.com/octocat",
  2897. "followers_url": "https://api.github.com/users/octocat/followers",
  2898. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2899. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2900. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2901. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2902. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2903. "repos_url": "https://api.github.com/users/octocat/repos",
  2904. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2905. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2906. "type": "User",
  2907. "site_admin": false
  2908. },
  2909. "committer": {
  2910. "login": "octocat",
  2911. "id": 1,
  2912. "avatar_url": "https://github.com/images/error/octocat_happy.gif",
  2913. "gravatar_id": "",
  2914. "url": "https://api.github.com/users/octocat",
  2915. "html_url": "https://github.com/octocat",
  2916. "followers_url": "https://api.github.com/users/octocat/followers",
  2917. "following_url": "https://api.github.com/users/octocat/following{/other_user}",
  2918. "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
  2919. "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
  2920. "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
  2921. "organizations_url": "https://api.github.com/users/octocat/orgs",
  2922. "repos_url": "https://api.github.com/users/octocat/repos",
  2923. "events_url": "https://api.github.com/users/octocat/events{/privacy}",
  2924. "received_events_url": "https://api.github.com/users/octocat/received_events",
  2925. "type": "User",
  2926. "site_admin": false
  2927. },
  2928. "parents": [
  2929. {
  2930. "url": "https://api.github.com/repos/octocat/Hello-World/commits/6dcb09b5b57875f334f61aebed695e2e4193db5e",
  2931. "sha": "6dcb09b5b57875f334f61aebed695e2e4193db5e"
  2932. }
  2933. ]
  2934. }
  2935. ]"""