index.js 604 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693106941069510696106971069810699107001070110702107031070410705107061070710708107091071010711107121071310714107151071610717107181071910720107211072210723107241072510726107271072810729107301073110732107331073410735107361073710738107391074010741107421074310744107451074610747107481074910750107511075210753107541075510756107571075810759107601076110762107631076410765107661076710768107691077010771107721077310774107751077610777107781077910780107811078210783107841078510786107871078810789107901079110792107931079410795107961079710798107991080010801108021080310804108051080610807108081080910810108111081210813108141081510816108171081810819108201082110822108231082410825108261082710828108291083010831108321083310834108351083610837108381083910840108411084210843108441084510846108471084810849108501085110852108531085410855108561085710858108591086010861108621086310864108651086610867108681086910870108711087210873108741087510876108771087810879108801088110882108831088410885108861088710888108891089010891108921089310894108951089610897108981089910900109011090210903109041090510906109071090810909109101091110912109131091410915109161091710918109191092010921109221092310924109251092610927109281092910930109311093210933109341093510936109371093810939109401094110942109431094410945109461094710948109491095010951109521095310954109551095610957109581095910960109611096210963109641096510966109671096810969109701097110972109731097410975109761097710978109791098010981109821098310984109851098610987109881098910990109911099210993109941099510996109971099810999110001100111002110031100411005110061100711008110091101011011110121101311014110151101611017110181101911020110211102211023110241102511026110271102811029110301103111032110331103411035110361103711038110391104011041110421104311044110451104611047110481104911050110511105211053110541105511056110571105811059110601106111062110631106411065110661106711068110691107011071110721107311074110751107611077110781107911080110811108211083110841108511086110871108811089110901109111092110931109411095110961109711098110991110011101111021110311104111051110611107111081110911110111111111211113111141111511116111171111811119111201112111122111231112411125111261112711128111291113011131111321113311134111351113611137111381113911140111411114211143111441114511146111471114811149111501115111152111531115411155111561115711158111591116011161111621116311164111651116611167111681116911170111711117211173111741117511176111771117811179111801118111182111831118411185111861118711188111891119011191111921119311194111951119611197111981119911200112011120211203112041120511206112071120811209112101121111212112131121411215112161121711218112191122011221112221122311224112251122611227112281122911230112311123211233112341123511236112371123811239112401124111242112431124411245112461124711248112491125011251112521125311254112551125611257112581125911260112611126211263112641126511266112671126811269112701127111272112731127411275112761127711278112791128011281112821128311284112851128611287112881128911290112911129211293112941129511296112971129811299113001130111302113031130411305113061130711308113091131011311113121131311314113151131611317113181131911320113211132211323113241132511326113271132811329113301133111332113331133411335113361133711338113391134011341113421134311344113451134611347113481134911350113511135211353113541135511356113571135811359113601136111362113631136411365113661136711368113691137011371113721137311374113751137611377113781137911380113811138211383113841138511386113871138811389113901139111392113931139411395113961139711398113991140011401114021140311404114051140611407114081140911410114111141211413114141141511416114171141811419114201142111422114231142411425114261142711428114291143011431114321143311434114351143611437114381143911440114411144211443114441144511446114471144811449114501145111452114531145411455114561145711458114591146011461114621146311464114651146611467114681146911470114711147211473114741147511476114771147811479114801148111482114831148411485114861148711488114891149011491114921149311494114951149611497114981149911500115011150211503115041150511506115071150811509115101151111512115131151411515115161151711518115191152011521115221152311524115251152611527115281152911530115311153211533115341153511536115371153811539115401154111542115431154411545115461154711548115491155011551115521155311554115551155611557115581155911560115611156211563115641156511566115671156811569115701157111572115731157411575115761157711578115791158011581115821158311584115851158611587115881158911590115911159211593115941159511596115971159811599116001160111602116031160411605116061160711608116091161011611116121161311614116151161611617116181161911620116211162211623116241162511626116271162811629116301163111632116331163411635116361163711638116391164011641116421164311644116451164611647116481164911650116511165211653116541165511656116571165811659116601166111662116631166411665116661166711668116691167011671116721167311674116751167611677116781167911680116811168211683116841168511686116871168811689116901169111692116931169411695116961169711698116991170011701117021170311704117051170611707117081170911710117111171211713117141171511716117171171811719117201172111722117231172411725117261172711728117291173011731117321173311734117351173611737117381173911740117411174211743117441174511746117471174811749117501175111752117531175411755117561175711758117591176011761117621176311764117651176611767117681176911770117711177211773117741177511776117771177811779117801178111782117831178411785117861178711788117891179011791117921179311794117951179611797117981179911800118011180211803118041180511806118071180811809118101181111812118131181411815118161181711818118191182011821118221182311824118251182611827118281182911830118311183211833118341183511836118371183811839118401184111842118431184411845118461184711848118491185011851118521185311854118551185611857118581185911860118611186211863118641186511866118671186811869118701187111872118731187411875118761187711878118791188011881118821188311884118851188611887118881188911890118911189211893118941189511896118971189811899119001190111902119031190411905119061190711908119091191011911119121191311914119151191611917119181191911920119211192211923119241192511926119271192811929119301193111932119331193411935119361193711938119391194011941119421194311944119451194611947119481194911950119511195211953119541195511956119571195811959119601196111962119631196411965119661196711968119691197011971119721197311974119751197611977119781197911980119811198211983119841198511986119871198811989119901199111992119931199411995119961199711998119991200012001120021200312004120051200612007120081200912010120111201212013120141201512016120171201812019120201202112022120231202412025120261202712028120291203012031120321203312034120351203612037120381203912040120411204212043120441204512046120471204812049120501205112052120531205412055120561205712058120591206012061120621206312064120651206612067120681206912070120711207212073120741207512076120771207812079120801208112082120831208412085120861208712088120891209012091120921209312094120951209612097120981209912100121011210212103121041210512106121071210812109121101211112112121131211412115121161211712118121191212012121121221212312124121251212612127121281212912130121311213212133121341213512136121371213812139121401214112142121431214412145121461214712148121491215012151121521215312154121551215612157121581215912160121611216212163121641216512166121671216812169121701217112172121731217412175121761217712178121791218012181121821218312184121851218612187121881218912190121911219212193121941219512196121971219812199122001220112202122031220412205122061220712208122091221012211122121221312214122151221612217122181221912220122211222212223122241222512226122271222812229122301223112232122331223412235122361223712238122391224012241122421224312244122451224612247122481224912250122511225212253122541225512256122571225812259122601226112262122631226412265122661226712268122691227012271122721227312274122751227612277122781227912280122811228212283122841228512286122871228812289122901229112292122931229412295122961229712298122991230012301123021230312304123051230612307123081230912310123111231212313123141231512316123171231812319123201232112322123231232412325123261232712328123291233012331123321233312334123351233612337123381233912340123411234212343123441234512346123471234812349123501235112352123531235412355123561235712358123591236012361123621236312364123651236612367123681236912370123711237212373123741237512376123771237812379123801238112382123831238412385123861238712388123891239012391123921239312394123951239612397123981239912400124011240212403124041240512406124071240812409124101241112412124131241412415124161241712418124191242012421124221242312424124251242612427124281242912430124311243212433124341243512436124371243812439124401244112442124431244412445124461244712448124491245012451124521245312454124551245612457124581245912460124611246212463124641246512466124671246812469124701247112472124731247412475124761247712478124791248012481124821248312484124851248612487124881248912490124911249212493124941249512496124971249812499125001250112502125031250412505125061250712508125091251012511125121251312514125151251612517125181251912520125211252212523125241252512526125271252812529125301253112532125331253412535125361253712538125391254012541125421254312544125451254612547125481254912550125511255212553125541255512556125571255812559125601256112562125631256412565125661256712568125691257012571125721257312574125751257612577125781257912580125811258212583125841258512586125871258812589125901259112592125931259412595125961259712598125991260012601126021260312604126051260612607126081260912610126111261212613126141261512616126171261812619126201262112622126231262412625126261262712628126291263012631126321263312634126351263612637126381263912640126411264212643126441264512646126471264812649126501265112652126531265412655126561265712658126591266012661126621266312664126651266612667126681266912670126711267212673126741267512676126771267812679126801268112682126831268412685126861268712688126891269012691126921269312694126951269612697126981269912700127011270212703127041270512706127071270812709127101271112712127131271412715127161271712718127191272012721127221272312724127251272612727127281272912730127311273212733127341273512736127371273812739127401274112742127431274412745127461274712748127491275012751127521275312754127551275612757127581275912760127611276212763127641276512766127671276812769127701277112772127731277412775127761277712778127791278012781127821278312784127851278612787127881278912790127911279212793127941279512796127971279812799128001280112802128031280412805128061280712808128091281012811128121281312814128151281612817128181281912820128211282212823128241282512826128271282812829128301283112832128331283412835128361283712838128391284012841128421284312844128451284612847128481284912850128511285212853128541285512856128571285812859128601286112862128631286412865128661286712868128691287012871128721287312874128751287612877128781287912880128811288212883128841288512886128871288812889128901289112892128931289412895128961289712898128991290012901129021290312904129051290612907129081290912910129111291212913129141291512916129171291812919129201292112922129231292412925129261292712928129291293012931129321293312934129351293612937129381293912940129411294212943129441294512946129471294812949129501295112952129531295412955129561295712958129591296012961129621296312964129651296612967129681296912970129711297212973129741297512976129771297812979129801298112982129831298412985129861298712988129891299012991129921299312994129951299612997129981299913000130011300213003130041300513006130071300813009130101301113012130131301413015130161301713018130191302013021130221302313024130251302613027130281302913030130311303213033130341303513036130371303813039130401304113042130431304413045130461304713048130491305013051130521305313054130551305613057130581305913060130611306213063130641306513066130671306813069130701307113072130731307413075130761307713078130791308013081130821308313084130851308613087130881308913090130911309213093130941309513096130971309813099131001310113102131031310413105131061310713108131091311013111131121311313114131151311613117131181311913120131211312213123131241312513126131271312813129131301313113132131331313413135131361313713138131391314013141131421314313144131451314613147131481314913150131511315213153131541315513156131571315813159131601316113162131631316413165131661316713168131691317013171131721317313174131751317613177131781317913180131811318213183131841318513186131871318813189131901319113192131931319413195131961319713198131991320013201132021320313204132051320613207132081320913210132111321213213132141321513216132171321813219132201322113222132231322413225132261322713228132291323013231132321323313234132351323613237132381323913240132411324213243132441324513246132471324813249132501325113252132531325413255132561325713258132591326013261132621326313264132651326613267132681326913270132711327213273132741327513276132771327813279132801328113282132831328413285132861328713288132891329013291132921329313294132951329613297132981329913300133011330213303133041330513306133071330813309133101331113312133131331413315133161331713318133191332013321133221332313324133251332613327133281332913330133311333213333133341333513336133371333813339133401334113342133431334413345133461334713348133491335013351133521335313354133551335613357133581335913360133611336213363133641336513366133671336813369133701337113372133731337413375133761337713378133791338013381133821338313384133851338613387133881338913390133911339213393133941339513396133971339813399134001340113402134031340413405134061340713408134091341013411134121341313414134151341613417134181341913420134211342213423134241342513426134271342813429134301343113432134331343413435134361343713438134391344013441134421344313444134451344613447134481344913450134511345213453134541345513456134571345813459134601346113462134631346413465134661346713468134691347013471134721347313474134751347613477134781347913480134811348213483134841348513486134871348813489134901349113492134931349413495134961349713498134991350013501135021350313504135051350613507135081350913510135111351213513135141351513516135171351813519135201352113522135231352413525135261352713528135291353013531135321353313534135351353613537135381353913540135411354213543135441354513546135471354813549135501355113552135531355413555135561355713558135591356013561135621356313564135651356613567135681356913570135711357213573135741357513576135771357813579135801358113582135831358413585135861358713588135891359013591135921359313594135951359613597135981359913600136011360213603136041360513606136071360813609136101361113612136131361413615136161361713618136191362013621136221362313624136251362613627136281362913630136311363213633136341363513636136371363813639136401364113642136431364413645136461364713648136491365013651136521365313654136551365613657136581365913660136611366213663136641366513666136671366813669136701367113672136731367413675136761367713678136791368013681136821368313684136851368613687136881368913690136911369213693136941369513696136971369813699137001370113702137031370413705137061370713708137091371013711137121371313714137151371613717137181371913720137211372213723137241372513726137271372813729137301373113732137331373413735137361373713738137391374013741137421374313744137451374613747137481374913750137511375213753137541375513756137571375813759137601376113762137631376413765137661376713768137691377013771137721377313774137751377613777137781377913780137811378213783137841378513786137871378813789137901379113792137931379413795137961379713798137991380013801138021380313804138051380613807138081380913810138111381213813138141381513816138171381813819138201382113822138231382413825138261382713828138291383013831138321383313834138351383613837138381383913840138411384213843138441384513846138471384813849138501385113852138531385413855138561385713858138591386013861138621386313864138651386613867138681386913870138711387213873138741387513876138771387813879138801388113882138831388413885138861388713888138891389013891138921389313894138951389613897138981389913900139011390213903139041390513906139071390813909139101391113912139131391413915139161391713918139191392013921139221392313924139251392613927139281392913930139311393213933139341393513936139371393813939139401394113942139431394413945139461394713948139491395013951139521395313954139551395613957139581395913960139611396213963139641396513966139671396813969139701397113972139731397413975139761397713978139791398013981139821398313984139851398613987139881398913990139911399213993139941399513996139971399813999140001400114002140031400414005140061400714008140091401014011140121401314014140151401614017140181401914020140211402214023140241402514026140271402814029140301403114032140331403414035140361403714038140391404014041140421404314044140451404614047140481404914050140511405214053140541405514056140571405814059140601406114062140631406414065140661406714068140691407014071140721407314074140751407614077140781407914080140811408214083140841408514086140871408814089140901409114092140931409414095140961409714098140991410014101141021410314104141051410614107141081410914110141111411214113141141411514116141171411814119141201412114122141231412414125141261412714128141291413014131141321413314134141351413614137141381413914140141411414214143141441414514146141471414814149141501415114152141531415414155141561415714158141591416014161141621416314164141651416614167141681416914170141711417214173141741417514176141771417814179141801418114182141831418414185141861418714188141891419014191141921419314194141951419614197141981419914200142011420214203142041420514206142071420814209142101421114212142131421414215142161421714218142191422014221142221422314224142251422614227142281422914230142311423214233142341423514236142371423814239142401424114242142431424414245142461424714248142491425014251142521425314254142551425614257142581425914260142611426214263142641426514266142671426814269142701427114272142731427414275142761427714278142791428014281142821428314284142851428614287142881428914290142911429214293142941429514296142971429814299143001430114302143031430414305143061430714308143091431014311143121431314314143151431614317143181431914320143211432214323143241432514326143271432814329143301433114332143331433414335143361433714338143391434014341143421434314344143451434614347143481434914350143511435214353143541435514356143571435814359143601436114362143631436414365143661436714368143691437014371143721437314374143751437614377143781437914380143811438214383143841438514386143871438814389143901439114392143931439414395143961439714398143991440014401144021440314404144051440614407144081440914410144111441214413144141441514416144171441814419144201442114422144231442414425144261442714428144291443014431144321443314434144351443614437144381443914440144411444214443144441444514446144471444814449144501445114452144531445414455144561445714458144591446014461144621446314464144651446614467144681446914470144711447214473144741447514476144771447814479144801448114482144831448414485144861448714488144891449014491144921449314494144951449614497144981449914500145011450214503145041450514506145071450814509145101451114512145131451414515145161451714518145191452014521145221452314524145251452614527145281452914530145311453214533145341453514536145371453814539145401454114542145431454414545145461454714548145491455014551145521455314554145551455614557145581455914560145611456214563145641456514566145671456814569145701457114572145731457414575145761457714578145791458014581145821458314584145851458614587145881458914590145911459214593145941459514596145971459814599146001460114602146031460414605146061460714608146091461014611146121461314614146151461614617146181461914620146211462214623146241462514626146271462814629146301463114632146331463414635146361463714638146391464014641146421464314644146451464614647146481464914650146511465214653146541465514656146571465814659146601466114662146631466414665146661466714668146691467014671146721467314674146751467614677146781467914680146811468214683146841468514686146871468814689146901469114692146931469414695146961469714698146991470014701147021470314704147051470614707147081470914710147111471214713147141471514716147171471814719147201472114722147231472414725147261472714728147291473014731147321473314734147351473614737147381473914740147411474214743147441474514746147471474814749147501475114752147531475414755147561475714758147591476014761147621476314764147651476614767147681476914770147711477214773147741477514776147771477814779147801478114782147831478414785147861478714788147891479014791147921479314794147951479614797147981479914800148011480214803148041480514806148071480814809148101481114812148131481414815148161481714818148191482014821148221482314824148251482614827148281482914830148311483214833148341483514836148371483814839148401484114842148431484414845148461484714848148491485014851148521485314854148551485614857148581485914860148611486214863148641486514866148671486814869148701487114872148731487414875148761487714878148791488014881148821488314884148851488614887148881488914890148911489214893148941489514896148971489814899149001490114902149031490414905149061490714908149091491014911149121491314914149151491614917149181491914920149211492214923149241492514926149271492814929149301493114932149331493414935149361493714938149391494014941149421494314944149451494614947149481494914950149511495214953149541495514956149571495814959149601496114962149631496414965149661496714968149691497014971149721497314974149751497614977149781497914980149811498214983149841498514986149871498814989149901499114992149931499414995149961499714998149991500015001150021500315004150051500615007150081500915010150111501215013150141501515016150171501815019150201502115022150231502415025150261502715028150291503015031150321503315034150351503615037150381503915040150411504215043150441504515046150471504815049150501505115052150531505415055150561505715058150591506015061150621506315064150651506615067150681506915070150711507215073150741507515076150771507815079150801508115082150831508415085150861508715088150891509015091150921509315094150951509615097150981509915100151011510215103151041510515106151071510815109151101511115112151131511415115151161511715118151191512015121151221512315124151251512615127151281512915130151311513215133151341513515136151371513815139151401514115142151431514415145151461514715148151491515015151151521515315154151551515615157151581515915160151611516215163151641516515166151671516815169151701517115172151731517415175151761517715178151791518015181151821518315184151851518615187151881518915190151911519215193151941519515196151971519815199152001520115202152031520415205152061520715208152091521015211152121521315214152151521615217152181521915220152211522215223152241522515226152271522815229152301523115232152331523415235152361523715238152391524015241152421524315244152451524615247152481524915250152511525215253152541525515256152571525815259152601526115262152631526415265152661526715268152691527015271152721527315274152751527615277152781527915280152811528215283152841528515286152871528815289152901529115292152931529415295152961529715298152991530015301153021530315304153051530615307153081530915310153111531215313153141531515316153171531815319153201532115322153231532415325153261532715328153291533015331153321533315334153351533615337153381533915340153411534215343153441534515346153471534815349153501535115352153531535415355153561535715358153591536015361153621536315364153651536615367153681536915370153711537215373153741537515376153771537815379153801538115382153831538415385153861538715388153891539015391153921539315394153951539615397153981539915400154011540215403154041540515406154071540815409154101541115412154131541415415154161541715418154191542015421154221542315424154251542615427154281542915430154311543215433154341543515436154371543815439154401544115442154431544415445154461544715448154491545015451154521545315454154551545615457154581545915460154611546215463154641546515466154671546815469154701547115472154731547415475154761547715478154791548015481154821548315484154851548615487154881548915490154911549215493154941549515496154971549815499155001550115502155031550415505155061550715508155091551015511155121551315514155151551615517155181551915520155211552215523155241552515526155271552815529155301553115532155331553415535155361553715538155391554015541155421554315544155451554615547155481554915550155511555215553155541555515556155571555815559155601556115562155631556415565155661556715568155691557015571155721557315574155751557615577155781557915580155811558215583155841558515586155871558815589155901559115592155931559415595155961559715598155991560015601156021560315604156051560615607156081560915610156111561215613156141561515616156171561815619156201562115622156231562415625156261562715628156291563015631156321563315634156351563615637156381563915640156411564215643156441564515646156471564815649156501565115652156531565415655156561565715658156591566015661156621566315664156651566615667156681566915670156711567215673156741567515676156771567815679156801568115682156831568415685156861568715688156891569015691156921569315694156951569615697156981569915700157011570215703157041570515706157071570815709157101571115712157131571415715157161571715718157191572015721157221572315724157251572615727157281572915730157311573215733157341573515736157371573815739157401574115742157431574415745157461574715748157491575015751157521575315754157551575615757157581575915760157611576215763157641576515766157671576815769157701577115772157731577415775157761577715778157791578015781157821578315784157851578615787157881578915790157911579215793157941579515796157971579815799158001580115802158031580415805158061580715808158091581015811158121581315814158151581615817158181581915820158211582215823158241582515826158271582815829158301583115832158331583415835158361583715838158391584015841158421584315844158451584615847158481584915850158511585215853158541585515856158571585815859158601586115862158631586415865158661586715868158691587015871158721587315874158751587615877158781587915880158811588215883158841588515886158871588815889158901589115892158931589415895158961589715898158991590015901159021590315904159051590615907159081590915910159111591215913159141591515916159171591815919159201592115922159231592415925159261592715928159291593015931159321593315934159351593615937159381593915940159411594215943159441594515946159471594815949159501595115952159531595415955159561595715958159591596015961159621596315964159651596615967159681596915970159711597215973159741597515976159771597815979159801598115982159831598415985159861598715988159891599015991159921599315994159951599615997159981599916000160011600216003160041600516006160071600816009160101601116012160131601416015160161601716018160191602016021160221602316024160251602616027160281602916030160311603216033160341603516036160371603816039160401604116042160431604416045160461604716048160491605016051160521605316054160551605616057160581605916060160611606216063160641606516066160671606816069160701607116072160731607416075160761607716078160791608016081160821608316084160851608616087160881608916090160911609216093160941609516096160971609816099161001610116102161031610416105161061610716108161091611016111161121611316114161151611616117161181611916120161211612216123161241612516126161271612816129161301613116132161331613416135161361613716138161391614016141161421614316144161451614616147161481614916150161511615216153161541615516156161571615816159161601616116162161631616416165161661616716168161691617016171161721617316174161751617616177161781617916180161811618216183161841618516186161871618816189161901619116192161931619416195161961619716198161991620016201162021620316204162051620616207162081620916210162111621216213162141621516216162171621816219162201622116222162231622416225162261622716228162291623016231162321623316234162351623616237162381623916240162411624216243162441624516246162471624816249162501625116252162531625416255162561625716258162591626016261162621626316264162651626616267162681626916270162711627216273162741627516276162771627816279162801628116282162831628416285162861628716288162891629016291162921629316294162951629616297162981629916300163011630216303163041630516306163071630816309163101631116312163131631416315163161631716318163191632016321163221632316324163251632616327163281632916330163311633216333163341633516336163371633816339163401634116342163431634416345163461634716348163491635016351163521635316354163551635616357163581635916360163611636216363163641636516366163671636816369163701637116372163731637416375163761637716378163791638016381163821638316384163851638616387163881638916390163911639216393163941639516396163971639816399164001640116402164031640416405164061640716408164091641016411164121641316414164151641616417164181641916420164211642216423164241642516426164271642816429164301643116432164331643416435164361643716438164391644016441164421644316444164451644616447164481644916450164511645216453164541645516456164571645816459164601646116462164631646416465164661646716468164691647016471164721647316474164751647616477164781647916480164811648216483164841648516486164871648816489164901649116492164931649416495164961649716498164991650016501165021650316504165051650616507165081650916510165111651216513165141651516516165171651816519165201652116522165231652416525165261652716528165291653016531165321653316534165351653616537165381653916540165411654216543165441654516546165471654816549165501655116552165531655416555165561655716558165591656016561165621656316564165651656616567165681656916570165711657216573165741657516576165771657816579165801658116582165831658416585165861658716588165891659016591165921659316594165951659616597165981659916600166011660216603166041660516606166071660816609166101661116612166131661416615166161661716618166191662016621166221662316624166251662616627166281662916630166311663216633166341663516636166371663816639166401664116642166431664416645166461664716648166491665016651166521665316654166551665616657166581665916660166611666216663166641666516666166671666816669166701667116672166731667416675166761667716678166791668016681166821668316684166851668616687166881668916690166911669216693166941669516696166971669816699167001670116702167031670416705167061670716708167091671016711167121671316714167151671616717167181671916720167211672216723167241672516726167271672816729167301673116732167331673416735167361673716738167391674016741167421674316744167451674616747167481674916750167511675216753167541675516756167571675816759167601676116762167631676416765167661676716768167691677016771167721677316774167751677616777167781677916780167811678216783167841678516786167871678816789167901679116792167931679416795167961679716798167991680016801168021680316804168051680616807168081680916810168111681216813168141681516816168171681816819168201682116822168231682416825168261682716828168291683016831168321683316834168351683616837168381683916840168411684216843168441684516846168471684816849168501685116852168531685416855168561685716858168591686016861168621686316864168651686616867168681686916870168711687216873168741687516876168771687816879168801688116882168831688416885168861688716888168891689016891168921689316894168951689616897168981689916900169011690216903169041690516906169071690816909169101691116912169131691416915169161691716918169191692016921169221692316924169251692616927169281692916930169311693216933169341693516936169371693816939169401694116942169431694416945169461694716948169491695016951169521695316954169551695616957169581695916960169611696216963169641696516966169671696816969169701697116972169731697416975169761697716978169791698016981169821698316984169851698616987169881698916990169911699216993169941699516996169971699816999170001700117002170031700417005170061700717008170091701017011170121701317014170151701617017170181701917020170211702217023170241702517026170271702817029170301703117032170331703417035170361703717038170391704017041170421704317044170451704617047170481704917050170511705217053170541705517056170571705817059170601706117062170631706417065170661706717068170691707017071170721707317074170751707617077170781707917080170811708217083170841708517086170871708817089170901709117092170931709417095170961709717098170991710017101171021710317104171051710617107171081710917110171111711217113171141711517116171171711817119171201712117122171231712417125171261712717128171291713017131171321713317134171351713617137171381713917140171411714217143171441714517146171471714817149171501715117152171531715417155171561715717158171591716017161171621716317164171651716617167171681716917170171711717217173171741717517176171771717817179171801718117182171831718417185171861718717188171891719017191171921719317194171951719617197171981719917200172011720217203172041720517206172071720817209172101721117212172131721417215172161721717218172191722017221172221722317224172251722617227172281722917230172311723217233172341723517236172371723817239172401724117242172431724417245172461724717248172491725017251172521725317254172551725617257172581725917260172611726217263172641726517266172671726817269172701727117272172731727417275172761727717278172791728017281172821728317284172851728617287172881728917290172911729217293172941729517296172971729817299173001730117302173031730417305173061730717308173091731017311173121731317314173151731617317173181731917320173211732217323173241732517326173271732817329173301733117332173331733417335173361733717338173391734017341173421734317344173451734617347173481734917350173511735217353173541735517356173571735817359173601736117362173631736417365173661736717368173691737017371173721737317374173751737617377173781737917380173811738217383173841738517386173871738817389173901739117392173931739417395173961739717398173991740017401174021740317404174051740617407174081740917410174111741217413174141741517416174171741817419174201742117422174231742417425174261742717428174291743017431174321743317434174351743617437174381743917440174411744217443174441744517446174471744817449174501745117452174531745417455174561745717458174591746017461174621746317464174651746617467174681746917470174711747217473174741747517476174771747817479174801748117482174831748417485174861748717488174891749017491174921749317494174951749617497174981749917500175011750217503175041750517506175071750817509175101751117512175131751417515175161751717518175191752017521175221752317524175251752617527175281752917530175311753217533175341753517536175371753817539175401754117542175431754417545175461754717548175491755017551175521755317554175551755617557175581755917560175611756217563175641756517566175671756817569175701757117572175731757417575175761757717578175791758017581175821758317584175851758617587175881758917590175911759217593175941759517596175971759817599176001760117602176031760417605176061760717608176091761017611176121761317614176151761617617176181761917620176211762217623176241762517626176271762817629176301763117632176331763417635176361763717638176391764017641176421764317644176451764617647176481764917650176511765217653176541765517656176571765817659176601766117662176631766417665176661766717668176691767017671176721767317674176751767617677176781767917680176811768217683176841768517686176871768817689176901769117692176931769417695176961769717698176991770017701177021770317704177051770617707177081770917710177111771217713177141771517716177171771817719177201772117722177231772417725177261772717728177291773017731177321773317734177351773617737177381773917740177411774217743177441774517746177471774817749177501775117752177531775417755177561775717758177591776017761177621776317764177651776617767177681776917770177711777217773177741777517776177771777817779177801778117782177831778417785177861778717788177891779017791177921779317794177951779617797177981779917800178011780217803178041780517806178071780817809178101781117812178131781417815178161781717818178191782017821178221782317824178251782617827178281782917830178311783217833178341783517836178371783817839178401784117842178431784417845178461784717848178491785017851178521785317854178551785617857178581785917860178611786217863178641786517866178671786817869178701787117872178731787417875178761787717878178791788017881178821788317884178851788617887178881788917890178911789217893178941789517896178971789817899179001790117902179031790417905179061790717908179091791017911179121791317914179151791617917179181791917920179211792217923179241792517926179271792817929179301793117932179331793417935179361793717938179391794017941179421794317944179451794617947179481794917950179511795217953179541795517956179571795817959179601796117962179631796417965179661796717968179691797017971179721797317974179751797617977179781797917980179811798217983179841798517986179871798817989179901799117992179931799417995179961799717998179991800018001180021800318004180051800618007180081800918010180111801218013180141801518016180171801818019180201802118022180231802418025180261802718028180291803018031180321803318034180351803618037180381803918040180411804218043180441804518046180471804818049180501805118052180531805418055180561805718058180591806018061180621806318064180651806618067180681806918070180711807218073180741807518076180771807818079180801808118082180831808418085180861808718088180891809018091180921809318094180951809618097180981809918100181011810218103181041810518106181071810818109181101811118112181131811418115181161811718118181191812018121181221812318124181251812618127181281812918130181311813218133181341813518136181371813818139181401814118142181431814418145181461814718148181491815018151181521815318154181551815618157181581815918160181611816218163181641816518166181671816818169181701817118172181731817418175181761817718178181791818018181181821818318184181851818618187181881818918190181911819218193181941819518196181971819818199182001820118202182031820418205182061820718208182091821018211182121821318214182151821618217182181821918220182211822218223182241822518226182271822818229182301823118232182331823418235182361823718238182391824018241182421824318244182451824618247182481824918250182511825218253182541825518256182571825818259182601826118262182631826418265182661826718268182691827018271182721827318274182751827618277182781827918280182811828218283182841828518286182871828818289182901829118292182931829418295182961829718298182991830018301183021830318304183051830618307183081830918310183111831218313183141831518316183171831818319183201832118322183231832418325183261832718328183291833018331183321833318334183351833618337183381833918340183411834218343183441834518346183471834818349183501835118352183531835418355183561835718358183591836018361183621836318364183651836618367183681836918370183711837218373183741837518376183771837818379183801838118382183831838418385183861838718388183891839018391183921839318394183951839618397183981839918400184011840218403184041840518406184071840818409184101841118412184131841418415184161841718418184191842018421184221842318424184251842618427184281842918430184311843218433184341843518436184371843818439184401844118442184431844418445184461844718448184491845018451184521845318454184551845618457184581845918460184611846218463184641846518466184671846818469184701847118472184731847418475184761847718478184791848018481184821848318484184851848618487184881848918490184911849218493184941849518496184971849818499185001850118502185031850418505185061850718508185091851018511185121851318514185151851618517185181851918520185211852218523185241852518526185271852818529185301853118532185331853418535185361853718538185391854018541185421854318544185451854618547185481854918550185511855218553185541855518556185571855818559185601856118562185631856418565185661856718568185691857018571185721857318574185751857618577185781857918580185811858218583185841858518586185871858818589185901859118592185931859418595185961859718598185991860018601186021860318604186051860618607186081860918610186111861218613186141861518616186171861818619186201862118622186231862418625186261862718628186291863018631186321863318634186351863618637186381863918640186411864218643186441864518646186471864818649186501865118652186531865418655186561865718658186591866018661186621866318664186651866618667186681866918670186711867218673186741867518676186771867818679186801868118682186831868418685186861868718688186891869018691186921869318694186951869618697186981869918700187011870218703187041870518706187071870818709187101871118712187131871418715187161871718718187191872018721187221872318724187251872618727187281872918730187311873218733187341873518736187371873818739187401874118742187431874418745187461874718748187491875018751187521875318754187551875618757187581875918760187611876218763187641876518766187671876818769187701877118772187731877418775187761877718778187791878018781187821878318784187851878618787187881878918790187911879218793187941879518796187971879818799188001880118802188031880418805188061880718808188091881018811188121881318814188151881618817188181881918820188211882218823188241882518826188271882818829188301883118832188331883418835188361883718838188391884018841188421884318844188451884618847188481884918850188511885218853188541885518856188571885818859188601886118862188631886418865188661886718868188691887018871188721887318874188751887618877188781887918880188811888218883188841888518886188871888818889188901889118892188931889418895188961889718898188991890018901189021890318904189051890618907189081890918910189111891218913189141891518916189171891818919189201892118922189231892418925189261892718928189291893018931189321893318934189351893618937189381893918940189411894218943189441894518946189471894818949189501895118952189531895418955189561895718958189591896018961189621896318964189651896618967189681896918970189711897218973189741897518976189771897818979189801898118982189831898418985189861898718988189891899018991189921899318994189951899618997189981899919000190011900219003190041900519006190071900819009190101901119012190131901419015190161901719018190191902019021190221902319024190251902619027190281902919030190311903219033190341903519036190371903819039190401904119042190431904419045190461904719048190491905019051190521905319054190551905619057190581905919060190611906219063190641906519066190671906819069190701907119072190731907419075190761907719078190791908019081190821908319084190851908619087190881908919090190911909219093190941909519096190971909819099191001910119102191031910419105191061910719108191091911019111191121911319114191151911619117191181911919120191211912219123191241912519126191271912819129191301913119132191331913419135191361913719138191391914019141191421914319144191451914619147191481914919150191511915219153191541915519156191571915819159191601916119162191631916419165191661916719168191691917019171191721917319174191751917619177191781917919180191811918219183191841918519186191871918819189191901919119192191931919419195191961919719198191991920019201192021920319204192051920619207192081920919210192111921219213192141921519216192171921819219192201922119222192231922419225192261922719228192291923019231192321923319234192351923619237192381923919240192411924219243192441924519246192471924819249192501925119252192531925419255192561925719258192591926019261192621926319264192651926619267192681926919270192711927219273192741927519276192771927819279192801928119282192831928419285192861928719288192891929019291192921929319294192951929619297192981929919300193011930219303193041930519306193071930819309193101931119312193131931419315193161931719318193191932019321193221932319324193251932619327193281932919330193311933219333193341933519336193371933819339193401934119342193431934419345193461934719348193491935019351193521935319354193551935619357193581935919360193611936219363193641936519366193671936819369193701937119372193731937419375193761937719378193791938019381193821938319384193851938619387193881938919390193911939219393193941939519396193971939819399194001940119402194031940419405194061940719408194091941019411194121941319414194151941619417194181941919420194211942219423194241942519426194271942819429194301943119432194331943419435194361943719438194391944019441194421944319444194451944619447194481944919450194511945219453194541945519456194571945819459194601946119462194631946419465194661946719468194691947019471194721947319474194751947619477194781947919480194811948219483194841948519486194871948819489194901949119492194931949419495194961949719498194991950019501195021950319504195051950619507195081950919510195111951219513195141951519516195171951819519195201952119522195231952419525195261952719528195291953019531195321953319534195351953619537195381953919540195411954219543195441954519546195471954819549195501955119552195531955419555195561955719558195591956019561195621956319564195651956619567195681956919570195711957219573195741957519576195771957819579195801958119582195831958419585195861958719588195891959019591195921959319594195951959619597195981959919600196011960219603196041960519606196071960819609196101961119612196131961419615196161961719618196191962019621196221962319624196251962619627196281962919630196311963219633196341963519636196371963819639196401964119642196431964419645196461964719648196491965019651196521965319654196551965619657196581965919660196611966219663196641966519666196671966819669196701967119672196731967419675196761967719678196791968019681196821968319684196851968619687196881968919690196911969219693196941969519696196971969819699197001970119702197031970419705197061970719708197091971019711197121971319714197151971619717197181971919720197211972219723197241972519726197271972819729197301973119732197331973419735197361973719738197391974019741197421974319744197451974619747197481974919750197511975219753197541975519756197571975819759197601976119762197631976419765197661976719768197691977019771197721977319774197751977619777197781977919780197811978219783197841978519786197871978819789197901979119792197931979419795197961979719798197991980019801198021980319804198051980619807198081980919810198111981219813198141981519816198171981819819198201982119822198231982419825198261982719828198291983019831198321983319834198351983619837198381983919840198411984219843198441984519846198471984819849198501985119852198531985419855198561985719858198591986019861198621986319864198651986619867198681986919870198711987219873198741987519876198771987819879198801988119882198831988419885198861988719888198891989019891198921989319894198951989619897198981989919900199011990219903199041990519906199071990819909199101991119912199131991419915199161991719918199191992019921199221992319924199251992619927199281992919930199311993219933199341993519936199371993819939199401994119942199431994419945199461994719948199491995019951199521995319954199551995619957199581995919960199611996219963199641996519966199671996819969199701997119972199731997419975199761997719978199791998019981199821998319984199851998619987199881998919990199911999219993199941999519996199971999819999200002000120002200032000420005200062000720008200092001020011200122001320014200152001620017200182001920020200212002220023200242002520026200272002820029200302003120032200332003420035200362003720038200392004020041200422004320044200452004620047200482004920050200512005220053200542005520056200572005820059200602006120062200632006420065200662006720068200692007020071200722007320074200752007620077200782007920080200812008220083200842008520086200872008820089200902009120092200932009420095200962009720098200992010020101201022010320104201052010620107201082010920110201112011220113201142011520116201172011820119201202012120122201232012420125201262012720128201292013020131201322013320134201352013620137201382013920140201412014220143201442014520146201472014820149201502015120152201532015420155201562015720158201592016020161201622016320164201652016620167201682016920170201712017220173201742017520176201772017820179201802018120182201832018420185201862018720188201892019020191201922019320194201952019620197201982019920200202012020220203202042020520206202072020820209202102021120212202132021420215202162021720218202192022020221202222022320224202252022620227202282022920230202312023220233202342023520236202372023820239202402024120242202432024420245202462024720248202492025020251202522025320254202552025620257202582025920260202612026220263202642026520266202672026820269202702027120272202732027420275202762027720278202792028020281202822028320284202852028620287202882028920290202912029220293202942029520296202972029820299203002030120302203032030420305203062030720308203092031020311203122031320314203152031620317203182031920320203212032220323203242032520326203272032820329203302033120332203332033420335203362033720338203392034020341203422034320344203452034620347203482034920350203512035220353203542035520356203572035820359203602036120362203632036420365203662036720368203692037020371203722037320374203752037620377203782037920380203812038220383203842038520386203872038820389203902039120392203932039420395203962039720398203992040020401204022040320404204052040620407204082040920410204112041220413204142041520416204172041820419204202042120422204232042420425204262042720428204292043020431204322043320434204352043620437204382043920440204412044220443204442044520446204472044820449204502045120452204532045420455204562045720458204592046020461204622046320464204652046620467204682046920470204712047220473204742047520476204772047820479204802048120482204832048420485204862048720488204892049020491204922049320494204952049620497204982049920500205012050220503205042050520506205072050820509205102051120512205132051420515205162051720518205192052020521205222052320524205252052620527205282052920530205312053220533205342053520536205372053820539205402054120542205432054420545205462054720548205492055020551205522055320554205552055620557205582055920560205612056220563205642056520566205672056820569205702057120572205732057420575205762057720578205792058020581205822058320584205852058620587205882058920590205912059220593205942059520596205972059820599206002060120602206032060420605206062060720608206092061020611206122061320614206152061620617206182061920620206212062220623206242062520626206272062820629206302063120632206332063420635206362063720638206392064020641206422064320644206452064620647206482064920650206512065220653206542065520656206572065820659206602066120662206632066420665206662066720668206692067020671206722067320674206752067620677206782067920680206812068220683206842068520686206872068820689206902069120692206932069420695206962069720698206992070020701207022070320704207052070620707207082070920710207112071220713207142071520716207172071820719207202072120722207232072420725207262072720728207292073020731207322073320734207352073620737207382073920740207412074220743207442074520746207472074820749207502075120752207532075420755207562075720758207592076020761207622076320764207652076620767207682076920770207712077220773207742077520776207772077820779207802078120782207832078420785207862078720788207892079020791207922079320794207952079620797207982079920800208012080220803208042080520806208072080820809208102081120812208132081420815208162081720818208192082020821208222082320824208252082620827208282082920830208312083220833208342083520836208372083820839208402084120842208432084420845208462084720848208492085020851208522085320854208552085620857208582085920860208612086220863208642086520866208672086820869208702087120872208732087420875208762087720878208792088020881208822088320884208852088620887208882088920890208912089220893208942089520896208972089820899209002090120902209032090420905209062090720908209092091020911209122091320914209152091620917209182091920920209212092220923209242092520926209272092820929209302093120932209332093420935209362093720938209392094020941209422094320944209452094620947209482094920950209512095220953209542095520956209572095820959209602096120962209632096420965209662096720968209692097020971209722097320974209752097620977209782097920980209812098220983209842098520986209872098820989209902099120992209932099420995209962099720998209992100021001210022100321004210052100621007210082100921010210112101221013210142101521016210172101821019210202102121022210232102421025210262102721028210292103021031210322103321034210352103621037210382103921040210412104221043210442104521046210472104821049210502105121052210532105421055210562105721058210592106021061210622106321064210652106621067210682106921070210712107221073210742107521076210772107821079210802108121082210832108421085210862108721088210892109021091210922109321094210952109621097210982109921100211012110221103211042110521106211072110821109211102111121112211132111421115211162111721118211192112021121211222112321124211252112621127211282112921130211312113221133211342113521136211372113821139211402114121142211432114421145211462114721148211492115021151211522115321154211552115621157211582115921160211612116221163211642116521166211672116821169211702117121172211732117421175211762117721178211792118021181211822118321184211852118621187211882118921190211912119221193211942119521196211972119821199212002120121202212032120421205212062120721208212092121021211212122121321214212152121621217212182121921220212212122221223212242122521226212272122821229212302123121232212332123421235212362123721238212392124021241212422124321244212452124621247212482124921250212512125221253212542125521256212572125821259212602126121262212632126421265212662126721268212692127021271212722127321274212752127621277212782127921280212812128221283212842128521286212872128821289212902129121292212932129421295212962129721298212992130021301213022130321304213052130621307213082130921310213112131221313213142131521316213172131821319213202132121322213232132421325213262132721328213292133021331213322133321334213352133621337213382133921340213412134221343213442134521346213472134821349213502135121352213532135421355213562135721358213592136021361213622136321364213652136621367213682136921370213712137221373213742137521376213772137821379213802138121382213832138421385213862138721388213892139021391213922139321394213952139621397213982139921400214012140221403214042140521406214072140821409214102141121412214132141421415214162141721418214192142021421214222142321424214252142621427214282142921430214312143221433214342143521436214372143821439214402144121442214432144421445214462144721448214492145021451214522145321454214552145621457214582145921460214612146221463214642146521466214672146821469214702147121472214732147421475214762147721478214792148021481214822148321484214852148621487214882148921490214912149221493214942149521496214972149821499215002150121502215032150421505215062150721508215092151021511215122151321514215152151621517215182151921520215212152221523215242152521526215272152821529215302153121532215332153421535215362153721538215392154021541215422154321544215452154621547215482154921550215512155221553215542155521556215572155821559215602156121562215632156421565215662156721568215692157021571215722157321574215752157621577215782157921580215812158221583215842158521586215872158821589215902159121592215932159421595215962159721598215992160021601216022160321604216052160621607216082160921610216112161221613216142161521616216172161821619216202162121622216232162421625216262162721628216292163021631216322163321634216352163621637216382163921640216412164221643216442164521646216472164821649216502165121652216532165421655216562165721658216592166021661216622166321664216652166621667216682166921670216712167221673216742167521676216772167821679216802168121682216832168421685216862168721688216892169021691216922169321694216952169621697216982169921700217012170221703217042170521706217072170821709217102171121712217132171421715217162171721718217192172021721217222172321724217252172621727217282172921730217312173221733217342173521736217372173821739217402174121742217432174421745217462174721748217492175021751217522175321754217552175621757217582175921760217612176221763217642176521766217672176821769217702177121772217732177421775217762177721778217792178021781217822178321784217852178621787217882178921790217912179221793217942179521796217972179821799218002180121802218032180421805218062180721808218092181021811218122181321814218152181621817218182181921820218212182221823218242182521826218272182821829218302183121832218332183421835218362183721838218392184021841218422184321844218452184621847218482184921850218512185221853218542185521856218572185821859218602186121862218632186421865218662186721868218692187021871218722187321874218752187621877218782187921880218812188221883218842188521886218872188821889218902189121892218932189421895218962189721898218992190021901219022190321904219052190621907219082190921910219112191221913219142191521916219172191821919219202192121922219232192421925219262192721928219292193021931219322193321934219352193621937219382193921940219412194221943219442194521946219472194821949219502195121952219532195421955219562195721958219592196021961219622196321964219652196621967219682196921970219712197221973219742197521976219772197821979219802198121982219832198421985219862198721988219892199021991219922199321994219952199621997219982199922000220012200222003220042200522006220072200822009220102201122012220132201422015220162201722018220192202022021220222202322024220252202622027220282202922030220312203222033220342203522036220372203822039220402204122042220432204422045220462204722048220492205022051220522205322054220552205622057220582205922060220612206222063220642206522066220672206822069220702207122072220732207422075220762207722078220792208022081220822208322084220852208622087220882208922090220912209222093220942209522096220972209822099221002210122102221032210422105221062210722108221092211022111221122211322114221152211622117221182211922120221212212222123221242212522126221272212822129221302213122132221332213422135221362213722138221392214022141221422214322144221452214622147221482214922150221512215222153221542215522156221572215822159221602216122162221632216422165221662216722168221692217022171221722217322174221752217622177221782217922180221812218222183221842218522186221872218822189221902219122192221932219422195221962219722198221992220022201222022220322204222052220622207222082220922210222112221222213222142221522216222172221822219222202222122222222232222422225222262222722228222292223022231222322223322234222352223622237222382223922240222412224222243222442224522246222472224822249222502225122252222532225422255222562225722258222592226022261222622226322264222652226622267222682226922270222712227222273222742227522276222772227822279222802228122282222832228422285222862228722288222892229022291222922229322294222952229622297222982229922300223012230222303223042230522306223072230822309223102231122312223132231422315223162231722318223192232022321223222232322324223252232622327223282232922330223312233222333223342233522336223372233822339223402234122342223432234422345223462234722348223492235022351223522235322354223552235622357223582235922360223612236222363223642236522366223672236822369223702237122372223732237422375223762237722378223792238022381223822238322384223852238622387223882238922390223912239222393223942239522396223972239822399224002240122402224032240422405224062240722408224092241022411224122241322414224152241622417224182241922420224212242222423224242242522426224272242822429224302243122432224332243422435224362243722438224392244022441224422244322444224452244622447224482244922450224512245222453224542245522456224572245822459224602246122462224632246422465224662246722468224692247022471224722247322474224752247622477224782247922480224812248222483224842248522486224872248822489224902249122492224932249422495224962249722498224992250022501225022250322504225052250622507225082250922510225112251222513225142251522516225172251822519225202252122522225232252422525225262252722528225292253022531225322253322534225352253622537225382253922540225412254222543225442254522546225472254822549225502255122552225532255422555225562255722558225592256022561225622256322564225652256622567225682256922570225712257222573225742257522576225772257822579225802258122582225832258422585225862258722588225892259022591225922259322594225952259622597225982259922600226012260222603226042260522606226072260822609226102261122612226132261422615226162261722618226192262022621226222262322624226252262622627226282262922630226312263222633226342263522636226372263822639226402264122642226432264422645226462264722648226492265022651226522265322654226552265622657226582265922660226612266222663226642266522666226672266822669226702267122672226732267422675226762267722678226792268022681226822268322684226852268622687226882268922690226912269222693226942269522696226972269822699227002270122702227032270422705227062270722708227092271022711227122271322714227152271622717227182271922720227212272222723227242272522726227272272822729227302273122732227332273422735227362273722738227392274022741227422274322744227452274622747227482274922750227512275222753227542275522756227572275822759227602276122762227632276422765227662276722768227692277022771227722277322774227752277622777227782277922780227812278222783227842278522786227872278822789227902279122792227932279422795227962279722798227992280022801228022280322804228052280622807228082280922810228112281222813228142281522816228172281822819228202282122822228232282422825228262282722828228292283022831228322283322834228352283622837228382283922840228412284222843228442284522846228472284822849228502285122852228532285422855228562285722858228592286022861228622286322864228652286622867228682286922870228712287222873228742287522876228772287822879228802288122882228832288422885228862288722888228892289022891228922289322894228952289622897228982289922900229012290222903229042290522906229072290822909229102291122912229132291422915229162291722918229192292022921229222292322924229252292622927229282292922930229312293222933229342293522936229372293822939229402294122942229432294422945229462294722948229492295022951229522295322954229552295622957229582295922960229612296222963229642296522966229672296822969229702297122972229732297422975229762297722978229792298022981229822298322984229852298622987229882298922990229912299222993229942299522996229972299822999230002300123002230032300423005230062300723008230092301023011230122301323014230152301623017230182301923020230212302223023230242302523026230272302823029230302303123032230332303423035230362303723038230392304023041230422304323044230452304623047230482304923050230512305223053230542305523056230572305823059230602306123062230632306423065230662306723068230692307023071230722307323074230752307623077230782307923080230812308223083230842308523086230872308823089230902309123092230932309423095230962309723098230992310023101231022310323104231052310623107231082310923110231112311223113231142311523116231172311823119231202312123122231232312423125231262312723128231292313023131231322313323134231352313623137231382313923140231412314223143231442314523146231472314823149231502315123152231532315423155231562315723158231592316023161231622316323164231652316623167231682316923170231712317223173231742317523176231772317823179231802318123182231832318423185231862318723188231892319023191231922319323194231952319623197231982319923200232012320223203232042320523206232072320823209232102321123212232132321423215232162321723218232192322023221232222322323224232252322623227232282322923230232312323223233232342323523236232372323823239232402324123242232432324423245232462324723248232492325023251232522325323254232552325623257232582325923260232612326223263232642326523266232672326823269232702327123272232732327423275232762327723278232792328023281232822328323284232852328623287232882328923290232912329223293232942329523296232972329823299233002330123302233032330423305233062330723308233092331023311233122331323314233152331623317233182331923320233212332223323233242332523326233272332823329233302333123332233332333423335233362333723338233392334023341233422334323344233452334623347233482334923350233512335223353233542335523356233572335823359233602336123362233632336423365233662336723368233692337023371233722337323374233752337623377233782337923380233812338223383233842338523386233872338823389233902339123392233932339423395233962339723398233992340023401234022340323404234052340623407234082340923410234112341223413234142341523416234172341823419234202342123422234232342423425234262342723428234292343023431234322343323434234352343623437234382343923440234412344223443234442344523446234472344823449234502345123452234532345423455234562345723458234592346023461234622346323464234652346623467234682346923470234712347223473234742347523476234772347823479234802348123482234832348423485234862348723488234892349023491234922349323494234952349623497234982349923500235012350223503235042350523506235072350823509235102351123512235132351423515235162351723518235192352023521235222352323524235252352623527235282352923530235312353223533235342353523536235372353823539235402354123542235432354423545235462354723548235492355023551235522355323554235552355623557235582355923560235612356223563235642356523566235672356823569235702357123572235732357423575235762357723578235792358023581235822358323584235852358623587235882358923590235912359223593235942359523596235972359823599236002360123602236032360423605236062360723608236092361023611236122361323614236152361623617236182361923620236212362223623236242362523626236272362823629236302363123632236332363423635236362363723638236392364023641236422364323644236452364623647236482364923650236512365223653236542365523656236572365823659236602366123662236632366423665236662366723668236692367023671236722367323674236752367623677236782367923680236812368223683236842368523686236872368823689236902369123692236932369423695236962369723698236992370023701237022370323704237052370623707237082370923710237112371223713237142371523716237172371823719237202372123722237232372423725237262372723728237292373023731237322373323734237352373623737237382373923740237412374223743237442374523746237472374823749237502375123752237532375423755237562375723758237592376023761237622376323764237652376623767237682376923770237712377223773237742377523776237772377823779237802378123782237832378423785237862378723788237892379023791237922379323794237952379623797237982379923800238012380223803238042380523806238072380823809238102381123812238132381423815238162381723818238192382023821238222382323824238252382623827238282382923830238312383223833238342383523836238372383823839238402384123842238432384423845238462384723848238492385023851238522385323854238552385623857238582385923860238612386223863238642386523866238672386823869238702387123872238732387423875238762387723878238792388023881238822388323884238852388623887238882388923890238912389223893238942389523896238972389823899239002390123902239032390423905239062390723908239092391023911239122391323914239152391623917239182391923920239212392223923239242392523926239272392823929239302393123932239332393423935239362393723938239392394023941239422394323944239452394623947239482394923950239512395223953239542395523956239572395823959239602396123962239632396423965239662396723968239692397023971239722397323974239752397623977239782397923980239812398223983239842398523986239872398823989239902399123992239932399423995239962399723998239992400024001240022400324004240052400624007240082400924010240112401224013240142401524016240172401824019240202402124022240232402424025240262402724028240292403024031240322403324034240352403624037240382403924040240412404224043240442404524046240472404824049240502405124052240532405424055240562405724058240592406024061240622406324064240652406624067240682406924070240712407224073240742407524076240772407824079240802408124082240832408424085240862408724088240892409024091240922409324094240952409624097240982409924100241012410224103241042410524106241072410824109241102411124112241132411424115241162411724118241192412024121241222412324124241252412624127241282412924130241312413224133241342413524136241372413824139241402414124142241432414424145241462414724148241492415024151241522415324154241552415624157241582415924160241612416224163241642416524166241672416824169241702417124172241732417424175241762417724178241792418024181241822418324184241852418624187241882418924190241912419224193241942419524196241972419824199242002420124202242032420424205242062420724208242092421024211242122421324214242152421624217242182421924220242212422224223242242422524226242272422824229242302423124232242332423424235242362423724238242392424024241242422424324244242452424624247242482424924250242512425224253242542425524256242572425824259242602426124262242632426424265242662426724268242692427024271242722427324274242752427624277242782427924280242812428224283242842428524286242872428824289242902429124292242932429424295242962429724298242992430024301243022430324304243052430624307243082430924310243112431224313243142431524316243172431824319243202432124322243232432424325243262432724328243292433024331243322433324334243352433624337243382433924340243412434224343243442434524346243472434824349243502435124352243532435424355243562435724358243592436024361243622436324364243652436624367243682436924370243712437224373243742437524376243772437824379243802438124382243832438424385243862438724388243892439024391243922439324394243952439624397243982439924400244012440224403244042440524406244072440824409244102441124412244132441424415244162441724418244192442024421244222442324424244252442624427244282442924430244312443224433244342443524436244372443824439244402444124442244432444424445244462444724448244492445024451244522445324454244552445624457244582445924460244612446224463244642446524466244672446824469244702447124472244732447424475244762447724478244792448024481244822448324484244852448624487244882448924490244912449224493244942449524496244972449824499245002450124502245032450424505245062450724508245092451024511245122451324514245152451624517245182451924520245212452224523245242452524526245272452824529245302453124532245332453424535245362453724538245392454024541245422454324544245452454624547245482454924550245512455224553245542455524556245572455824559245602456124562245632456424565245662456724568245692457024571245722457324574245752457624577245782457924580245812458224583245842458524586245872458824589245902459124592245932459424595245962459724598245992460024601246022460324604246052460624607246082460924610246112461224613246142461524616246172461824619246202462124622246232462424625246262462724628246292463024631246322463324634246352463624637246382463924640246412464224643246442464524646246472464824649246502465124652246532465424655246562465724658246592466024661246622466324664246652466624667246682466924670246712467224673246742467524676246772467824679246802468124682246832468424685246862468724688246892469024691246922469324694246952469624697246982469924700247012470224703247042470524706247072470824709247102471124712247132471424715247162471724718247192472024721247222472324724247252472624727247282472924730247312473224733247342473524736247372473824739247402474124742247432474424745247462474724748247492475024751247522475324754247552475624757247582475924760247612476224763247642476524766247672476824769247702477124772247732477424775247762477724778247792478024781247822478324784247852478624787247882478924790247912479224793247942479524796247972479824799248002480124802248032480424805248062480724808248092481024811248122481324814248152481624817248182481924820248212482224823248242482524826248272482824829248302483124832248332483424835248362483724838248392484024841248422484324844248452484624847248482484924850248512485224853248542485524856248572485824859248602486124862248632486424865248662486724868248692487024871248722487324874248752487624877248782487924880248812488224883248842488524886248872488824889248902489124892248932489424895248962489724898248992490024901249022490324904249052490624907249082490924910249112491224913249142491524916249172491824919249202492124922249232492424925249262492724928249292493024931249322493324934249352493624937249382493924940249412494224943249442494524946249472494824949249502495124952249532495424955249562495724958249592496024961249622496324964249652496624967249682496924970249712497224973249742497524976249772497824979249802498124982249832498424985249862498724988249892499024991249922499324994249952499624997249982499925000250012500225003250042500525006250072500825009250102501125012250132501425015250162501725018250192502025021250222502325024250252502625027250282502925030250312503225033250342503525036250372503825039250402504125042250432504425045250462504725048250492505025051250522505325054250552505625057250582505925060250612506225063250642506525066250672506825069250702507125072250732507425075250762507725078250792508025081250822508325084250852508625087250882508925090250912509225093250942509525096250972509825099251002510125102251032510425105251062510725108251092511025111251122511325114251152511625117251182511925120251212512225123251242512525126251272512825129251302513125132251332513425135251362513725138251392514025141251422514325144251452514625147251482514925150251512515225153251542515525156251572515825159251602516125162251632516425165251662516725168251692517025171251722517325174251752517625177251782517925180251812518225183251842518525186251872518825189251902519125192251932519425195251962519725198251992520025201252022520325204252052520625207252082520925210252112521225213252142521525216252172521825219252202522125222252232522425225252262522725228252292523025231252322523325234252352523625237252382523925240252412524225243252442524525246252472524825249252502525125252252532525425255252562525725258252592526025261252622526325264252652526625267252682526925270252712527225273252742527525276252772527825279252802528125282252832528425285252862528725288252892529025291252922529325294252952529625297252982529925300253012530225303253042530525306253072530825309253102531125312253132531425315253162531725318253192532025321253222532325324253252532625327253282532925330253312533225333253342533525336253372533825339253402534125342253432534425345253462534725348253492535025351253522535325354253552535625357253582535925360253612536225363253642536525366253672536825369253702537125372253732537425375253762537725378253792538025381253822538325384253852538625387253882538925390253912539225393253942539525396253972539825399254002540125402254032540425405254062540725408254092541025411254122541325414254152541625417
  1. module.exports =
  2. /******/ (function(modules, runtime) { // webpackBootstrap
  3. /******/ "use strict";
  4. /******/ // The module cache
  5. /******/ var installedModules = {};
  6. /******/
  7. /******/ // The require function
  8. /******/ function __webpack_require__(moduleId) {
  9. /******/
  10. /******/ // Check if module is in cache
  11. /******/ if(installedModules[moduleId]) {
  12. /******/ return installedModules[moduleId].exports;
  13. /******/ }
  14. /******/ // Create a new module (and put it into the cache)
  15. /******/ var module = installedModules[moduleId] = {
  16. /******/ i: moduleId,
  17. /******/ l: false,
  18. /******/ exports: {}
  19. /******/ };
  20. /******/
  21. /******/ // Execute the module function
  22. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  23. /******/
  24. /******/ // Flag the module as loaded
  25. /******/ module.l = true;
  26. /******/
  27. /******/ // Return the exports of the module
  28. /******/ return module.exports;
  29. /******/ }
  30. /******/
  31. /******/
  32. /******/ __webpack_require__.ab = __dirname + "/";
  33. /******/
  34. /******/ // the startup function
  35. /******/ function startup() {
  36. /******/ // Load entry module and return exports
  37. /******/ return __webpack_require__(198);
  38. /******/ };
  39. /******/
  40. /******/ // run startup
  41. /******/ return startup();
  42. /******/ })
  43. /************************************************************************/
  44. /******/ ({
  45. /***/ 0:
  46. /***/ (function(module, __unusedexports, __webpack_require__) {
  47. const { requestLog } = __webpack_require__(916);
  48. const {
  49. restEndpointMethods
  50. } = __webpack_require__(842);
  51. const Core = __webpack_require__(529);
  52. const CORE_PLUGINS = [
  53. __webpack_require__(190),
  54. __webpack_require__(19), // deprecated: remove in v17
  55. requestLog,
  56. __webpack_require__(148),
  57. restEndpointMethods,
  58. __webpack_require__(430),
  59. __webpack_require__(850) // deprecated: remove in v17
  60. ];
  61. const OctokitRest = Core.plugin(CORE_PLUGINS);
  62. function DeprecatedOctokit(options) {
  63. const warn =
  64. options && options.log && options.log.warn
  65. ? options.log.warn
  66. : console.warn;
  67. warn(
  68. '[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead'
  69. );
  70. return new OctokitRest(options);
  71. }
  72. const Octokit = Object.assign(DeprecatedOctokit, {
  73. Octokit: OctokitRest
  74. });
  75. Object.keys(OctokitRest).forEach(key => {
  76. /* istanbul ignore else */
  77. if (OctokitRest.hasOwnProperty(key)) {
  78. Octokit[key] = OctokitRest[key];
  79. }
  80. });
  81. module.exports = Octokit;
  82. /***/ }),
  83. /***/ 2:
  84. /***/ (function(module, __unusedexports, __webpack_require__) {
  85. "use strict";
  86. const os = __webpack_require__(87);
  87. const macosRelease = __webpack_require__(118);
  88. const winRelease = __webpack_require__(49);
  89. const osName = (platform, release) => {
  90. if (!platform && release) {
  91. throw new Error('You can\'t specify a `release` without specifying `platform`');
  92. }
  93. platform = platform || os.platform();
  94. let id;
  95. if (platform === 'darwin') {
  96. if (!release && os.platform() === 'darwin') {
  97. release = os.release();
  98. }
  99. const prefix = release ? (Number(release.split('.')[0]) > 15 ? 'macOS' : 'OS X') : 'macOS';
  100. id = release ? macosRelease(release).name : '';
  101. return prefix + (id ? ' ' + id : '');
  102. }
  103. if (platform === 'linux') {
  104. if (!release && os.platform() === 'linux') {
  105. release = os.release();
  106. }
  107. id = release ? release.replace(/^(\d+\.\d+).*/, '$1') : '';
  108. return 'Linux' + (id ? ' ' + id : '');
  109. }
  110. if (platform === 'win32') {
  111. if (!release && os.platform() === 'win32') {
  112. release = os.release();
  113. }
  114. id = release ? winRelease(release) : '';
  115. return 'Windows' + (id ? ' ' + id : '');
  116. }
  117. return platform;
  118. };
  119. module.exports = osName;
  120. /***/ }),
  121. /***/ 9:
  122. /***/ (function(module, __unusedexports, __webpack_require__) {
  123. var once = __webpack_require__(969);
  124. var noop = function() {};
  125. var isRequest = function(stream) {
  126. return stream.setHeader && typeof stream.abort === 'function';
  127. };
  128. var isChildProcess = function(stream) {
  129. return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3
  130. };
  131. var eos = function(stream, opts, callback) {
  132. if (typeof opts === 'function') return eos(stream, null, opts);
  133. if (!opts) opts = {};
  134. callback = once(callback || noop);
  135. var ws = stream._writableState;
  136. var rs = stream._readableState;
  137. var readable = opts.readable || (opts.readable !== false && stream.readable);
  138. var writable = opts.writable || (opts.writable !== false && stream.writable);
  139. var cancelled = false;
  140. var onlegacyfinish = function() {
  141. if (!stream.writable) onfinish();
  142. };
  143. var onfinish = function() {
  144. writable = false;
  145. if (!readable) callback.call(stream);
  146. };
  147. var onend = function() {
  148. readable = false;
  149. if (!writable) callback.call(stream);
  150. };
  151. var onexit = function(exitCode) {
  152. callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null);
  153. };
  154. var onerror = function(err) {
  155. callback.call(stream, err);
  156. };
  157. var onclose = function() {
  158. process.nextTick(onclosenexttick);
  159. };
  160. var onclosenexttick = function() {
  161. if (cancelled) return;
  162. if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error('premature close'));
  163. if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error('premature close'));
  164. };
  165. var onrequest = function() {
  166. stream.req.on('finish', onfinish);
  167. };
  168. if (isRequest(stream)) {
  169. stream.on('complete', onfinish);
  170. stream.on('abort', onclose);
  171. if (stream.req) onrequest();
  172. else stream.on('request', onrequest);
  173. } else if (writable && !ws) { // legacy streams
  174. stream.on('end', onlegacyfinish);
  175. stream.on('close', onlegacyfinish);
  176. }
  177. if (isChildProcess(stream)) stream.on('exit', onexit);
  178. stream.on('end', onend);
  179. stream.on('finish', onfinish);
  180. if (opts.error !== false) stream.on('error', onerror);
  181. stream.on('close', onclose);
  182. return function() {
  183. cancelled = true;
  184. stream.removeListener('complete', onfinish);
  185. stream.removeListener('abort', onclose);
  186. stream.removeListener('request', onrequest);
  187. if (stream.req) stream.req.removeListener('finish', onfinish);
  188. stream.removeListener('end', onlegacyfinish);
  189. stream.removeListener('close', onlegacyfinish);
  190. stream.removeListener('finish', onfinish);
  191. stream.removeListener('exit', onexit);
  192. stream.removeListener('end', onend);
  193. stream.removeListener('error', onerror);
  194. stream.removeListener('close', onclose);
  195. };
  196. };
  197. module.exports = eos;
  198. /***/ }),
  199. /***/ 11:
  200. /***/ (function(module) {
  201. // Returns a wrapper function that returns a wrapped callback
  202. // The wrapper function should do some stuff, and return a
  203. // presumably different callback function.
  204. // This makes sure that own properties are retained, so that
  205. // decorations and such are not lost along the way.
  206. module.exports = wrappy
  207. function wrappy (fn, cb) {
  208. if (fn && cb) return wrappy(fn)(cb)
  209. if (typeof fn !== 'function')
  210. throw new TypeError('need wrapper function')
  211. Object.keys(fn).forEach(function (k) {
  212. wrapper[k] = fn[k]
  213. })
  214. return wrapper
  215. function wrapper() {
  216. var args = new Array(arguments.length)
  217. for (var i = 0; i < args.length; i++) {
  218. args[i] = arguments[i]
  219. }
  220. var ret = fn.apply(this, args)
  221. var cb = args[args.length-1]
  222. if (typeof ret === 'function' && ret !== cb) {
  223. Object.keys(cb).forEach(function (k) {
  224. ret[k] = cb[k]
  225. })
  226. }
  227. return ret
  228. }
  229. }
  230. /***/ }),
  231. /***/ 16:
  232. /***/ (function(module) {
  233. module.exports = require("tls");
  234. /***/ }),
  235. /***/ 18:
  236. /***/ (function(module) {
  237. module.exports = eval("require")("encoding");
  238. /***/ }),
  239. /***/ 19:
  240. /***/ (function(module, __unusedexports, __webpack_require__) {
  241. module.exports = authenticationPlugin;
  242. const { Deprecation } = __webpack_require__(692);
  243. const once = __webpack_require__(969);
  244. const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation));
  245. const authenticate = __webpack_require__(674);
  246. const beforeRequest = __webpack_require__(471);
  247. const requestError = __webpack_require__(349);
  248. function authenticationPlugin(octokit, options) {
  249. if (options.auth) {
  250. octokit.authenticate = () => {
  251. deprecateAuthenticate(
  252. octokit.log,
  253. new Deprecation(
  254. '[@octokit/rest] octokit.authenticate() is deprecated and has no effect when "auth" option is set on Octokit constructor'
  255. )
  256. );
  257. };
  258. return;
  259. }
  260. const state = {
  261. octokit,
  262. auth: false
  263. };
  264. octokit.authenticate = authenticate.bind(null, state);
  265. octokit.hook.before("request", beforeRequest.bind(null, state));
  266. octokit.hook.error("request", requestError.bind(null, state));
  267. }
  268. /***/ }),
  269. /***/ 20:
  270. /***/ (function(module, __unusedexports, __webpack_require__) {
  271. "use strict";
  272. const cp = __webpack_require__(129);
  273. const parse = __webpack_require__(568);
  274. const enoent = __webpack_require__(881);
  275. function spawn(command, args, options) {
  276. // Parse the arguments
  277. const parsed = parse(command, args, options);
  278. // Spawn the child process
  279. const spawned = cp.spawn(parsed.command, parsed.args, parsed.options);
  280. // Hook into child process "exit" event to emit an error if the command
  281. // does not exists, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
  282. enoent.hookChildProcess(spawned, parsed);
  283. return spawned;
  284. }
  285. function spawnSync(command, args, options) {
  286. // Parse the arguments
  287. const parsed = parse(command, args, options);
  288. // Spawn the child process
  289. const result = cp.spawnSync(parsed.command, parsed.args, parsed.options);
  290. // Analyze if the command does not exist, see: https://github.com/IndigoUnited/node-cross-spawn/issues/16
  291. result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
  292. return result;
  293. }
  294. module.exports = spawn;
  295. module.exports.spawn = spawn;
  296. module.exports.sync = spawnSync;
  297. module.exports._parse = parse;
  298. module.exports._enoent = enoent;
  299. /***/ }),
  300. /***/ 39:
  301. /***/ (function(module) {
  302. "use strict";
  303. module.exports = opts => {
  304. opts = opts || {};
  305. const env = opts.env || process.env;
  306. const platform = opts.platform || process.platform;
  307. if (platform !== 'win32') {
  308. return 'PATH';
  309. }
  310. return Object.keys(env).find(x => x.toUpperCase() === 'PATH') || 'Path';
  311. };
  312. /***/ }),
  313. /***/ 47:
  314. /***/ (function(module, __unusedexports, __webpack_require__) {
  315. module.exports = factory;
  316. const Octokit = __webpack_require__(402);
  317. const registerPlugin = __webpack_require__(855);
  318. function factory(plugins) {
  319. const Api = Octokit.bind(null, plugins || []);
  320. Api.plugin = registerPlugin.bind(null, plugins || []);
  321. return Api;
  322. }
  323. /***/ }),
  324. /***/ 49:
  325. /***/ (function(module, __unusedexports, __webpack_require__) {
  326. "use strict";
  327. const os = __webpack_require__(87);
  328. const execa = __webpack_require__(955);
  329. // Reference: https://www.gaijin.at/en/lstwinver.php
  330. const names = new Map([
  331. ['10.0', '10'],
  332. ['6.3', '8.1'],
  333. ['6.2', '8'],
  334. ['6.1', '7'],
  335. ['6.0', 'Vista'],
  336. ['5.2', 'Server 2003'],
  337. ['5.1', 'XP'],
  338. ['5.0', '2000'],
  339. ['4.9', 'ME'],
  340. ['4.1', '98'],
  341. ['4.0', '95']
  342. ]);
  343. const windowsRelease = release => {
  344. const version = /\d+\.\d/.exec(release || os.release());
  345. if (release && !version) {
  346. throw new Error('`release` argument doesn\'t match `n.n`');
  347. }
  348. const ver = (version || [])[0];
  349. // Server 2008, 2012, 2016, and 2019 versions are ambiguous with desktop versions and must be detected at runtime.
  350. // If `release` is omitted or we're on a Windows system, and the version number is an ambiguous version
  351. // then use `wmic` to get the OS caption: https://msdn.microsoft.com/en-us/library/aa394531(v=vs.85).aspx
  352. // If `wmic` is obsoloete (later versions of Windows 10), use PowerShell instead.
  353. // If the resulting caption contains the year 2008, 2012, 2016 or 2019, it is a server version, so return a server OS name.
  354. if ((!release || release === os.release()) && ['6.1', '6.2', '6.3', '10.0'].includes(ver)) {
  355. let stdout;
  356. try {
  357. stdout = execa.sync('powershell', ['(Get-CimInstance -ClassName Win32_OperatingSystem).caption']).stdout || '';
  358. } catch (_) {
  359. stdout = execa.sync('wmic', ['os', 'get', 'Caption']).stdout || '';
  360. }
  361. const year = (stdout.match(/2008|2012|2016|2019/) || [])[0];
  362. if (year) {
  363. return `Server ${year}`;
  364. }
  365. }
  366. return names.get(ver);
  367. };
  368. module.exports = windowsRelease;
  369. /***/ }),
  370. /***/ 87:
  371. /***/ (function(module) {
  372. module.exports = require("os");
  373. /***/ }),
  374. /***/ 118:
  375. /***/ (function(module, __unusedexports, __webpack_require__) {
  376. "use strict";
  377. const os = __webpack_require__(87);
  378. const nameMap = new Map([
  379. [19, 'Catalina'],
  380. [18, 'Mojave'],
  381. [17, 'High Sierra'],
  382. [16, 'Sierra'],
  383. [15, 'El Capitan'],
  384. [14, 'Yosemite'],
  385. [13, 'Mavericks'],
  386. [12, 'Mountain Lion'],
  387. [11, 'Lion'],
  388. [10, 'Snow Leopard'],
  389. [9, 'Leopard'],
  390. [8, 'Tiger'],
  391. [7, 'Panther'],
  392. [6, 'Jaguar'],
  393. [5, 'Puma']
  394. ]);
  395. const macosRelease = release => {
  396. release = Number((release || os.release()).split('.')[0]);
  397. return {
  398. name: nameMap.get(release),
  399. version: '10.' + (release - 4)
  400. };
  401. };
  402. module.exports = macosRelease;
  403. // TODO: remove this in the next major version
  404. module.exports.default = macosRelease;
  405. /***/ }),
  406. /***/ 126:
  407. /***/ (function(module) {
  408. /**
  409. * lodash (Custom Build) <https://lodash.com/>
  410. * Build: `lodash modularize exports="npm" -o ./`
  411. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  412. * Released under MIT license <https://lodash.com/license>
  413. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  414. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  415. */
  416. /** Used as the size to enable large array optimizations. */
  417. var LARGE_ARRAY_SIZE = 200;
  418. /** Used to stand-in for `undefined` hash values. */
  419. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  420. /** Used as references for various `Number` constants. */
  421. var INFINITY = 1 / 0;
  422. /** `Object#toString` result references. */
  423. var funcTag = '[object Function]',
  424. genTag = '[object GeneratorFunction]';
  425. /**
  426. * Used to match `RegExp`
  427. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  428. */
  429. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  430. /** Used to detect host constructors (Safari). */
  431. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  432. /** Detect free variable `global` from Node.js. */
  433. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  434. /** Detect free variable `self`. */
  435. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  436. /** Used as a reference to the global object. */
  437. var root = freeGlobal || freeSelf || Function('return this')();
  438. /**
  439. * A specialized version of `_.includes` for arrays without support for
  440. * specifying an index to search from.
  441. *
  442. * @private
  443. * @param {Array} [array] The array to inspect.
  444. * @param {*} target The value to search for.
  445. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  446. */
  447. function arrayIncludes(array, value) {
  448. var length = array ? array.length : 0;
  449. return !!length && baseIndexOf(array, value, 0) > -1;
  450. }
  451. /**
  452. * This function is like `arrayIncludes` except that it accepts a comparator.
  453. *
  454. * @private
  455. * @param {Array} [array] The array to inspect.
  456. * @param {*} target The value to search for.
  457. * @param {Function} comparator The comparator invoked per element.
  458. * @returns {boolean} Returns `true` if `target` is found, else `false`.
  459. */
  460. function arrayIncludesWith(array, value, comparator) {
  461. var index = -1,
  462. length = array ? array.length : 0;
  463. while (++index < length) {
  464. if (comparator(value, array[index])) {
  465. return true;
  466. }
  467. }
  468. return false;
  469. }
  470. /**
  471. * The base implementation of `_.findIndex` and `_.findLastIndex` without
  472. * support for iteratee shorthands.
  473. *
  474. * @private
  475. * @param {Array} array The array to inspect.
  476. * @param {Function} predicate The function invoked per iteration.
  477. * @param {number} fromIndex The index to search from.
  478. * @param {boolean} [fromRight] Specify iterating from right to left.
  479. * @returns {number} Returns the index of the matched value, else `-1`.
  480. */
  481. function baseFindIndex(array, predicate, fromIndex, fromRight) {
  482. var length = array.length,
  483. index = fromIndex + (fromRight ? 1 : -1);
  484. while ((fromRight ? index-- : ++index < length)) {
  485. if (predicate(array[index], index, array)) {
  486. return index;
  487. }
  488. }
  489. return -1;
  490. }
  491. /**
  492. * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
  493. *
  494. * @private
  495. * @param {Array} array The array to inspect.
  496. * @param {*} value The value to search for.
  497. * @param {number} fromIndex The index to search from.
  498. * @returns {number} Returns the index of the matched value, else `-1`.
  499. */
  500. function baseIndexOf(array, value, fromIndex) {
  501. if (value !== value) {
  502. return baseFindIndex(array, baseIsNaN, fromIndex);
  503. }
  504. var index = fromIndex - 1,
  505. length = array.length;
  506. while (++index < length) {
  507. if (array[index] === value) {
  508. return index;
  509. }
  510. }
  511. return -1;
  512. }
  513. /**
  514. * The base implementation of `_.isNaN` without support for number objects.
  515. *
  516. * @private
  517. * @param {*} value The value to check.
  518. * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
  519. */
  520. function baseIsNaN(value) {
  521. return value !== value;
  522. }
  523. /**
  524. * Checks if a cache value for `key` exists.
  525. *
  526. * @private
  527. * @param {Object} cache The cache to query.
  528. * @param {string} key The key of the entry to check.
  529. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  530. */
  531. function cacheHas(cache, key) {
  532. return cache.has(key);
  533. }
  534. /**
  535. * Gets the value at `key` of `object`.
  536. *
  537. * @private
  538. * @param {Object} [object] The object to query.
  539. * @param {string} key The key of the property to get.
  540. * @returns {*} Returns the property value.
  541. */
  542. function getValue(object, key) {
  543. return object == null ? undefined : object[key];
  544. }
  545. /**
  546. * Checks if `value` is a host object in IE < 9.
  547. *
  548. * @private
  549. * @param {*} value The value to check.
  550. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  551. */
  552. function isHostObject(value) {
  553. // Many host objects are `Object` objects that can coerce to strings
  554. // despite having improperly defined `toString` methods.
  555. var result = false;
  556. if (value != null && typeof value.toString != 'function') {
  557. try {
  558. result = !!(value + '');
  559. } catch (e) {}
  560. }
  561. return result;
  562. }
  563. /**
  564. * Converts `set` to an array of its values.
  565. *
  566. * @private
  567. * @param {Object} set The set to convert.
  568. * @returns {Array} Returns the values.
  569. */
  570. function setToArray(set) {
  571. var index = -1,
  572. result = Array(set.size);
  573. set.forEach(function(value) {
  574. result[++index] = value;
  575. });
  576. return result;
  577. }
  578. /** Used for built-in method references. */
  579. var arrayProto = Array.prototype,
  580. funcProto = Function.prototype,
  581. objectProto = Object.prototype;
  582. /** Used to detect overreaching core-js shims. */
  583. var coreJsData = root['__core-js_shared__'];
  584. /** Used to detect methods masquerading as native. */
  585. var maskSrcKey = (function() {
  586. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  587. return uid ? ('Symbol(src)_1.' + uid) : '';
  588. }());
  589. /** Used to resolve the decompiled source of functions. */
  590. var funcToString = funcProto.toString;
  591. /** Used to check objects for own properties. */
  592. var hasOwnProperty = objectProto.hasOwnProperty;
  593. /**
  594. * Used to resolve the
  595. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  596. * of values.
  597. */
  598. var objectToString = objectProto.toString;
  599. /** Used to detect if a method is native. */
  600. var reIsNative = RegExp('^' +
  601. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  602. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  603. );
  604. /** Built-in value references. */
  605. var splice = arrayProto.splice;
  606. /* Built-in method references that are verified to be native. */
  607. var Map = getNative(root, 'Map'),
  608. Set = getNative(root, 'Set'),
  609. nativeCreate = getNative(Object, 'create');
  610. /**
  611. * Creates a hash object.
  612. *
  613. * @private
  614. * @constructor
  615. * @param {Array} [entries] The key-value pairs to cache.
  616. */
  617. function Hash(entries) {
  618. var index = -1,
  619. length = entries ? entries.length : 0;
  620. this.clear();
  621. while (++index < length) {
  622. var entry = entries[index];
  623. this.set(entry[0], entry[1]);
  624. }
  625. }
  626. /**
  627. * Removes all key-value entries from the hash.
  628. *
  629. * @private
  630. * @name clear
  631. * @memberOf Hash
  632. */
  633. function hashClear() {
  634. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  635. }
  636. /**
  637. * Removes `key` and its value from the hash.
  638. *
  639. * @private
  640. * @name delete
  641. * @memberOf Hash
  642. * @param {Object} hash The hash to modify.
  643. * @param {string} key The key of the value to remove.
  644. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  645. */
  646. function hashDelete(key) {
  647. return this.has(key) && delete this.__data__[key];
  648. }
  649. /**
  650. * Gets the hash value for `key`.
  651. *
  652. * @private
  653. * @name get
  654. * @memberOf Hash
  655. * @param {string} key The key of the value to get.
  656. * @returns {*} Returns the entry value.
  657. */
  658. function hashGet(key) {
  659. var data = this.__data__;
  660. if (nativeCreate) {
  661. var result = data[key];
  662. return result === HASH_UNDEFINED ? undefined : result;
  663. }
  664. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  665. }
  666. /**
  667. * Checks if a hash value for `key` exists.
  668. *
  669. * @private
  670. * @name has
  671. * @memberOf Hash
  672. * @param {string} key The key of the entry to check.
  673. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  674. */
  675. function hashHas(key) {
  676. var data = this.__data__;
  677. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  678. }
  679. /**
  680. * Sets the hash `key` to `value`.
  681. *
  682. * @private
  683. * @name set
  684. * @memberOf Hash
  685. * @param {string} key The key of the value to set.
  686. * @param {*} value The value to set.
  687. * @returns {Object} Returns the hash instance.
  688. */
  689. function hashSet(key, value) {
  690. var data = this.__data__;
  691. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  692. return this;
  693. }
  694. // Add methods to `Hash`.
  695. Hash.prototype.clear = hashClear;
  696. Hash.prototype['delete'] = hashDelete;
  697. Hash.prototype.get = hashGet;
  698. Hash.prototype.has = hashHas;
  699. Hash.prototype.set = hashSet;
  700. /**
  701. * Creates an list cache object.
  702. *
  703. * @private
  704. * @constructor
  705. * @param {Array} [entries] The key-value pairs to cache.
  706. */
  707. function ListCache(entries) {
  708. var index = -1,
  709. length = entries ? entries.length : 0;
  710. this.clear();
  711. while (++index < length) {
  712. var entry = entries[index];
  713. this.set(entry[0], entry[1]);
  714. }
  715. }
  716. /**
  717. * Removes all key-value entries from the list cache.
  718. *
  719. * @private
  720. * @name clear
  721. * @memberOf ListCache
  722. */
  723. function listCacheClear() {
  724. this.__data__ = [];
  725. }
  726. /**
  727. * Removes `key` and its value from the list cache.
  728. *
  729. * @private
  730. * @name delete
  731. * @memberOf ListCache
  732. * @param {string} key The key of the value to remove.
  733. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  734. */
  735. function listCacheDelete(key) {
  736. var data = this.__data__,
  737. index = assocIndexOf(data, key);
  738. if (index < 0) {
  739. return false;
  740. }
  741. var lastIndex = data.length - 1;
  742. if (index == lastIndex) {
  743. data.pop();
  744. } else {
  745. splice.call(data, index, 1);
  746. }
  747. return true;
  748. }
  749. /**
  750. * Gets the list cache value for `key`.
  751. *
  752. * @private
  753. * @name get
  754. * @memberOf ListCache
  755. * @param {string} key The key of the value to get.
  756. * @returns {*} Returns the entry value.
  757. */
  758. function listCacheGet(key) {
  759. var data = this.__data__,
  760. index = assocIndexOf(data, key);
  761. return index < 0 ? undefined : data[index][1];
  762. }
  763. /**
  764. * Checks if a list cache value for `key` exists.
  765. *
  766. * @private
  767. * @name has
  768. * @memberOf ListCache
  769. * @param {string} key The key of the entry to check.
  770. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  771. */
  772. function listCacheHas(key) {
  773. return assocIndexOf(this.__data__, key) > -1;
  774. }
  775. /**
  776. * Sets the list cache `key` to `value`.
  777. *
  778. * @private
  779. * @name set
  780. * @memberOf ListCache
  781. * @param {string} key The key of the value to set.
  782. * @param {*} value The value to set.
  783. * @returns {Object} Returns the list cache instance.
  784. */
  785. function listCacheSet(key, value) {
  786. var data = this.__data__,
  787. index = assocIndexOf(data, key);
  788. if (index < 0) {
  789. data.push([key, value]);
  790. } else {
  791. data[index][1] = value;
  792. }
  793. return this;
  794. }
  795. // Add methods to `ListCache`.
  796. ListCache.prototype.clear = listCacheClear;
  797. ListCache.prototype['delete'] = listCacheDelete;
  798. ListCache.prototype.get = listCacheGet;
  799. ListCache.prototype.has = listCacheHas;
  800. ListCache.prototype.set = listCacheSet;
  801. /**
  802. * Creates a map cache object to store key-value pairs.
  803. *
  804. * @private
  805. * @constructor
  806. * @param {Array} [entries] The key-value pairs to cache.
  807. */
  808. function MapCache(entries) {
  809. var index = -1,
  810. length = entries ? entries.length : 0;
  811. this.clear();
  812. while (++index < length) {
  813. var entry = entries[index];
  814. this.set(entry[0], entry[1]);
  815. }
  816. }
  817. /**
  818. * Removes all key-value entries from the map.
  819. *
  820. * @private
  821. * @name clear
  822. * @memberOf MapCache
  823. */
  824. function mapCacheClear() {
  825. this.__data__ = {
  826. 'hash': new Hash,
  827. 'map': new (Map || ListCache),
  828. 'string': new Hash
  829. };
  830. }
  831. /**
  832. * Removes `key` and its value from the map.
  833. *
  834. * @private
  835. * @name delete
  836. * @memberOf MapCache
  837. * @param {string} key The key of the value to remove.
  838. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  839. */
  840. function mapCacheDelete(key) {
  841. return getMapData(this, key)['delete'](key);
  842. }
  843. /**
  844. * Gets the map value for `key`.
  845. *
  846. * @private
  847. * @name get
  848. * @memberOf MapCache
  849. * @param {string} key The key of the value to get.
  850. * @returns {*} Returns the entry value.
  851. */
  852. function mapCacheGet(key) {
  853. return getMapData(this, key).get(key);
  854. }
  855. /**
  856. * Checks if a map value for `key` exists.
  857. *
  858. * @private
  859. * @name has
  860. * @memberOf MapCache
  861. * @param {string} key The key of the entry to check.
  862. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  863. */
  864. function mapCacheHas(key) {
  865. return getMapData(this, key).has(key);
  866. }
  867. /**
  868. * Sets the map `key` to `value`.
  869. *
  870. * @private
  871. * @name set
  872. * @memberOf MapCache
  873. * @param {string} key The key of the value to set.
  874. * @param {*} value The value to set.
  875. * @returns {Object} Returns the map cache instance.
  876. */
  877. function mapCacheSet(key, value) {
  878. getMapData(this, key).set(key, value);
  879. return this;
  880. }
  881. // Add methods to `MapCache`.
  882. MapCache.prototype.clear = mapCacheClear;
  883. MapCache.prototype['delete'] = mapCacheDelete;
  884. MapCache.prototype.get = mapCacheGet;
  885. MapCache.prototype.has = mapCacheHas;
  886. MapCache.prototype.set = mapCacheSet;
  887. /**
  888. *
  889. * Creates an array cache object to store unique values.
  890. *
  891. * @private
  892. * @constructor
  893. * @param {Array} [values] The values to cache.
  894. */
  895. function SetCache(values) {
  896. var index = -1,
  897. length = values ? values.length : 0;
  898. this.__data__ = new MapCache;
  899. while (++index < length) {
  900. this.add(values[index]);
  901. }
  902. }
  903. /**
  904. * Adds `value` to the array cache.
  905. *
  906. * @private
  907. * @name add
  908. * @memberOf SetCache
  909. * @alias push
  910. * @param {*} value The value to cache.
  911. * @returns {Object} Returns the cache instance.
  912. */
  913. function setCacheAdd(value) {
  914. this.__data__.set(value, HASH_UNDEFINED);
  915. return this;
  916. }
  917. /**
  918. * Checks if `value` is in the array cache.
  919. *
  920. * @private
  921. * @name has
  922. * @memberOf SetCache
  923. * @param {*} value The value to search for.
  924. * @returns {number} Returns `true` if `value` is found, else `false`.
  925. */
  926. function setCacheHas(value) {
  927. return this.__data__.has(value);
  928. }
  929. // Add methods to `SetCache`.
  930. SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
  931. SetCache.prototype.has = setCacheHas;
  932. /**
  933. * Gets the index at which the `key` is found in `array` of key-value pairs.
  934. *
  935. * @private
  936. * @param {Array} array The array to inspect.
  937. * @param {*} key The key to search for.
  938. * @returns {number} Returns the index of the matched value, else `-1`.
  939. */
  940. function assocIndexOf(array, key) {
  941. var length = array.length;
  942. while (length--) {
  943. if (eq(array[length][0], key)) {
  944. return length;
  945. }
  946. }
  947. return -1;
  948. }
  949. /**
  950. * The base implementation of `_.isNative` without bad shim checks.
  951. *
  952. * @private
  953. * @param {*} value The value to check.
  954. * @returns {boolean} Returns `true` if `value` is a native function,
  955. * else `false`.
  956. */
  957. function baseIsNative(value) {
  958. if (!isObject(value) || isMasked(value)) {
  959. return false;
  960. }
  961. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  962. return pattern.test(toSource(value));
  963. }
  964. /**
  965. * The base implementation of `_.uniqBy` without support for iteratee shorthands.
  966. *
  967. * @private
  968. * @param {Array} array The array to inspect.
  969. * @param {Function} [iteratee] The iteratee invoked per element.
  970. * @param {Function} [comparator] The comparator invoked per element.
  971. * @returns {Array} Returns the new duplicate free array.
  972. */
  973. function baseUniq(array, iteratee, comparator) {
  974. var index = -1,
  975. includes = arrayIncludes,
  976. length = array.length,
  977. isCommon = true,
  978. result = [],
  979. seen = result;
  980. if (comparator) {
  981. isCommon = false;
  982. includes = arrayIncludesWith;
  983. }
  984. else if (length >= LARGE_ARRAY_SIZE) {
  985. var set = iteratee ? null : createSet(array);
  986. if (set) {
  987. return setToArray(set);
  988. }
  989. isCommon = false;
  990. includes = cacheHas;
  991. seen = new SetCache;
  992. }
  993. else {
  994. seen = iteratee ? [] : result;
  995. }
  996. outer:
  997. while (++index < length) {
  998. var value = array[index],
  999. computed = iteratee ? iteratee(value) : value;
  1000. value = (comparator || value !== 0) ? value : 0;
  1001. if (isCommon && computed === computed) {
  1002. var seenIndex = seen.length;
  1003. while (seenIndex--) {
  1004. if (seen[seenIndex] === computed) {
  1005. continue outer;
  1006. }
  1007. }
  1008. if (iteratee) {
  1009. seen.push(computed);
  1010. }
  1011. result.push(value);
  1012. }
  1013. else if (!includes(seen, computed, comparator)) {
  1014. if (seen !== result) {
  1015. seen.push(computed);
  1016. }
  1017. result.push(value);
  1018. }
  1019. }
  1020. return result;
  1021. }
  1022. /**
  1023. * Creates a set object of `values`.
  1024. *
  1025. * @private
  1026. * @param {Array} values The values to add to the set.
  1027. * @returns {Object} Returns the new set.
  1028. */
  1029. var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
  1030. return new Set(values);
  1031. };
  1032. /**
  1033. * Gets the data for `map`.
  1034. *
  1035. * @private
  1036. * @param {Object} map The map to query.
  1037. * @param {string} key The reference key.
  1038. * @returns {*} Returns the map data.
  1039. */
  1040. function getMapData(map, key) {
  1041. var data = map.__data__;
  1042. return isKeyable(key)
  1043. ? data[typeof key == 'string' ? 'string' : 'hash']
  1044. : data.map;
  1045. }
  1046. /**
  1047. * Gets the native function at `key` of `object`.
  1048. *
  1049. * @private
  1050. * @param {Object} object The object to query.
  1051. * @param {string} key The key of the method to get.
  1052. * @returns {*} Returns the function if it's native, else `undefined`.
  1053. */
  1054. function getNative(object, key) {
  1055. var value = getValue(object, key);
  1056. return baseIsNative(value) ? value : undefined;
  1057. }
  1058. /**
  1059. * Checks if `value` is suitable for use as unique object key.
  1060. *
  1061. * @private
  1062. * @param {*} value The value to check.
  1063. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  1064. */
  1065. function isKeyable(value) {
  1066. var type = typeof value;
  1067. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  1068. ? (value !== '__proto__')
  1069. : (value === null);
  1070. }
  1071. /**
  1072. * Checks if `func` has its source masked.
  1073. *
  1074. * @private
  1075. * @param {Function} func The function to check.
  1076. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  1077. */
  1078. function isMasked(func) {
  1079. return !!maskSrcKey && (maskSrcKey in func);
  1080. }
  1081. /**
  1082. * Converts `func` to its source code.
  1083. *
  1084. * @private
  1085. * @param {Function} func The function to process.
  1086. * @returns {string} Returns the source code.
  1087. */
  1088. function toSource(func) {
  1089. if (func != null) {
  1090. try {
  1091. return funcToString.call(func);
  1092. } catch (e) {}
  1093. try {
  1094. return (func + '');
  1095. } catch (e) {}
  1096. }
  1097. return '';
  1098. }
  1099. /**
  1100. * Creates a duplicate-free version of an array, using
  1101. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  1102. * for equality comparisons, in which only the first occurrence of each
  1103. * element is kept.
  1104. *
  1105. * @static
  1106. * @memberOf _
  1107. * @since 0.1.0
  1108. * @category Array
  1109. * @param {Array} array The array to inspect.
  1110. * @returns {Array} Returns the new duplicate free array.
  1111. * @example
  1112. *
  1113. * _.uniq([2, 1, 2]);
  1114. * // => [2, 1]
  1115. */
  1116. function uniq(array) {
  1117. return (array && array.length)
  1118. ? baseUniq(array)
  1119. : [];
  1120. }
  1121. /**
  1122. * Performs a
  1123. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  1124. * comparison between two values to determine if they are equivalent.
  1125. *
  1126. * @static
  1127. * @memberOf _
  1128. * @since 4.0.0
  1129. * @category Lang
  1130. * @param {*} value The value to compare.
  1131. * @param {*} other The other value to compare.
  1132. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  1133. * @example
  1134. *
  1135. * var object = { 'a': 1 };
  1136. * var other = { 'a': 1 };
  1137. *
  1138. * _.eq(object, object);
  1139. * // => true
  1140. *
  1141. * _.eq(object, other);
  1142. * // => false
  1143. *
  1144. * _.eq('a', 'a');
  1145. * // => true
  1146. *
  1147. * _.eq('a', Object('a'));
  1148. * // => false
  1149. *
  1150. * _.eq(NaN, NaN);
  1151. * // => true
  1152. */
  1153. function eq(value, other) {
  1154. return value === other || (value !== value && other !== other);
  1155. }
  1156. /**
  1157. * Checks if `value` is classified as a `Function` object.
  1158. *
  1159. * @static
  1160. * @memberOf _
  1161. * @since 0.1.0
  1162. * @category Lang
  1163. * @param {*} value The value to check.
  1164. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  1165. * @example
  1166. *
  1167. * _.isFunction(_);
  1168. * // => true
  1169. *
  1170. * _.isFunction(/abc/);
  1171. * // => false
  1172. */
  1173. function isFunction(value) {
  1174. // The use of `Object#toString` avoids issues with the `typeof` operator
  1175. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  1176. var tag = isObject(value) ? objectToString.call(value) : '';
  1177. return tag == funcTag || tag == genTag;
  1178. }
  1179. /**
  1180. * Checks if `value` is the
  1181. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  1182. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  1183. *
  1184. * @static
  1185. * @memberOf _
  1186. * @since 0.1.0
  1187. * @category Lang
  1188. * @param {*} value The value to check.
  1189. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  1190. * @example
  1191. *
  1192. * _.isObject({});
  1193. * // => true
  1194. *
  1195. * _.isObject([1, 2, 3]);
  1196. * // => true
  1197. *
  1198. * _.isObject(_.noop);
  1199. * // => true
  1200. *
  1201. * _.isObject(null);
  1202. * // => false
  1203. */
  1204. function isObject(value) {
  1205. var type = typeof value;
  1206. return !!value && (type == 'object' || type == 'function');
  1207. }
  1208. /**
  1209. * This method returns `undefined`.
  1210. *
  1211. * @static
  1212. * @memberOf _
  1213. * @since 2.3.0
  1214. * @category Util
  1215. * @example
  1216. *
  1217. * _.times(2, _.noop);
  1218. * // => [undefined, undefined]
  1219. */
  1220. function noop() {
  1221. // No operation performed.
  1222. }
  1223. module.exports = uniq;
  1224. /***/ }),
  1225. /***/ 129:
  1226. /***/ (function(module) {
  1227. module.exports = require("child_process");
  1228. /***/ }),
  1229. /***/ 141:
  1230. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  1231. "use strict";
  1232. var net = __webpack_require__(631);
  1233. var tls = __webpack_require__(16);
  1234. var http = __webpack_require__(605);
  1235. var https = __webpack_require__(211);
  1236. var events = __webpack_require__(614);
  1237. var assert = __webpack_require__(357);
  1238. var util = __webpack_require__(669);
  1239. exports.httpOverHttp = httpOverHttp;
  1240. exports.httpsOverHttp = httpsOverHttp;
  1241. exports.httpOverHttps = httpOverHttps;
  1242. exports.httpsOverHttps = httpsOverHttps;
  1243. function httpOverHttp(options) {
  1244. var agent = new TunnelingAgent(options);
  1245. agent.request = http.request;
  1246. return agent;
  1247. }
  1248. function httpsOverHttp(options) {
  1249. var agent = new TunnelingAgent(options);
  1250. agent.request = http.request;
  1251. agent.createSocket = createSecureSocket;
  1252. agent.defaultPort = 443;
  1253. return agent;
  1254. }
  1255. function httpOverHttps(options) {
  1256. var agent = new TunnelingAgent(options);
  1257. agent.request = https.request;
  1258. return agent;
  1259. }
  1260. function httpsOverHttps(options) {
  1261. var agent = new TunnelingAgent(options);
  1262. agent.request = https.request;
  1263. agent.createSocket = createSecureSocket;
  1264. agent.defaultPort = 443;
  1265. return agent;
  1266. }
  1267. function TunnelingAgent(options) {
  1268. var self = this;
  1269. self.options = options || {};
  1270. self.proxyOptions = self.options.proxy || {};
  1271. self.maxSockets = self.options.maxSockets || http.Agent.defaultMaxSockets;
  1272. self.requests = [];
  1273. self.sockets = [];
  1274. self.on('free', function onFree(socket, host, port, localAddress) {
  1275. var options = toOptions(host, port, localAddress);
  1276. for (var i = 0, len = self.requests.length; i < len; ++i) {
  1277. var pending = self.requests[i];
  1278. if (pending.host === options.host && pending.port === options.port) {
  1279. // Detect the request to connect same origin server,
  1280. // reuse the connection.
  1281. self.requests.splice(i, 1);
  1282. pending.request.onSocket(socket);
  1283. return;
  1284. }
  1285. }
  1286. socket.destroy();
  1287. self.removeSocket(socket);
  1288. });
  1289. }
  1290. util.inherits(TunnelingAgent, events.EventEmitter);
  1291. TunnelingAgent.prototype.addRequest = function addRequest(req, host, port, localAddress) {
  1292. var self = this;
  1293. var options = mergeOptions({request: req}, self.options, toOptions(host, port, localAddress));
  1294. if (self.sockets.length >= this.maxSockets) {
  1295. // We are over limit so we'll add it to the queue.
  1296. self.requests.push(options);
  1297. return;
  1298. }
  1299. // If we are under maxSockets create a new one.
  1300. self.createSocket(options, function(socket) {
  1301. socket.on('free', onFree);
  1302. socket.on('close', onCloseOrRemove);
  1303. socket.on('agentRemove', onCloseOrRemove);
  1304. req.onSocket(socket);
  1305. function onFree() {
  1306. self.emit('free', socket, options);
  1307. }
  1308. function onCloseOrRemove(err) {
  1309. self.removeSocket(socket);
  1310. socket.removeListener('free', onFree);
  1311. socket.removeListener('close', onCloseOrRemove);
  1312. socket.removeListener('agentRemove', onCloseOrRemove);
  1313. }
  1314. });
  1315. };
  1316. TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
  1317. var self = this;
  1318. var placeholder = {};
  1319. self.sockets.push(placeholder);
  1320. var connectOptions = mergeOptions({}, self.proxyOptions, {
  1321. method: 'CONNECT',
  1322. path: options.host + ':' + options.port,
  1323. agent: false,
  1324. headers: {
  1325. host: options.host + ':' + options.port
  1326. }
  1327. });
  1328. if (options.localAddress) {
  1329. connectOptions.localAddress = options.localAddress;
  1330. }
  1331. if (connectOptions.proxyAuth) {
  1332. connectOptions.headers = connectOptions.headers || {};
  1333. connectOptions.headers['Proxy-Authorization'] = 'Basic ' +
  1334. new Buffer(connectOptions.proxyAuth).toString('base64');
  1335. }
  1336. debug('making CONNECT request');
  1337. var connectReq = self.request(connectOptions);
  1338. connectReq.useChunkedEncodingByDefault = false; // for v0.6
  1339. connectReq.once('response', onResponse); // for v0.6
  1340. connectReq.once('upgrade', onUpgrade); // for v0.6
  1341. connectReq.once('connect', onConnect); // for v0.7 or later
  1342. connectReq.once('error', onError);
  1343. connectReq.end();
  1344. function onResponse(res) {
  1345. // Very hacky. This is necessary to avoid http-parser leaks.
  1346. res.upgrade = true;
  1347. }
  1348. function onUpgrade(res, socket, head) {
  1349. // Hacky.
  1350. process.nextTick(function() {
  1351. onConnect(res, socket, head);
  1352. });
  1353. }
  1354. function onConnect(res, socket, head) {
  1355. connectReq.removeAllListeners();
  1356. socket.removeAllListeners();
  1357. if (res.statusCode !== 200) {
  1358. debug('tunneling socket could not be established, statusCode=%d',
  1359. res.statusCode);
  1360. socket.destroy();
  1361. var error = new Error('tunneling socket could not be established, ' +
  1362. 'statusCode=' + res.statusCode);
  1363. error.code = 'ECONNRESET';
  1364. options.request.emit('error', error);
  1365. self.removeSocket(placeholder);
  1366. return;
  1367. }
  1368. if (head.length > 0) {
  1369. debug('got illegal response body from proxy');
  1370. socket.destroy();
  1371. var error = new Error('got illegal response body from proxy');
  1372. error.code = 'ECONNRESET';
  1373. options.request.emit('error', error);
  1374. self.removeSocket(placeholder);
  1375. return;
  1376. }
  1377. debug('tunneling connection has established');
  1378. self.sockets[self.sockets.indexOf(placeholder)] = socket;
  1379. return cb(socket);
  1380. }
  1381. function onError(cause) {
  1382. connectReq.removeAllListeners();
  1383. debug('tunneling socket could not be established, cause=%s\n',
  1384. cause.message, cause.stack);
  1385. var error = new Error('tunneling socket could not be established, ' +
  1386. 'cause=' + cause.message);
  1387. error.code = 'ECONNRESET';
  1388. options.request.emit('error', error);
  1389. self.removeSocket(placeholder);
  1390. }
  1391. };
  1392. TunnelingAgent.prototype.removeSocket = function removeSocket(socket) {
  1393. var pos = this.sockets.indexOf(socket)
  1394. if (pos === -1) {
  1395. return;
  1396. }
  1397. this.sockets.splice(pos, 1);
  1398. var pending = this.requests.shift();
  1399. if (pending) {
  1400. // If we have pending requests and a socket gets closed a new one
  1401. // needs to be created to take over in the pool for the one that closed.
  1402. this.createSocket(pending, function(socket) {
  1403. pending.request.onSocket(socket);
  1404. });
  1405. }
  1406. };
  1407. function createSecureSocket(options, cb) {
  1408. var self = this;
  1409. TunnelingAgent.prototype.createSocket.call(self, options, function(socket) {
  1410. var hostHeader = options.request.getHeader('host');
  1411. var tlsOptions = mergeOptions({}, self.options, {
  1412. socket: socket,
  1413. servername: hostHeader ? hostHeader.replace(/:.*$/, '') : options.host
  1414. });
  1415. // 0 is dummy port for v0.6
  1416. var secureSocket = tls.connect(0, tlsOptions);
  1417. self.sockets[self.sockets.indexOf(socket)] = secureSocket;
  1418. cb(secureSocket);
  1419. });
  1420. }
  1421. function toOptions(host, port, localAddress) {
  1422. if (typeof host === 'string') { // since v0.10
  1423. return {
  1424. host: host,
  1425. port: port,
  1426. localAddress: localAddress
  1427. };
  1428. }
  1429. return host; // for v0.11 or later
  1430. }
  1431. function mergeOptions(target) {
  1432. for (var i = 1, len = arguments.length; i < len; ++i) {
  1433. var overrides = arguments[i];
  1434. if (typeof overrides === 'object') {
  1435. var keys = Object.keys(overrides);
  1436. for (var j = 0, keyLen = keys.length; j < keyLen; ++j) {
  1437. var k = keys[j];
  1438. if (overrides[k] !== undefined) {
  1439. target[k] = overrides[k];
  1440. }
  1441. }
  1442. }
  1443. }
  1444. return target;
  1445. }
  1446. var debug;
  1447. if (process.env.NODE_DEBUG && /\btunnel\b/.test(process.env.NODE_DEBUG)) {
  1448. debug = function() {
  1449. var args = Array.prototype.slice.call(arguments);
  1450. if (typeof args[0] === 'string') {
  1451. args[0] = 'TUNNEL: ' + args[0];
  1452. } else {
  1453. args.unshift('TUNNEL:');
  1454. }
  1455. console.error.apply(console, args);
  1456. }
  1457. } else {
  1458. debug = function() {};
  1459. }
  1460. exports.debug = debug; // for test
  1461. /***/ }),
  1462. /***/ 143:
  1463. /***/ (function(module, __unusedexports, __webpack_require__) {
  1464. module.exports = withAuthorizationPrefix;
  1465. const atob = __webpack_require__(368);
  1466. const REGEX_IS_BASIC_AUTH = /^[\w-]+:/;
  1467. function withAuthorizationPrefix(authorization) {
  1468. if (/^(basic|bearer|token) /i.test(authorization)) {
  1469. return authorization;
  1470. }
  1471. try {
  1472. if (REGEX_IS_BASIC_AUTH.test(atob(authorization))) {
  1473. return `basic ${authorization}`;
  1474. }
  1475. } catch (error) {}
  1476. if (authorization.split(/\./).length === 3) {
  1477. return `bearer ${authorization}`;
  1478. }
  1479. return `token ${authorization}`;
  1480. }
  1481. /***/ }),
  1482. /***/ 145:
  1483. /***/ (function(module, __unusedexports, __webpack_require__) {
  1484. "use strict";
  1485. const pump = __webpack_require__(453);
  1486. const bufferStream = __webpack_require__(966);
  1487. class MaxBufferError extends Error {
  1488. constructor() {
  1489. super('maxBuffer exceeded');
  1490. this.name = 'MaxBufferError';
  1491. }
  1492. }
  1493. function getStream(inputStream, options) {
  1494. if (!inputStream) {
  1495. return Promise.reject(new Error('Expected a stream'));
  1496. }
  1497. options = Object.assign({maxBuffer: Infinity}, options);
  1498. const {maxBuffer} = options;
  1499. let stream;
  1500. return new Promise((resolve, reject) => {
  1501. const rejectPromise = error => {
  1502. if (error) { // A null check
  1503. error.bufferedData = stream.getBufferedValue();
  1504. }
  1505. reject(error);
  1506. };
  1507. stream = pump(inputStream, bufferStream(options), error => {
  1508. if (error) {
  1509. rejectPromise(error);
  1510. return;
  1511. }
  1512. resolve();
  1513. });
  1514. stream.on('data', () => {
  1515. if (stream.getBufferedLength() > maxBuffer) {
  1516. rejectPromise(new MaxBufferError());
  1517. }
  1518. });
  1519. }).then(() => stream.getBufferedValue());
  1520. }
  1521. module.exports = getStream;
  1522. module.exports.buffer = (stream, options) => getStream(stream, Object.assign({}, options, {encoding: 'buffer'}));
  1523. module.exports.array = (stream, options) => getStream(stream, Object.assign({}, options, {array: true}));
  1524. module.exports.MaxBufferError = MaxBufferError;
  1525. /***/ }),
  1526. /***/ 148:
  1527. /***/ (function(module, __unusedexports, __webpack_require__) {
  1528. module.exports = paginatePlugin;
  1529. const { paginateRest } = __webpack_require__(299);
  1530. function paginatePlugin(octokit) {
  1531. Object.assign(octokit, paginateRest(octokit));
  1532. }
  1533. /***/ }),
  1534. /***/ 168:
  1535. /***/ (function(module) {
  1536. "use strict";
  1537. const alias = ['stdin', 'stdout', 'stderr'];
  1538. const hasAlias = opts => alias.some(x => Boolean(opts[x]));
  1539. module.exports = opts => {
  1540. if (!opts) {
  1541. return null;
  1542. }
  1543. if (opts.stdio && hasAlias(opts)) {
  1544. throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${alias.map(x => `\`${x}\``).join(', ')}`);
  1545. }
  1546. if (typeof opts.stdio === 'string') {
  1547. return opts.stdio;
  1548. }
  1549. const stdio = opts.stdio || [];
  1550. if (!Array.isArray(stdio)) {
  1551. throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof stdio}\``);
  1552. }
  1553. const result = [];
  1554. const len = Math.max(stdio.length, alias.length);
  1555. for (let i = 0; i < len; i++) {
  1556. let value = null;
  1557. if (stdio[i] !== undefined) {
  1558. value = stdio[i];
  1559. } else if (opts[alias[i]] !== undefined) {
  1560. value = opts[alias[i]];
  1561. }
  1562. result[i] = value;
  1563. }
  1564. return result;
  1565. };
  1566. /***/ }),
  1567. /***/ 190:
  1568. /***/ (function(module, __unusedexports, __webpack_require__) {
  1569. module.exports = authenticationPlugin;
  1570. const { createTokenAuth } = __webpack_require__(813);
  1571. const { Deprecation } = __webpack_require__(692);
  1572. const once = __webpack_require__(969);
  1573. const beforeRequest = __webpack_require__(863);
  1574. const requestError = __webpack_require__(293);
  1575. const validate = __webpack_require__(954);
  1576. const withAuthorizationPrefix = __webpack_require__(143);
  1577. const deprecateAuthBasic = once((log, deprecation) => log.warn(deprecation));
  1578. const deprecateAuthObject = once((log, deprecation) => log.warn(deprecation));
  1579. function authenticationPlugin(octokit, options) {
  1580. // If `options.authStrategy` is set then use it and pass in `options.auth`
  1581. if (options.authStrategy) {
  1582. const auth = options.authStrategy(options.auth);
  1583. octokit.hook.wrap("request", auth.hook);
  1584. octokit.auth = auth;
  1585. return;
  1586. }
  1587. // If neither `options.authStrategy` nor `options.auth` are set, the `octokit` instance
  1588. // is unauthenticated. The `octokit.auth()` method is a no-op and no request hook is registred.
  1589. if (!options.auth) {
  1590. octokit.auth = () =>
  1591. Promise.resolve({
  1592. type: "unauthenticated"
  1593. });
  1594. return;
  1595. }
  1596. const isBasicAuthString =
  1597. typeof options.auth === "string" &&
  1598. /^basic/.test(withAuthorizationPrefix(options.auth));
  1599. // If only `options.auth` is set to a string, use the default token authentication strategy.
  1600. if (typeof options.auth === "string" && !isBasicAuthString) {
  1601. const auth = createTokenAuth(options.auth);
  1602. octokit.hook.wrap("request", auth.hook);
  1603. octokit.auth = auth;
  1604. return;
  1605. }
  1606. // Otherwise log a deprecation message
  1607. const [deprecationMethod, deprecationMessapge] = isBasicAuthString
  1608. ? [
  1609. deprecateAuthBasic,
  1610. 'Setting the "new Octokit({ auth })" option to a Basic Auth string is deprecated. Use https://github.com/octokit/auth-basic.js instead. See (https://octokit.github.io/rest.js/#authentication)'
  1611. ]
  1612. : [
  1613. deprecateAuthObject,
  1614. 'Setting the "new Octokit({ auth })" option to an object without also setting the "authStrategy" option is deprecated and will be removed in v17. See (https://octokit.github.io/rest.js/#authentication)'
  1615. ];
  1616. deprecationMethod(
  1617. octokit.log,
  1618. new Deprecation("[@octokit/rest] " + deprecationMessapge)
  1619. );
  1620. octokit.auth = () =>
  1621. Promise.resolve({
  1622. type: "deprecated",
  1623. message: deprecationMessapge
  1624. });
  1625. validate(options.auth);
  1626. const state = {
  1627. octokit,
  1628. auth: options.auth
  1629. };
  1630. octokit.hook.before("request", beforeRequest.bind(null, state));
  1631. octokit.hook.error("request", requestError.bind(null, state));
  1632. }
  1633. /***/ }),
  1634. /***/ 197:
  1635. /***/ (function(module, __unusedexports, __webpack_require__) {
  1636. module.exports = isexe
  1637. isexe.sync = sync
  1638. var fs = __webpack_require__(747)
  1639. function isexe (path, options, cb) {
  1640. fs.stat(path, function (er, stat) {
  1641. cb(er, er ? false : checkStat(stat, options))
  1642. })
  1643. }
  1644. function sync (path, options) {
  1645. return checkStat(fs.statSync(path), options)
  1646. }
  1647. function checkStat (stat, options) {
  1648. return stat.isFile() && checkMode(stat, options)
  1649. }
  1650. function checkMode (stat, options) {
  1651. var mod = stat.mode
  1652. var uid = stat.uid
  1653. var gid = stat.gid
  1654. var myUid = options.uid !== undefined ?
  1655. options.uid : process.getuid && process.getuid()
  1656. var myGid = options.gid !== undefined ?
  1657. options.gid : process.getgid && process.getgid()
  1658. var u = parseInt('100', 8)
  1659. var g = parseInt('010', 8)
  1660. var o = parseInt('001', 8)
  1661. var ug = u | g
  1662. var ret = (mod & o) ||
  1663. (mod & g) && gid === myGid ||
  1664. (mod & u) && uid === myUid ||
  1665. (mod & ug) && myUid === 0
  1666. return ret
  1667. }
  1668. /***/ }),
  1669. /***/ 198:
  1670. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  1671. "use strict";
  1672. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  1673. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  1674. return new (P || (P = Promise))(function (resolve, reject) {
  1675. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  1676. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  1677. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  1678. step((generator = generator.apply(thisArg, _arguments || [])).next());
  1679. });
  1680. };
  1681. var __importStar = (this && this.__importStar) || function (mod) {
  1682. if (mod && mod.__esModule) return mod;
  1683. var result = {};
  1684. if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
  1685. result["default"] = mod;
  1686. return result;
  1687. };
  1688. Object.defineProperty(exports, "__esModule", { value: true });
  1689. const core = __importStar(__webpack_require__(470));
  1690. const github = __importStar(__webpack_require__(469));
  1691. class ChangedFiles {
  1692. constructor() {
  1693. this.updated = [];
  1694. this.created = [];
  1695. this.deleted = [];
  1696. }
  1697. count() {
  1698. return this.updated.length + this.created.length + this.deleted.length;
  1699. }
  1700. }
  1701. function getChangedFiles(client, prNumber, fileCount) {
  1702. return __awaiter(this, void 0, void 0, function* () {
  1703. const changedFiles = new ChangedFiles();
  1704. const fetchPerPage = 100;
  1705. for (let pageIndex = 0; pageIndex * fetchPerPage < fileCount; pageIndex++) {
  1706. const listFilesResponse = yield client.pulls.listFiles({
  1707. owner: github.context.repo.owner,
  1708. repo: github.context.repo.repo,
  1709. pull_number: prNumber,
  1710. page: pageIndex,
  1711. per_page: fetchPerPage,
  1712. });
  1713. const pattern = core.getInput("pattern");
  1714. const re = new RegExp(pattern.length ? pattern : ".*");
  1715. listFilesResponse.data
  1716. .filter(f => re.test(f.filename))
  1717. .forEach(f => {
  1718. if (f.status === "added") {
  1719. changedFiles.created.push(f.filename);
  1720. }
  1721. else if (f.status === "removed") {
  1722. changedFiles.deleted.push(f.filename);
  1723. }
  1724. else if (f.status === "modified") {
  1725. changedFiles.updated.push(f.filename);
  1726. }
  1727. else if (f.status === "renamed") {
  1728. changedFiles.created.push(f.filename);
  1729. if (re.test(f["previous_filename"])) {
  1730. changedFiles.deleted.push(f["previous_filename"]);
  1731. }
  1732. }
  1733. });
  1734. }
  1735. return changedFiles;
  1736. });
  1737. }
  1738. function fetchPr(client) {
  1739. return __awaiter(this, void 0, void 0, function* () {
  1740. const prNumberInput = core.getInput("pr-number");
  1741. // If user provides pull request number, we fetch and return that particular pull request
  1742. if (prNumberInput) {
  1743. const { data: pr } = yield client.pulls.get({
  1744. owner: github.context.repo.owner,
  1745. repo: github.context.repo.repo,
  1746. pull_number: parseInt(prNumberInput, 10),
  1747. });
  1748. return pr;
  1749. }
  1750. // Otherwise, we infer the pull request based on the the event's context
  1751. return github.context.payload.pull_request;
  1752. });
  1753. }
  1754. function run() {
  1755. return __awaiter(this, void 0, void 0, function* () {
  1756. try {
  1757. const token = core.getInput("repo-token", { required: true });
  1758. const client = new github.GitHub(token);
  1759. const pr = yield fetchPr(client);
  1760. if (!pr) {
  1761. core.setFailed(`Could not get pull request from context, exiting`);
  1762. return;
  1763. }
  1764. const changedFiles = yield getChangedFiles(client, pr.number, pr.changed_files);
  1765. core.debug(`Found ${changedFiles.count} changed files for pr #${pr.number}`);
  1766. core.setOutput("files_created", changedFiles.created.join("\n"));
  1767. core.setOutput("files_updated", changedFiles.updated.join("\n"));
  1768. core.setOutput("files_deleted", changedFiles.deleted.join("\n"));
  1769. }
  1770. catch (error) {
  1771. core.setFailed(error.message);
  1772. }
  1773. });
  1774. }
  1775. run();
  1776. /***/ }),
  1777. /***/ 211:
  1778. /***/ (function(module) {
  1779. module.exports = require("https");
  1780. /***/ }),
  1781. /***/ 215:
  1782. /***/ (function(module) {
  1783. module.exports = {"_from":"@octokit/rest@^16.43.1","_id":"@octokit/rest@16.43.1","_inBundle":false,"_integrity":"sha512-gfFKwRT/wFxq5qlNjnW2dh+qh74XgTQ2B179UX5K1HYCluioWj8Ndbgqw2PVqa1NnVJkGHp2ovMpVn/DImlmkw==","_location":"/@octokit/rest","_phantomChildren":{"deprecation":"2.3.1","once":"1.4.0","os-name":"3.1.0"},"_requested":{"type":"range","registry":true,"raw":"@octokit/rest@^16.43.1","name":"@octokit/rest","escapedName":"@octokit%2frest","scope":"@octokit","rawSpec":"^16.43.1","saveSpec":null,"fetchSpec":"^16.43.1"},"_requiredBy":["/@actions/github"],"_resolved":"https://registry.npmjs.org/@octokit/rest/-/rest-16.43.1.tgz","_shasum":"3b11e7d1b1ac2bbeeb23b08a17df0b20947eda6b","_spec":"@octokit/rest@^16.43.1","_where":"E:\\PreMiD\\changed-files\\node_modules\\@actions\\github","author":{"name":"Gregor Martynus","url":"https://github.com/gr2m"},"bugs":{"url":"https://github.com/octokit/rest.js/issues"},"bundleDependencies":false,"bundlesize":[{"path":"./dist/octokit-rest.min.js.gz","maxSize":"33 kB"}],"contributors":[{"name":"Mike de Boer","email":"info@mikedeboer.nl"},{"name":"Fabian Jakobs","email":"fabian@c9.io"},{"name":"Joe Gallo","email":"joe@brassafrax.com"},{"name":"Gregor Martynus","url":"https://github.com/gr2m"}],"dependencies":{"@octokit/auth-token":"^2.4.0","@octokit/plugin-paginate-rest":"^1.1.1","@octokit/plugin-request-log":"^1.0.0","@octokit/plugin-rest-endpoint-methods":"2.4.0","@octokit/request":"^5.2.0","@octokit/request-error":"^1.0.2","atob-lite":"^2.0.0","before-after-hook":"^2.0.0","btoa-lite":"^1.0.0","deprecation":"^2.0.0","lodash.get":"^4.4.2","lodash.set":"^4.3.2","lodash.uniq":"^4.5.0","octokit-pagination-methods":"^1.1.0","once":"^1.4.0","universal-user-agent":"^4.0.0"},"deprecated":false,"description":"GitHub REST API client for Node.js","devDependencies":{"@gimenete/type-writer":"^0.1.3","@octokit/auth":"^1.1.1","@octokit/fixtures-server":"^5.0.6","@octokit/graphql":"^4.2.0","@types/node":"^13.1.0","bundlesize":"^0.18.0","chai":"^4.1.2","compression-webpack-plugin":"^3.1.0","cypress":"^3.0.0","glob":"^7.1.2","http-proxy-agent":"^4.0.0","lodash.camelcase":"^4.3.0","lodash.merge":"^4.6.1","lodash.upperfirst":"^4.3.1","lolex":"^5.1.2","mkdirp":"^1.0.0","mocha":"^7.0.1","mustache":"^4.0.0","nock":"^11.3.3","npm-run-all":"^4.1.2","nyc":"^15.0.0","prettier":"^1.14.2","proxy":"^1.0.0","semantic-release":"^17.0.0","sinon":"^8.0.0","sinon-chai":"^3.0.0","sort-keys":"^4.0.0","string-to-arraybuffer":"^1.0.0","string-to-jsdoc-comment":"^1.0.0","typescript":"^3.3.1","webpack":"^4.0.0","webpack-bundle-analyzer":"^3.0.0","webpack-cli":"^3.0.0"},"files":["index.js","index.d.ts","lib","plugins"],"homepage":"https://github.com/octokit/rest.js#readme","keywords":["octokit","github","rest","api-client"],"license":"MIT","name":"@octokit/rest","nyc":{"ignore":["test"]},"publishConfig":{"access":"public"},"release":{"publish":["@semantic-release/npm",{"path":"@semantic-release/github","assets":["dist/*","!dist/*.map.gz"]}]},"repository":{"type":"git","url":"git+https://github.com/octokit/rest.js.git"},"scripts":{"build":"npm-run-all build:*","build:browser":"npm-run-all build:browser:*","build:browser:development":"webpack --mode development --entry . --output-library=Octokit --output=./dist/octokit-rest.js --profile --json > dist/bundle-stats.json","build:browser:production":"webpack --mode production --entry . --plugin=compression-webpack-plugin --output-library=Octokit --output-path=./dist --output-filename=octokit-rest.min.js --devtool source-map","build:ts":"npm run -s update-endpoints:typescript","coverage":"nyc report --reporter=html && open coverage/index.html","generate-bundle-report":"webpack-bundle-analyzer dist/bundle-stats.json --mode=static --no-open --report dist/bundle-report.html","lint":"prettier --check '{lib,plugins,scripts,test}/**/*.{js,json,ts}' 'docs/*.{js,json}' 'docs/src/**/*' index.js README.md package.json","lint:fix":"prettier --write '{lib,plugins,scripts,test}/**/*.{js,json,ts}' 'docs/*.{js,json}' 'docs/src/**/*' index.js README.md package.json","postvalidate:ts":"tsc --noEmit --target es6 test/typescript-validate.ts","prebuild:browser":"mkdirp dist/","pretest":"npm run -s lint","prevalidate:ts":"npm run -s build:ts","start-fixtures-server":"octokit-fixtures-server","test":"nyc mocha test/mocha-node-setup.js \"test/*/**/*-test.js\"","test:browser":"cypress run --browser chrome","update-endpoints":"npm-run-all update-endpoints:*","update-endpoints:fetch-json":"node scripts/update-endpoints/fetch-json","update-endpoints:typescript":"node scripts/update-endpoints/typescript","validate:ts":"tsc --target es6 --noImplicitAny index.d.ts"},"types":"index.d.ts","version":"16.43.1"};
  1784. /***/ }),
  1785. /***/ 260:
  1786. /***/ (function(module, __unusedexports, __webpack_require__) {
  1787. // Note: since nyc uses this module to output coverage, any lines
  1788. // that are in the direct sync flow of nyc's outputCoverage are
  1789. // ignored, since we can never get coverage for them.
  1790. var assert = __webpack_require__(357)
  1791. var signals = __webpack_require__(654)
  1792. var isWin = /^win/i.test(process.platform)
  1793. var EE = __webpack_require__(614)
  1794. /* istanbul ignore if */
  1795. if (typeof EE !== 'function') {
  1796. EE = EE.EventEmitter
  1797. }
  1798. var emitter
  1799. if (process.__signal_exit_emitter__) {
  1800. emitter = process.__signal_exit_emitter__
  1801. } else {
  1802. emitter = process.__signal_exit_emitter__ = new EE()
  1803. emitter.count = 0
  1804. emitter.emitted = {}
  1805. }
  1806. // Because this emitter is a global, we have to check to see if a
  1807. // previous version of this library failed to enable infinite listeners.
  1808. // I know what you're about to say. But literally everything about
  1809. // signal-exit is a compromise with evil. Get used to it.
  1810. if (!emitter.infinite) {
  1811. emitter.setMaxListeners(Infinity)
  1812. emitter.infinite = true
  1813. }
  1814. module.exports = function (cb, opts) {
  1815. assert.equal(typeof cb, 'function', 'a callback must be provided for exit handler')
  1816. if (loaded === false) {
  1817. load()
  1818. }
  1819. var ev = 'exit'
  1820. if (opts && opts.alwaysLast) {
  1821. ev = 'afterexit'
  1822. }
  1823. var remove = function () {
  1824. emitter.removeListener(ev, cb)
  1825. if (emitter.listeners('exit').length === 0 &&
  1826. emitter.listeners('afterexit').length === 0) {
  1827. unload()
  1828. }
  1829. }
  1830. emitter.on(ev, cb)
  1831. return remove
  1832. }
  1833. module.exports.unload = unload
  1834. function unload () {
  1835. if (!loaded) {
  1836. return
  1837. }
  1838. loaded = false
  1839. signals.forEach(function (sig) {
  1840. try {
  1841. process.removeListener(sig, sigListeners[sig])
  1842. } catch (er) {}
  1843. })
  1844. process.emit = originalProcessEmit
  1845. process.reallyExit = originalProcessReallyExit
  1846. emitter.count -= 1
  1847. }
  1848. function emit (event, code, signal) {
  1849. if (emitter.emitted[event]) {
  1850. return
  1851. }
  1852. emitter.emitted[event] = true
  1853. emitter.emit(event, code, signal)
  1854. }
  1855. // { <signal>: <listener fn>, ... }
  1856. var sigListeners = {}
  1857. signals.forEach(function (sig) {
  1858. sigListeners[sig] = function listener () {
  1859. // If there are no other listeners, an exit is coming!
  1860. // Simplest way: remove us and then re-send the signal.
  1861. // We know that this will kill the process, so we can
  1862. // safely emit now.
  1863. var listeners = process.listeners(sig)
  1864. if (listeners.length === emitter.count) {
  1865. unload()
  1866. emit('exit', null, sig)
  1867. /* istanbul ignore next */
  1868. emit('afterexit', null, sig)
  1869. /* istanbul ignore next */
  1870. if (isWin && sig === 'SIGHUP') {
  1871. // "SIGHUP" throws an `ENOSYS` error on Windows,
  1872. // so use a supported signal instead
  1873. sig = 'SIGINT'
  1874. }
  1875. process.kill(process.pid, sig)
  1876. }
  1877. }
  1878. })
  1879. module.exports.signals = function () {
  1880. return signals
  1881. }
  1882. module.exports.load = load
  1883. var loaded = false
  1884. function load () {
  1885. if (loaded) {
  1886. return
  1887. }
  1888. loaded = true
  1889. // This is the number of onSignalExit's that are in play.
  1890. // It's important so that we can count the correct number of
  1891. // listeners on signals, and don't wait for the other one to
  1892. // handle it instead of us.
  1893. emitter.count += 1
  1894. signals = signals.filter(function (sig) {
  1895. try {
  1896. process.on(sig, sigListeners[sig])
  1897. return true
  1898. } catch (er) {
  1899. return false
  1900. }
  1901. })
  1902. process.emit = processEmit
  1903. process.reallyExit = processReallyExit
  1904. }
  1905. var originalProcessReallyExit = process.reallyExit
  1906. function processReallyExit (code) {
  1907. process.exitCode = code || 0
  1908. emit('exit', process.exitCode, null)
  1909. /* istanbul ignore next */
  1910. emit('afterexit', process.exitCode, null)
  1911. /* istanbul ignore next */
  1912. originalProcessReallyExit.call(process, process.exitCode)
  1913. }
  1914. var originalProcessEmit = process.emit
  1915. function processEmit (ev, arg) {
  1916. if (ev === 'exit') {
  1917. if (arg !== undefined) {
  1918. process.exitCode = arg
  1919. }
  1920. var ret = originalProcessEmit.apply(this, arguments)
  1921. emit('exit', process.exitCode, null)
  1922. /* istanbul ignore next */
  1923. emit('afterexit', process.exitCode, null)
  1924. return ret
  1925. } else {
  1926. return originalProcessEmit.apply(this, arguments)
  1927. }
  1928. }
  1929. /***/ }),
  1930. /***/ 262:
  1931. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  1932. "use strict";
  1933. Object.defineProperty(exports, "__esModule", { value: true });
  1934. const fs_1 = __webpack_require__(747);
  1935. const os_1 = __webpack_require__(87);
  1936. class Context {
  1937. /**
  1938. * Hydrate the context from the environment
  1939. */
  1940. constructor() {
  1941. this.payload = {};
  1942. if (process.env.GITHUB_EVENT_PATH) {
  1943. if (fs_1.existsSync(process.env.GITHUB_EVENT_PATH)) {
  1944. this.payload = JSON.parse(fs_1.readFileSync(process.env.GITHUB_EVENT_PATH, { encoding: 'utf8' }));
  1945. }
  1946. else {
  1947. const path = process.env.GITHUB_EVENT_PATH;
  1948. process.stdout.write(`GITHUB_EVENT_PATH ${path} does not exist${os_1.EOL}`);
  1949. }
  1950. }
  1951. this.eventName = process.env.GITHUB_EVENT_NAME;
  1952. this.sha = process.env.GITHUB_SHA;
  1953. this.ref = process.env.GITHUB_REF;
  1954. this.workflow = process.env.GITHUB_WORKFLOW;
  1955. this.action = process.env.GITHUB_ACTION;
  1956. this.actor = process.env.GITHUB_ACTOR;
  1957. }
  1958. get issue() {
  1959. const payload = this.payload;
  1960. return Object.assign(Object.assign({}, this.repo), { number: (payload.issue || payload.pull_request || payload).number });
  1961. }
  1962. get repo() {
  1963. if (process.env.GITHUB_REPOSITORY) {
  1964. const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');
  1965. return { owner, repo };
  1966. }
  1967. if (this.payload.repository) {
  1968. return {
  1969. owner: this.payload.repository.owner.login,
  1970. repo: this.payload.repository.name
  1971. };
  1972. }
  1973. throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'");
  1974. }
  1975. }
  1976. exports.Context = Context;
  1977. //# sourceMappingURL=context.js.map
  1978. /***/ }),
  1979. /***/ 265:
  1980. /***/ (function(module, __unusedexports, __webpack_require__) {
  1981. module.exports = getPage
  1982. const deprecate = __webpack_require__(370)
  1983. const getPageLinks = __webpack_require__(577)
  1984. const HttpError = __webpack_require__(297)
  1985. function getPage (octokit, link, which, headers) {
  1986. deprecate(`octokit.get${which.charAt(0).toUpperCase() + which.slice(1)}Page() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`)
  1987. const url = getPageLinks(link)[which]
  1988. if (!url) {
  1989. const urlError = new HttpError(`No ${which} page found`, 404)
  1990. return Promise.reject(urlError)
  1991. }
  1992. const requestOptions = {
  1993. url,
  1994. headers: applyAcceptHeader(link, headers)
  1995. }
  1996. const promise = octokit.request(requestOptions)
  1997. return promise
  1998. }
  1999. function applyAcceptHeader (res, headers) {
  2000. const previous = res.headers && res.headers['x-github-media-type']
  2001. if (!previous || (headers && headers.accept)) {
  2002. return headers
  2003. }
  2004. headers = headers || {}
  2005. headers.accept = 'application/vnd.' + previous
  2006. .replace('; param=', '.')
  2007. .replace('; format=', '+')
  2008. return headers
  2009. }
  2010. /***/ }),
  2011. /***/ 280:
  2012. /***/ (function(module, exports) {
  2013. exports = module.exports = SemVer
  2014. var debug
  2015. /* istanbul ignore next */
  2016. if (typeof process === 'object' &&
  2017. process.env &&
  2018. process.env.NODE_DEBUG &&
  2019. /\bsemver\b/i.test(process.env.NODE_DEBUG)) {
  2020. debug = function () {
  2021. var args = Array.prototype.slice.call(arguments, 0)
  2022. args.unshift('SEMVER')
  2023. console.log.apply(console, args)
  2024. }
  2025. } else {
  2026. debug = function () {}
  2027. }
  2028. // Note: this is the semver.org version of the spec that it implements
  2029. // Not necessarily the package version of this code.
  2030. exports.SEMVER_SPEC_VERSION = '2.0.0'
  2031. var MAX_LENGTH = 256
  2032. var MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
  2033. /* istanbul ignore next */ 9007199254740991
  2034. // Max safe segment length for coercion.
  2035. var MAX_SAFE_COMPONENT_LENGTH = 16
  2036. // The actual regexps go on exports.re
  2037. var re = exports.re = []
  2038. var src = exports.src = []
  2039. var R = 0
  2040. // The following Regular Expressions can be used for tokenizing,
  2041. // validating, and parsing SemVer version strings.
  2042. // ## Numeric Identifier
  2043. // A single `0`, or a non-zero digit followed by zero or more digits.
  2044. var NUMERICIDENTIFIER = R++
  2045. src[NUMERICIDENTIFIER] = '0|[1-9]\\d*'
  2046. var NUMERICIDENTIFIERLOOSE = R++
  2047. src[NUMERICIDENTIFIERLOOSE] = '[0-9]+'
  2048. // ## Non-numeric Identifier
  2049. // Zero or more digits, followed by a letter or hyphen, and then zero or
  2050. // more letters, digits, or hyphens.
  2051. var NONNUMERICIDENTIFIER = R++
  2052. src[NONNUMERICIDENTIFIER] = '\\d*[a-zA-Z-][a-zA-Z0-9-]*'
  2053. // ## Main Version
  2054. // Three dot-separated numeric identifiers.
  2055. var MAINVERSION = R++
  2056. src[MAINVERSION] = '(' + src[NUMERICIDENTIFIER] + ')\\.' +
  2057. '(' + src[NUMERICIDENTIFIER] + ')\\.' +
  2058. '(' + src[NUMERICIDENTIFIER] + ')'
  2059. var MAINVERSIONLOOSE = R++
  2060. src[MAINVERSIONLOOSE] = '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
  2061. '(' + src[NUMERICIDENTIFIERLOOSE] + ')\\.' +
  2062. '(' + src[NUMERICIDENTIFIERLOOSE] + ')'
  2063. // ## Pre-release Version Identifier
  2064. // A numeric identifier, or a non-numeric identifier.
  2065. var PRERELEASEIDENTIFIER = R++
  2066. src[PRERELEASEIDENTIFIER] = '(?:' + src[NUMERICIDENTIFIER] +
  2067. '|' + src[NONNUMERICIDENTIFIER] + ')'
  2068. var PRERELEASEIDENTIFIERLOOSE = R++
  2069. src[PRERELEASEIDENTIFIERLOOSE] = '(?:' + src[NUMERICIDENTIFIERLOOSE] +
  2070. '|' + src[NONNUMERICIDENTIFIER] + ')'
  2071. // ## Pre-release Version
  2072. // Hyphen, followed by one or more dot-separated pre-release version
  2073. // identifiers.
  2074. var PRERELEASE = R++
  2075. src[PRERELEASE] = '(?:-(' + src[PRERELEASEIDENTIFIER] +
  2076. '(?:\\.' + src[PRERELEASEIDENTIFIER] + ')*))'
  2077. var PRERELEASELOOSE = R++
  2078. src[PRERELEASELOOSE] = '(?:-?(' + src[PRERELEASEIDENTIFIERLOOSE] +
  2079. '(?:\\.' + src[PRERELEASEIDENTIFIERLOOSE] + ')*))'
  2080. // ## Build Metadata Identifier
  2081. // Any combination of digits, letters, or hyphens.
  2082. var BUILDIDENTIFIER = R++
  2083. src[BUILDIDENTIFIER] = '[0-9A-Za-z-]+'
  2084. // ## Build Metadata
  2085. // Plus sign, followed by one or more period-separated build metadata
  2086. // identifiers.
  2087. var BUILD = R++
  2088. src[BUILD] = '(?:\\+(' + src[BUILDIDENTIFIER] +
  2089. '(?:\\.' + src[BUILDIDENTIFIER] + ')*))'
  2090. // ## Full Version String
  2091. // A main version, followed optionally by a pre-release version and
  2092. // build metadata.
  2093. // Note that the only major, minor, patch, and pre-release sections of
  2094. // the version string are capturing groups. The build metadata is not a
  2095. // capturing group, because it should not ever be used in version
  2096. // comparison.
  2097. var FULL = R++
  2098. var FULLPLAIN = 'v?' + src[MAINVERSION] +
  2099. src[PRERELEASE] + '?' +
  2100. src[BUILD] + '?'
  2101. src[FULL] = '^' + FULLPLAIN + '$'
  2102. // like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
  2103. // also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
  2104. // common in the npm registry.
  2105. var LOOSEPLAIN = '[v=\\s]*' + src[MAINVERSIONLOOSE] +
  2106. src[PRERELEASELOOSE] + '?' +
  2107. src[BUILD] + '?'
  2108. var LOOSE = R++
  2109. src[LOOSE] = '^' + LOOSEPLAIN + '$'
  2110. var GTLT = R++
  2111. src[GTLT] = '((?:<|>)?=?)'
  2112. // Something like "2.*" or "1.2.x".
  2113. // Note that "x.x" is a valid xRange identifer, meaning "any version"
  2114. // Only the first item is strictly required.
  2115. var XRANGEIDENTIFIERLOOSE = R++
  2116. src[XRANGEIDENTIFIERLOOSE] = src[NUMERICIDENTIFIERLOOSE] + '|x|X|\\*'
  2117. var XRANGEIDENTIFIER = R++
  2118. src[XRANGEIDENTIFIER] = src[NUMERICIDENTIFIER] + '|x|X|\\*'
  2119. var XRANGEPLAIN = R++
  2120. src[XRANGEPLAIN] = '[v=\\s]*(' + src[XRANGEIDENTIFIER] + ')' +
  2121. '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
  2122. '(?:\\.(' + src[XRANGEIDENTIFIER] + ')' +
  2123. '(?:' + src[PRERELEASE] + ')?' +
  2124. src[BUILD] + '?' +
  2125. ')?)?'
  2126. var XRANGEPLAINLOOSE = R++
  2127. src[XRANGEPLAINLOOSE] = '[v=\\s]*(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
  2128. '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
  2129. '(?:\\.(' + src[XRANGEIDENTIFIERLOOSE] + ')' +
  2130. '(?:' + src[PRERELEASELOOSE] + ')?' +
  2131. src[BUILD] + '?' +
  2132. ')?)?'
  2133. var XRANGE = R++
  2134. src[XRANGE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAIN] + '$'
  2135. var XRANGELOOSE = R++
  2136. src[XRANGELOOSE] = '^' + src[GTLT] + '\\s*' + src[XRANGEPLAINLOOSE] + '$'
  2137. // Coercion.
  2138. // Extract anything that could conceivably be a part of a valid semver
  2139. var COERCE = R++
  2140. src[COERCE] = '(?:^|[^\\d])' +
  2141. '(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '})' +
  2142. '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
  2143. '(?:\\.(\\d{1,' + MAX_SAFE_COMPONENT_LENGTH + '}))?' +
  2144. '(?:$|[^\\d])'
  2145. // Tilde ranges.
  2146. // Meaning is "reasonably at or greater than"
  2147. var LONETILDE = R++
  2148. src[LONETILDE] = '(?:~>?)'
  2149. var TILDETRIM = R++
  2150. src[TILDETRIM] = '(\\s*)' + src[LONETILDE] + '\\s+'
  2151. re[TILDETRIM] = new RegExp(src[TILDETRIM], 'g')
  2152. var tildeTrimReplace = '$1~'
  2153. var TILDE = R++
  2154. src[TILDE] = '^' + src[LONETILDE] + src[XRANGEPLAIN] + '$'
  2155. var TILDELOOSE = R++
  2156. src[TILDELOOSE] = '^' + src[LONETILDE] + src[XRANGEPLAINLOOSE] + '$'
  2157. // Caret ranges.
  2158. // Meaning is "at least and backwards compatible with"
  2159. var LONECARET = R++
  2160. src[LONECARET] = '(?:\\^)'
  2161. var CARETTRIM = R++
  2162. src[CARETTRIM] = '(\\s*)' + src[LONECARET] + '\\s+'
  2163. re[CARETTRIM] = new RegExp(src[CARETTRIM], 'g')
  2164. var caretTrimReplace = '$1^'
  2165. var CARET = R++
  2166. src[CARET] = '^' + src[LONECARET] + src[XRANGEPLAIN] + '$'
  2167. var CARETLOOSE = R++
  2168. src[CARETLOOSE] = '^' + src[LONECARET] + src[XRANGEPLAINLOOSE] + '$'
  2169. // A simple gt/lt/eq thing, or just "" to indicate "any version"
  2170. var COMPARATORLOOSE = R++
  2171. src[COMPARATORLOOSE] = '^' + src[GTLT] + '\\s*(' + LOOSEPLAIN + ')$|^$'
  2172. var COMPARATOR = R++
  2173. src[COMPARATOR] = '^' + src[GTLT] + '\\s*(' + FULLPLAIN + ')$|^$'
  2174. // An expression to strip any whitespace between the gtlt and the thing
  2175. // it modifies, so that `> 1.2.3` ==> `>1.2.3`
  2176. var COMPARATORTRIM = R++
  2177. src[COMPARATORTRIM] = '(\\s*)' + src[GTLT] +
  2178. '\\s*(' + LOOSEPLAIN + '|' + src[XRANGEPLAIN] + ')'
  2179. // this one has to use the /g flag
  2180. re[COMPARATORTRIM] = new RegExp(src[COMPARATORTRIM], 'g')
  2181. var comparatorTrimReplace = '$1$2$3'
  2182. // Something like `1.2.3 - 1.2.4`
  2183. // Note that these all use the loose form, because they'll be
  2184. // checked against either the strict or loose comparator form
  2185. // later.
  2186. var HYPHENRANGE = R++
  2187. src[HYPHENRANGE] = '^\\s*(' + src[XRANGEPLAIN] + ')' +
  2188. '\\s+-\\s+' +
  2189. '(' + src[XRANGEPLAIN] + ')' +
  2190. '\\s*$'
  2191. var HYPHENRANGELOOSE = R++
  2192. src[HYPHENRANGELOOSE] = '^\\s*(' + src[XRANGEPLAINLOOSE] + ')' +
  2193. '\\s+-\\s+' +
  2194. '(' + src[XRANGEPLAINLOOSE] + ')' +
  2195. '\\s*$'
  2196. // Star ranges basically just allow anything at all.
  2197. var STAR = R++
  2198. src[STAR] = '(<|>)?=?\\s*\\*'
  2199. // Compile to actual regexp objects.
  2200. // All are flag-free, unless they were created above with a flag.
  2201. for (var i = 0; i < R; i++) {
  2202. debug(i, src[i])
  2203. if (!re[i]) {
  2204. re[i] = new RegExp(src[i])
  2205. }
  2206. }
  2207. exports.parse = parse
  2208. function parse (version, options) {
  2209. if (!options || typeof options !== 'object') {
  2210. options = {
  2211. loose: !!options,
  2212. includePrerelease: false
  2213. }
  2214. }
  2215. if (version instanceof SemVer) {
  2216. return version
  2217. }
  2218. if (typeof version !== 'string') {
  2219. return null
  2220. }
  2221. if (version.length > MAX_LENGTH) {
  2222. return null
  2223. }
  2224. var r = options.loose ? re[LOOSE] : re[FULL]
  2225. if (!r.test(version)) {
  2226. return null
  2227. }
  2228. try {
  2229. return new SemVer(version, options)
  2230. } catch (er) {
  2231. return null
  2232. }
  2233. }
  2234. exports.valid = valid
  2235. function valid (version, options) {
  2236. var v = parse(version, options)
  2237. return v ? v.version : null
  2238. }
  2239. exports.clean = clean
  2240. function clean (version, options) {
  2241. var s = parse(version.trim().replace(/^[=v]+/, ''), options)
  2242. return s ? s.version : null
  2243. }
  2244. exports.SemVer = SemVer
  2245. function SemVer (version, options) {
  2246. if (!options || typeof options !== 'object') {
  2247. options = {
  2248. loose: !!options,
  2249. includePrerelease: false
  2250. }
  2251. }
  2252. if (version instanceof SemVer) {
  2253. if (version.loose === options.loose) {
  2254. return version
  2255. } else {
  2256. version = version.version
  2257. }
  2258. } else if (typeof version !== 'string') {
  2259. throw new TypeError('Invalid Version: ' + version)
  2260. }
  2261. if (version.length > MAX_LENGTH) {
  2262. throw new TypeError('version is longer than ' + MAX_LENGTH + ' characters')
  2263. }
  2264. if (!(this instanceof SemVer)) {
  2265. return new SemVer(version, options)
  2266. }
  2267. debug('SemVer', version, options)
  2268. this.options = options
  2269. this.loose = !!options.loose
  2270. var m = version.trim().match(options.loose ? re[LOOSE] : re[FULL])
  2271. if (!m) {
  2272. throw new TypeError('Invalid Version: ' + version)
  2273. }
  2274. this.raw = version
  2275. // these are actually numbers
  2276. this.major = +m[1]
  2277. this.minor = +m[2]
  2278. this.patch = +m[3]
  2279. if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
  2280. throw new TypeError('Invalid major version')
  2281. }
  2282. if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
  2283. throw new TypeError('Invalid minor version')
  2284. }
  2285. if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
  2286. throw new TypeError('Invalid patch version')
  2287. }
  2288. // numberify any prerelease numeric ids
  2289. if (!m[4]) {
  2290. this.prerelease = []
  2291. } else {
  2292. this.prerelease = m[4].split('.').map(function (id) {
  2293. if (/^[0-9]+$/.test(id)) {
  2294. var num = +id
  2295. if (num >= 0 && num < MAX_SAFE_INTEGER) {
  2296. return num
  2297. }
  2298. }
  2299. return id
  2300. })
  2301. }
  2302. this.build = m[5] ? m[5].split('.') : []
  2303. this.format()
  2304. }
  2305. SemVer.prototype.format = function () {
  2306. this.version = this.major + '.' + this.minor + '.' + this.patch
  2307. if (this.prerelease.length) {
  2308. this.version += '-' + this.prerelease.join('.')
  2309. }
  2310. return this.version
  2311. }
  2312. SemVer.prototype.toString = function () {
  2313. return this.version
  2314. }
  2315. SemVer.prototype.compare = function (other) {
  2316. debug('SemVer.compare', this.version, this.options, other)
  2317. if (!(other instanceof SemVer)) {
  2318. other = new SemVer(other, this.options)
  2319. }
  2320. return this.compareMain(other) || this.comparePre(other)
  2321. }
  2322. SemVer.prototype.compareMain = function (other) {
  2323. if (!(other instanceof SemVer)) {
  2324. other = new SemVer(other, this.options)
  2325. }
  2326. return compareIdentifiers(this.major, other.major) ||
  2327. compareIdentifiers(this.minor, other.minor) ||
  2328. compareIdentifiers(this.patch, other.patch)
  2329. }
  2330. SemVer.prototype.comparePre = function (other) {
  2331. if (!(other instanceof SemVer)) {
  2332. other = new SemVer(other, this.options)
  2333. }
  2334. // NOT having a prerelease is > having one
  2335. if (this.prerelease.length && !other.prerelease.length) {
  2336. return -1
  2337. } else if (!this.prerelease.length && other.prerelease.length) {
  2338. return 1
  2339. } else if (!this.prerelease.length && !other.prerelease.length) {
  2340. return 0
  2341. }
  2342. var i = 0
  2343. do {
  2344. var a = this.prerelease[i]
  2345. var b = other.prerelease[i]
  2346. debug('prerelease compare', i, a, b)
  2347. if (a === undefined && b === undefined) {
  2348. return 0
  2349. } else if (b === undefined) {
  2350. return 1
  2351. } else if (a === undefined) {
  2352. return -1
  2353. } else if (a === b) {
  2354. continue
  2355. } else {
  2356. return compareIdentifiers(a, b)
  2357. }
  2358. } while (++i)
  2359. }
  2360. // preminor will bump the version up to the next minor release, and immediately
  2361. // down to pre-release. premajor and prepatch work the same way.
  2362. SemVer.prototype.inc = function (release, identifier) {
  2363. switch (release) {
  2364. case 'premajor':
  2365. this.prerelease.length = 0
  2366. this.patch = 0
  2367. this.minor = 0
  2368. this.major++
  2369. this.inc('pre', identifier)
  2370. break
  2371. case 'preminor':
  2372. this.prerelease.length = 0
  2373. this.patch = 0
  2374. this.minor++
  2375. this.inc('pre', identifier)
  2376. break
  2377. case 'prepatch':
  2378. // If this is already a prerelease, it will bump to the next version
  2379. // drop any prereleases that might already exist, since they are not
  2380. // relevant at this point.
  2381. this.prerelease.length = 0
  2382. this.inc('patch', identifier)
  2383. this.inc('pre', identifier)
  2384. break
  2385. // If the input is a non-prerelease version, this acts the same as
  2386. // prepatch.
  2387. case 'prerelease':
  2388. if (this.prerelease.length === 0) {
  2389. this.inc('patch', identifier)
  2390. }
  2391. this.inc('pre', identifier)
  2392. break
  2393. case 'major':
  2394. // If this is a pre-major version, bump up to the same major version.
  2395. // Otherwise increment major.
  2396. // 1.0.0-5 bumps to 1.0.0
  2397. // 1.1.0 bumps to 2.0.0
  2398. if (this.minor !== 0 ||
  2399. this.patch !== 0 ||
  2400. this.prerelease.length === 0) {
  2401. this.major++
  2402. }
  2403. this.minor = 0
  2404. this.patch = 0
  2405. this.prerelease = []
  2406. break
  2407. case 'minor':
  2408. // If this is a pre-minor version, bump up to the same minor version.
  2409. // Otherwise increment minor.
  2410. // 1.2.0-5 bumps to 1.2.0
  2411. // 1.2.1 bumps to 1.3.0
  2412. if (this.patch !== 0 || this.prerelease.length === 0) {
  2413. this.minor++
  2414. }
  2415. this.patch = 0
  2416. this.prerelease = []
  2417. break
  2418. case 'patch':
  2419. // If this is not a pre-release version, it will increment the patch.
  2420. // If it is a pre-release it will bump up to the same patch version.
  2421. // 1.2.0-5 patches to 1.2.0
  2422. // 1.2.0 patches to 1.2.1
  2423. if (this.prerelease.length === 0) {
  2424. this.patch++
  2425. }
  2426. this.prerelease = []
  2427. break
  2428. // This probably shouldn't be used publicly.
  2429. // 1.0.0 "pre" would become 1.0.0-0 which is the wrong direction.
  2430. case 'pre':
  2431. if (this.prerelease.length === 0) {
  2432. this.prerelease = [0]
  2433. } else {
  2434. var i = this.prerelease.length
  2435. while (--i >= 0) {
  2436. if (typeof this.prerelease[i] === 'number') {
  2437. this.prerelease[i]++
  2438. i = -2
  2439. }
  2440. }
  2441. if (i === -1) {
  2442. // didn't increment anything
  2443. this.prerelease.push(0)
  2444. }
  2445. }
  2446. if (identifier) {
  2447. // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
  2448. // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
  2449. if (this.prerelease[0] === identifier) {
  2450. if (isNaN(this.prerelease[1])) {
  2451. this.prerelease = [identifier, 0]
  2452. }
  2453. } else {
  2454. this.prerelease = [identifier, 0]
  2455. }
  2456. }
  2457. break
  2458. default:
  2459. throw new Error('invalid increment argument: ' + release)
  2460. }
  2461. this.format()
  2462. this.raw = this.version
  2463. return this
  2464. }
  2465. exports.inc = inc
  2466. function inc (version, release, loose, identifier) {
  2467. if (typeof (loose) === 'string') {
  2468. identifier = loose
  2469. loose = undefined
  2470. }
  2471. try {
  2472. return new SemVer(version, loose).inc(release, identifier).version
  2473. } catch (er) {
  2474. return null
  2475. }
  2476. }
  2477. exports.diff = diff
  2478. function diff (version1, version2) {
  2479. if (eq(version1, version2)) {
  2480. return null
  2481. } else {
  2482. var v1 = parse(version1)
  2483. var v2 = parse(version2)
  2484. var prefix = ''
  2485. if (v1.prerelease.length || v2.prerelease.length) {
  2486. prefix = 'pre'
  2487. var defaultResult = 'prerelease'
  2488. }
  2489. for (var key in v1) {
  2490. if (key === 'major' || key === 'minor' || key === 'patch') {
  2491. if (v1[key] !== v2[key]) {
  2492. return prefix + key
  2493. }
  2494. }
  2495. }
  2496. return defaultResult // may be undefined
  2497. }
  2498. }
  2499. exports.compareIdentifiers = compareIdentifiers
  2500. var numeric = /^[0-9]+$/
  2501. function compareIdentifiers (a, b) {
  2502. var anum = numeric.test(a)
  2503. var bnum = numeric.test(b)
  2504. if (anum && bnum) {
  2505. a = +a
  2506. b = +b
  2507. }
  2508. return a === b ? 0
  2509. : (anum && !bnum) ? -1
  2510. : (bnum && !anum) ? 1
  2511. : a < b ? -1
  2512. : 1
  2513. }
  2514. exports.rcompareIdentifiers = rcompareIdentifiers
  2515. function rcompareIdentifiers (a, b) {
  2516. return compareIdentifiers(b, a)
  2517. }
  2518. exports.major = major
  2519. function major (a, loose) {
  2520. return new SemVer(a, loose).major
  2521. }
  2522. exports.minor = minor
  2523. function minor (a, loose) {
  2524. return new SemVer(a, loose).minor
  2525. }
  2526. exports.patch = patch
  2527. function patch (a, loose) {
  2528. return new SemVer(a, loose).patch
  2529. }
  2530. exports.compare = compare
  2531. function compare (a, b, loose) {
  2532. return new SemVer(a, loose).compare(new SemVer(b, loose))
  2533. }
  2534. exports.compareLoose = compareLoose
  2535. function compareLoose (a, b) {
  2536. return compare(a, b, true)
  2537. }
  2538. exports.rcompare = rcompare
  2539. function rcompare (a, b, loose) {
  2540. return compare(b, a, loose)
  2541. }
  2542. exports.sort = sort
  2543. function sort (list, loose) {
  2544. return list.sort(function (a, b) {
  2545. return exports.compare(a, b, loose)
  2546. })
  2547. }
  2548. exports.rsort = rsort
  2549. function rsort (list, loose) {
  2550. return list.sort(function (a, b) {
  2551. return exports.rcompare(a, b, loose)
  2552. })
  2553. }
  2554. exports.gt = gt
  2555. function gt (a, b, loose) {
  2556. return compare(a, b, loose) > 0
  2557. }
  2558. exports.lt = lt
  2559. function lt (a, b, loose) {
  2560. return compare(a, b, loose) < 0
  2561. }
  2562. exports.eq = eq
  2563. function eq (a, b, loose) {
  2564. return compare(a, b, loose) === 0
  2565. }
  2566. exports.neq = neq
  2567. function neq (a, b, loose) {
  2568. return compare(a, b, loose) !== 0
  2569. }
  2570. exports.gte = gte
  2571. function gte (a, b, loose) {
  2572. return compare(a, b, loose) >= 0
  2573. }
  2574. exports.lte = lte
  2575. function lte (a, b, loose) {
  2576. return compare(a, b, loose) <= 0
  2577. }
  2578. exports.cmp = cmp
  2579. function cmp (a, op, b, loose) {
  2580. switch (op) {
  2581. case '===':
  2582. if (typeof a === 'object')
  2583. a = a.version
  2584. if (typeof b === 'object')
  2585. b = b.version
  2586. return a === b
  2587. case '!==':
  2588. if (typeof a === 'object')
  2589. a = a.version
  2590. if (typeof b === 'object')
  2591. b = b.version
  2592. return a !== b
  2593. case '':
  2594. case '=':
  2595. case '==':
  2596. return eq(a, b, loose)
  2597. case '!=':
  2598. return neq(a, b, loose)
  2599. case '>':
  2600. return gt(a, b, loose)
  2601. case '>=':
  2602. return gte(a, b, loose)
  2603. case '<':
  2604. return lt(a, b, loose)
  2605. case '<=':
  2606. return lte(a, b, loose)
  2607. default:
  2608. throw new TypeError('Invalid operator: ' + op)
  2609. }
  2610. }
  2611. exports.Comparator = Comparator
  2612. function Comparator (comp, options) {
  2613. if (!options || typeof options !== 'object') {
  2614. options = {
  2615. loose: !!options,
  2616. includePrerelease: false
  2617. }
  2618. }
  2619. if (comp instanceof Comparator) {
  2620. if (comp.loose === !!options.loose) {
  2621. return comp
  2622. } else {
  2623. comp = comp.value
  2624. }
  2625. }
  2626. if (!(this instanceof Comparator)) {
  2627. return new Comparator(comp, options)
  2628. }
  2629. debug('comparator', comp, options)
  2630. this.options = options
  2631. this.loose = !!options.loose
  2632. this.parse(comp)
  2633. if (this.semver === ANY) {
  2634. this.value = ''
  2635. } else {
  2636. this.value = this.operator + this.semver.version
  2637. }
  2638. debug('comp', this)
  2639. }
  2640. var ANY = {}
  2641. Comparator.prototype.parse = function (comp) {
  2642. var r = this.options.loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
  2643. var m = comp.match(r)
  2644. if (!m) {
  2645. throw new TypeError('Invalid comparator: ' + comp)
  2646. }
  2647. this.operator = m[1]
  2648. if (this.operator === '=') {
  2649. this.operator = ''
  2650. }
  2651. // if it literally is just '>' or '' then allow anything.
  2652. if (!m[2]) {
  2653. this.semver = ANY
  2654. } else {
  2655. this.semver = new SemVer(m[2], this.options.loose)
  2656. }
  2657. }
  2658. Comparator.prototype.toString = function () {
  2659. return this.value
  2660. }
  2661. Comparator.prototype.test = function (version) {
  2662. debug('Comparator.test', version, this.options.loose)
  2663. if (this.semver === ANY) {
  2664. return true
  2665. }
  2666. if (typeof version === 'string') {
  2667. version = new SemVer(version, this.options)
  2668. }
  2669. return cmp(version, this.operator, this.semver, this.options)
  2670. }
  2671. Comparator.prototype.intersects = function (comp, options) {
  2672. if (!(comp instanceof Comparator)) {
  2673. throw new TypeError('a Comparator is required')
  2674. }
  2675. if (!options || typeof options !== 'object') {
  2676. options = {
  2677. loose: !!options,
  2678. includePrerelease: false
  2679. }
  2680. }
  2681. var rangeTmp
  2682. if (this.operator === '') {
  2683. rangeTmp = new Range(comp.value, options)
  2684. return satisfies(this.value, rangeTmp, options)
  2685. } else if (comp.operator === '') {
  2686. rangeTmp = new Range(this.value, options)
  2687. return satisfies(comp.semver, rangeTmp, options)
  2688. }
  2689. var sameDirectionIncreasing =
  2690. (this.operator === '>=' || this.operator === '>') &&
  2691. (comp.operator === '>=' || comp.operator === '>')
  2692. var sameDirectionDecreasing =
  2693. (this.operator === '<=' || this.operator === '<') &&
  2694. (comp.operator === '<=' || comp.operator === '<')
  2695. var sameSemVer = this.semver.version === comp.semver.version
  2696. var differentDirectionsInclusive =
  2697. (this.operator === '>=' || this.operator === '<=') &&
  2698. (comp.operator === '>=' || comp.operator === '<=')
  2699. var oppositeDirectionsLessThan =
  2700. cmp(this.semver, '<', comp.semver, options) &&
  2701. ((this.operator === '>=' || this.operator === '>') &&
  2702. (comp.operator === '<=' || comp.operator === '<'))
  2703. var oppositeDirectionsGreaterThan =
  2704. cmp(this.semver, '>', comp.semver, options) &&
  2705. ((this.operator === '<=' || this.operator === '<') &&
  2706. (comp.operator === '>=' || comp.operator === '>'))
  2707. return sameDirectionIncreasing || sameDirectionDecreasing ||
  2708. (sameSemVer && differentDirectionsInclusive) ||
  2709. oppositeDirectionsLessThan || oppositeDirectionsGreaterThan
  2710. }
  2711. exports.Range = Range
  2712. function Range (range, options) {
  2713. if (!options || typeof options !== 'object') {
  2714. options = {
  2715. loose: !!options,
  2716. includePrerelease: false
  2717. }
  2718. }
  2719. if (range instanceof Range) {
  2720. if (range.loose === !!options.loose &&
  2721. range.includePrerelease === !!options.includePrerelease) {
  2722. return range
  2723. } else {
  2724. return new Range(range.raw, options)
  2725. }
  2726. }
  2727. if (range instanceof Comparator) {
  2728. return new Range(range.value, options)
  2729. }
  2730. if (!(this instanceof Range)) {
  2731. return new Range(range, options)
  2732. }
  2733. this.options = options
  2734. this.loose = !!options.loose
  2735. this.includePrerelease = !!options.includePrerelease
  2736. // First, split based on boolean or ||
  2737. this.raw = range
  2738. this.set = range.split(/\s*\|\|\s*/).map(function (range) {
  2739. return this.parseRange(range.trim())
  2740. }, this).filter(function (c) {
  2741. // throw out any that are not relevant for whatever reason
  2742. return c.length
  2743. })
  2744. if (!this.set.length) {
  2745. throw new TypeError('Invalid SemVer Range: ' + range)
  2746. }
  2747. this.format()
  2748. }
  2749. Range.prototype.format = function () {
  2750. this.range = this.set.map(function (comps) {
  2751. return comps.join(' ').trim()
  2752. }).join('||').trim()
  2753. return this.range
  2754. }
  2755. Range.prototype.toString = function () {
  2756. return this.range
  2757. }
  2758. Range.prototype.parseRange = function (range) {
  2759. var loose = this.options.loose
  2760. range = range.trim()
  2761. // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
  2762. var hr = loose ? re[HYPHENRANGELOOSE] : re[HYPHENRANGE]
  2763. range = range.replace(hr, hyphenReplace)
  2764. debug('hyphen replace', range)
  2765. // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
  2766. range = range.replace(re[COMPARATORTRIM], comparatorTrimReplace)
  2767. debug('comparator trim', range, re[COMPARATORTRIM])
  2768. // `~ 1.2.3` => `~1.2.3`
  2769. range = range.replace(re[TILDETRIM], tildeTrimReplace)
  2770. // `^ 1.2.3` => `^1.2.3`
  2771. range = range.replace(re[CARETTRIM], caretTrimReplace)
  2772. // normalize spaces
  2773. range = range.split(/\s+/).join(' ')
  2774. // At this point, the range is completely trimmed and
  2775. // ready to be split into comparators.
  2776. var compRe = loose ? re[COMPARATORLOOSE] : re[COMPARATOR]
  2777. var set = range.split(' ').map(function (comp) {
  2778. return parseComparator(comp, this.options)
  2779. }, this).join(' ').split(/\s+/)
  2780. if (this.options.loose) {
  2781. // in loose mode, throw out any that are not valid comparators
  2782. set = set.filter(function (comp) {
  2783. return !!comp.match(compRe)
  2784. })
  2785. }
  2786. set = set.map(function (comp) {
  2787. return new Comparator(comp, this.options)
  2788. }, this)
  2789. return set
  2790. }
  2791. Range.prototype.intersects = function (range, options) {
  2792. if (!(range instanceof Range)) {
  2793. throw new TypeError('a Range is required')
  2794. }
  2795. return this.set.some(function (thisComparators) {
  2796. return thisComparators.every(function (thisComparator) {
  2797. return range.set.some(function (rangeComparators) {
  2798. return rangeComparators.every(function (rangeComparator) {
  2799. return thisComparator.intersects(rangeComparator, options)
  2800. })
  2801. })
  2802. })
  2803. })
  2804. }
  2805. // Mostly just for testing and legacy API reasons
  2806. exports.toComparators = toComparators
  2807. function toComparators (range, options) {
  2808. return new Range(range, options).set.map(function (comp) {
  2809. return comp.map(function (c) {
  2810. return c.value
  2811. }).join(' ').trim().split(' ')
  2812. })
  2813. }
  2814. // comprised of xranges, tildes, stars, and gtlt's at this point.
  2815. // already replaced the hyphen ranges
  2816. // turn into a set of JUST comparators.
  2817. function parseComparator (comp, options) {
  2818. debug('comp', comp, options)
  2819. comp = replaceCarets(comp, options)
  2820. debug('caret', comp)
  2821. comp = replaceTildes(comp, options)
  2822. debug('tildes', comp)
  2823. comp = replaceXRanges(comp, options)
  2824. debug('xrange', comp)
  2825. comp = replaceStars(comp, options)
  2826. debug('stars', comp)
  2827. return comp
  2828. }
  2829. function isX (id) {
  2830. return !id || id.toLowerCase() === 'x' || id === '*'
  2831. }
  2832. // ~, ~> --> * (any, kinda silly)
  2833. // ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0
  2834. // ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0
  2835. // ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0
  2836. // ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0
  2837. // ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0
  2838. function replaceTildes (comp, options) {
  2839. return comp.trim().split(/\s+/).map(function (comp) {
  2840. return replaceTilde(comp, options)
  2841. }).join(' ')
  2842. }
  2843. function replaceTilde (comp, options) {
  2844. var r = options.loose ? re[TILDELOOSE] : re[TILDE]
  2845. return comp.replace(r, function (_, M, m, p, pr) {
  2846. debug('tilde', comp, _, M, m, p, pr)
  2847. var ret
  2848. if (isX(M)) {
  2849. ret = ''
  2850. } else if (isX(m)) {
  2851. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
  2852. } else if (isX(p)) {
  2853. // ~1.2 == >=1.2.0 <1.3.0
  2854. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
  2855. } else if (pr) {
  2856. debug('replaceTilde pr', pr)
  2857. ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
  2858. ' <' + M + '.' + (+m + 1) + '.0'
  2859. } else {
  2860. // ~1.2.3 == >=1.2.3 <1.3.0
  2861. ret = '>=' + M + '.' + m + '.' + p +
  2862. ' <' + M + '.' + (+m + 1) + '.0'
  2863. }
  2864. debug('tilde return', ret)
  2865. return ret
  2866. })
  2867. }
  2868. // ^ --> * (any, kinda silly)
  2869. // ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0
  2870. // ^2.0, ^2.0.x --> >=2.0.0 <3.0.0
  2871. // ^1.2, ^1.2.x --> >=1.2.0 <2.0.0
  2872. // ^1.2.3 --> >=1.2.3 <2.0.0
  2873. // ^1.2.0 --> >=1.2.0 <2.0.0
  2874. function replaceCarets (comp, options) {
  2875. return comp.trim().split(/\s+/).map(function (comp) {
  2876. return replaceCaret(comp, options)
  2877. }).join(' ')
  2878. }
  2879. function replaceCaret (comp, options) {
  2880. debug('caret', comp, options)
  2881. var r = options.loose ? re[CARETLOOSE] : re[CARET]
  2882. return comp.replace(r, function (_, M, m, p, pr) {
  2883. debug('caret', comp, _, M, m, p, pr)
  2884. var ret
  2885. if (isX(M)) {
  2886. ret = ''
  2887. } else if (isX(m)) {
  2888. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
  2889. } else if (isX(p)) {
  2890. if (M === '0') {
  2891. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
  2892. } else {
  2893. ret = '>=' + M + '.' + m + '.0 <' + (+M + 1) + '.0.0'
  2894. }
  2895. } else if (pr) {
  2896. debug('replaceCaret pr', pr)
  2897. if (M === '0') {
  2898. if (m === '0') {
  2899. ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
  2900. ' <' + M + '.' + m + '.' + (+p + 1)
  2901. } else {
  2902. ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
  2903. ' <' + M + '.' + (+m + 1) + '.0'
  2904. }
  2905. } else {
  2906. ret = '>=' + M + '.' + m + '.' + p + '-' + pr +
  2907. ' <' + (+M + 1) + '.0.0'
  2908. }
  2909. } else {
  2910. debug('no pr')
  2911. if (M === '0') {
  2912. if (m === '0') {
  2913. ret = '>=' + M + '.' + m + '.' + p +
  2914. ' <' + M + '.' + m + '.' + (+p + 1)
  2915. } else {
  2916. ret = '>=' + M + '.' + m + '.' + p +
  2917. ' <' + M + '.' + (+m + 1) + '.0'
  2918. }
  2919. } else {
  2920. ret = '>=' + M + '.' + m + '.' + p +
  2921. ' <' + (+M + 1) + '.0.0'
  2922. }
  2923. }
  2924. debug('caret return', ret)
  2925. return ret
  2926. })
  2927. }
  2928. function replaceXRanges (comp, options) {
  2929. debug('replaceXRanges', comp, options)
  2930. return comp.split(/\s+/).map(function (comp) {
  2931. return replaceXRange(comp, options)
  2932. }).join(' ')
  2933. }
  2934. function replaceXRange (comp, options) {
  2935. comp = comp.trim()
  2936. var r = options.loose ? re[XRANGELOOSE] : re[XRANGE]
  2937. return comp.replace(r, function (ret, gtlt, M, m, p, pr) {
  2938. debug('xRange', comp, ret, gtlt, M, m, p, pr)
  2939. var xM = isX(M)
  2940. var xm = xM || isX(m)
  2941. var xp = xm || isX(p)
  2942. var anyX = xp
  2943. if (gtlt === '=' && anyX) {
  2944. gtlt = ''
  2945. }
  2946. if (xM) {
  2947. if (gtlt === '>' || gtlt === '<') {
  2948. // nothing is allowed
  2949. ret = '<0.0.0'
  2950. } else {
  2951. // nothing is forbidden
  2952. ret = '*'
  2953. }
  2954. } else if (gtlt && anyX) {
  2955. // we know patch is an x, because we have any x at all.
  2956. // replace X with 0
  2957. if (xm) {
  2958. m = 0
  2959. }
  2960. p = 0
  2961. if (gtlt === '>') {
  2962. // >1 => >=2.0.0
  2963. // >1.2 => >=1.3.0
  2964. // >1.2.3 => >= 1.2.4
  2965. gtlt = '>='
  2966. if (xm) {
  2967. M = +M + 1
  2968. m = 0
  2969. p = 0
  2970. } else {
  2971. m = +m + 1
  2972. p = 0
  2973. }
  2974. } else if (gtlt === '<=') {
  2975. // <=0.7.x is actually <0.8.0, since any 0.7.x should
  2976. // pass. Similarly, <=7.x is actually <8.0.0, etc.
  2977. gtlt = '<'
  2978. if (xm) {
  2979. M = +M + 1
  2980. } else {
  2981. m = +m + 1
  2982. }
  2983. }
  2984. ret = gtlt + M + '.' + m + '.' + p
  2985. } else if (xm) {
  2986. ret = '>=' + M + '.0.0 <' + (+M + 1) + '.0.0'
  2987. } else if (xp) {
  2988. ret = '>=' + M + '.' + m + '.0 <' + M + '.' + (+m + 1) + '.0'
  2989. }
  2990. debug('xRange return', ret)
  2991. return ret
  2992. })
  2993. }
  2994. // Because * is AND-ed with everything else in the comparator,
  2995. // and '' means "any version", just remove the *s entirely.
  2996. function replaceStars (comp, options) {
  2997. debug('replaceStars', comp, options)
  2998. // Looseness is ignored here. star is always as loose as it gets!
  2999. return comp.trim().replace(re[STAR], '')
  3000. }
  3001. // This function is passed to string.replace(re[HYPHENRANGE])
  3002. // M, m, patch, prerelease, build
  3003. // 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
  3004. // 1.2.3 - 3.4 => >=1.2.0 <3.5.0 Any 3.4.x will do
  3005. // 1.2 - 3.4 => >=1.2.0 <3.5.0
  3006. function hyphenReplace ($0,
  3007. from, fM, fm, fp, fpr, fb,
  3008. to, tM, tm, tp, tpr, tb) {
  3009. if (isX(fM)) {
  3010. from = ''
  3011. } else if (isX(fm)) {
  3012. from = '>=' + fM + '.0.0'
  3013. } else if (isX(fp)) {
  3014. from = '>=' + fM + '.' + fm + '.0'
  3015. } else {
  3016. from = '>=' + from
  3017. }
  3018. if (isX(tM)) {
  3019. to = ''
  3020. } else if (isX(tm)) {
  3021. to = '<' + (+tM + 1) + '.0.0'
  3022. } else if (isX(tp)) {
  3023. to = '<' + tM + '.' + (+tm + 1) + '.0'
  3024. } else if (tpr) {
  3025. to = '<=' + tM + '.' + tm + '.' + tp + '-' + tpr
  3026. } else {
  3027. to = '<=' + to
  3028. }
  3029. return (from + ' ' + to).trim()
  3030. }
  3031. // if ANY of the sets match ALL of its comparators, then pass
  3032. Range.prototype.test = function (version) {
  3033. if (!version) {
  3034. return false
  3035. }
  3036. if (typeof version === 'string') {
  3037. version = new SemVer(version, this.options)
  3038. }
  3039. for (var i = 0; i < this.set.length; i++) {
  3040. if (testSet(this.set[i], version, this.options)) {
  3041. return true
  3042. }
  3043. }
  3044. return false
  3045. }
  3046. function testSet (set, version, options) {
  3047. for (var i = 0; i < set.length; i++) {
  3048. if (!set[i].test(version)) {
  3049. return false
  3050. }
  3051. }
  3052. if (version.prerelease.length && !options.includePrerelease) {
  3053. // Find the set of versions that are allowed to have prereleases
  3054. // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
  3055. // That should allow `1.2.3-pr.2` to pass.
  3056. // However, `1.2.4-alpha.notready` should NOT be allowed,
  3057. // even though it's within the range set by the comparators.
  3058. for (i = 0; i < set.length; i++) {
  3059. debug(set[i].semver)
  3060. if (set[i].semver === ANY) {
  3061. continue
  3062. }
  3063. if (set[i].semver.prerelease.length > 0) {
  3064. var allowed = set[i].semver
  3065. if (allowed.major === version.major &&
  3066. allowed.minor === version.minor &&
  3067. allowed.patch === version.patch) {
  3068. return true
  3069. }
  3070. }
  3071. }
  3072. // Version has a -pre, but it's not one of the ones we like.
  3073. return false
  3074. }
  3075. return true
  3076. }
  3077. exports.satisfies = satisfies
  3078. function satisfies (version, range, options) {
  3079. try {
  3080. range = new Range(range, options)
  3081. } catch (er) {
  3082. return false
  3083. }
  3084. return range.test(version)
  3085. }
  3086. exports.maxSatisfying = maxSatisfying
  3087. function maxSatisfying (versions, range, options) {
  3088. var max = null
  3089. var maxSV = null
  3090. try {
  3091. var rangeObj = new Range(range, options)
  3092. } catch (er) {
  3093. return null
  3094. }
  3095. versions.forEach(function (v) {
  3096. if (rangeObj.test(v)) {
  3097. // satisfies(v, range, options)
  3098. if (!max || maxSV.compare(v) === -1) {
  3099. // compare(max, v, true)
  3100. max = v
  3101. maxSV = new SemVer(max, options)
  3102. }
  3103. }
  3104. })
  3105. return max
  3106. }
  3107. exports.minSatisfying = minSatisfying
  3108. function minSatisfying (versions, range, options) {
  3109. var min = null
  3110. var minSV = null
  3111. try {
  3112. var rangeObj = new Range(range, options)
  3113. } catch (er) {
  3114. return null
  3115. }
  3116. versions.forEach(function (v) {
  3117. if (rangeObj.test(v)) {
  3118. // satisfies(v, range, options)
  3119. if (!min || minSV.compare(v) === 1) {
  3120. // compare(min, v, true)
  3121. min = v
  3122. minSV = new SemVer(min, options)
  3123. }
  3124. }
  3125. })
  3126. return min
  3127. }
  3128. exports.minVersion = minVersion
  3129. function minVersion (range, loose) {
  3130. range = new Range(range, loose)
  3131. var minver = new SemVer('0.0.0')
  3132. if (range.test(minver)) {
  3133. return minver
  3134. }
  3135. minver = new SemVer('0.0.0-0')
  3136. if (range.test(minver)) {
  3137. return minver
  3138. }
  3139. minver = null
  3140. for (var i = 0; i < range.set.length; ++i) {
  3141. var comparators = range.set[i]
  3142. comparators.forEach(function (comparator) {
  3143. // Clone to avoid manipulating the comparator's semver object.
  3144. var compver = new SemVer(comparator.semver.version)
  3145. switch (comparator.operator) {
  3146. case '>':
  3147. if (compver.prerelease.length === 0) {
  3148. compver.patch++
  3149. } else {
  3150. compver.prerelease.push(0)
  3151. }
  3152. compver.raw = compver.format()
  3153. /* fallthrough */
  3154. case '':
  3155. case '>=':
  3156. if (!minver || gt(minver, compver)) {
  3157. minver = compver
  3158. }
  3159. break
  3160. case '<':
  3161. case '<=':
  3162. /* Ignore maximum versions */
  3163. break
  3164. /* istanbul ignore next */
  3165. default:
  3166. throw new Error('Unexpected operation: ' + comparator.operator)
  3167. }
  3168. })
  3169. }
  3170. if (minver && range.test(minver)) {
  3171. return minver
  3172. }
  3173. return null
  3174. }
  3175. exports.validRange = validRange
  3176. function validRange (range, options) {
  3177. try {
  3178. // Return '*' instead of '' so that truthiness works.
  3179. // This will throw if it's invalid anyway
  3180. return new Range(range, options).range || '*'
  3181. } catch (er) {
  3182. return null
  3183. }
  3184. }
  3185. // Determine if version is less than all the versions possible in the range
  3186. exports.ltr = ltr
  3187. function ltr (version, range, options) {
  3188. return outside(version, range, '<', options)
  3189. }
  3190. // Determine if version is greater than all the versions possible in the range.
  3191. exports.gtr = gtr
  3192. function gtr (version, range, options) {
  3193. return outside(version, range, '>', options)
  3194. }
  3195. exports.outside = outside
  3196. function outside (version, range, hilo, options) {
  3197. version = new SemVer(version, options)
  3198. range = new Range(range, options)
  3199. var gtfn, ltefn, ltfn, comp, ecomp
  3200. switch (hilo) {
  3201. case '>':
  3202. gtfn = gt
  3203. ltefn = lte
  3204. ltfn = lt
  3205. comp = '>'
  3206. ecomp = '>='
  3207. break
  3208. case '<':
  3209. gtfn = lt
  3210. ltefn = gte
  3211. ltfn = gt
  3212. comp = '<'
  3213. ecomp = '<='
  3214. break
  3215. default:
  3216. throw new TypeError('Must provide a hilo val of "<" or ">"')
  3217. }
  3218. // If it satisifes the range it is not outside
  3219. if (satisfies(version, range, options)) {
  3220. return false
  3221. }
  3222. // From now on, variable terms are as if we're in "gtr" mode.
  3223. // but note that everything is flipped for the "ltr" function.
  3224. for (var i = 0; i < range.set.length; ++i) {
  3225. var comparators = range.set[i]
  3226. var high = null
  3227. var low = null
  3228. comparators.forEach(function (comparator) {
  3229. if (comparator.semver === ANY) {
  3230. comparator = new Comparator('>=0.0.0')
  3231. }
  3232. high = high || comparator
  3233. low = low || comparator
  3234. if (gtfn(comparator.semver, high.semver, options)) {
  3235. high = comparator
  3236. } else if (ltfn(comparator.semver, low.semver, options)) {
  3237. low = comparator
  3238. }
  3239. })
  3240. // If the edge version comparator has a operator then our version
  3241. // isn't outside it
  3242. if (high.operator === comp || high.operator === ecomp) {
  3243. return false
  3244. }
  3245. // If the lowest version comparator has an operator and our version
  3246. // is less than it then it isn't higher than the range
  3247. if ((!low.operator || low.operator === comp) &&
  3248. ltefn(version, low.semver)) {
  3249. return false
  3250. } else if (low.operator === ecomp && ltfn(version, low.semver)) {
  3251. return false
  3252. }
  3253. }
  3254. return true
  3255. }
  3256. exports.prerelease = prerelease
  3257. function prerelease (version, options) {
  3258. var parsed = parse(version, options)
  3259. return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
  3260. }
  3261. exports.intersects = intersects
  3262. function intersects (r1, r2, options) {
  3263. r1 = new Range(r1, options)
  3264. r2 = new Range(r2, options)
  3265. return r1.intersects(r2)
  3266. }
  3267. exports.coerce = coerce
  3268. function coerce (version) {
  3269. if (version instanceof SemVer) {
  3270. return version
  3271. }
  3272. if (typeof version !== 'string') {
  3273. return null
  3274. }
  3275. var match = version.match(re[COERCE])
  3276. if (match == null) {
  3277. return null
  3278. }
  3279. return parse(match[1] +
  3280. '.' + (match[2] || '0') +
  3281. '.' + (match[3] || '0'))
  3282. }
  3283. /***/ }),
  3284. /***/ 293:
  3285. /***/ (function(module, __unusedexports, __webpack_require__) {
  3286. module.exports = authenticationRequestError;
  3287. const { RequestError } = __webpack_require__(497);
  3288. function authenticationRequestError(state, error, options) {
  3289. if (!error.headers) throw error;
  3290. const otpRequired = /required/.test(error.headers["x-github-otp"] || "");
  3291. // handle "2FA required" error only
  3292. if (error.status !== 401 || !otpRequired) {
  3293. throw error;
  3294. }
  3295. if (
  3296. error.status === 401 &&
  3297. otpRequired &&
  3298. error.request &&
  3299. error.request.headers["x-github-otp"]
  3300. ) {
  3301. if (state.otp) {
  3302. delete state.otp; // no longer valid, request again
  3303. } else {
  3304. throw new RequestError(
  3305. "Invalid one-time password for two-factor authentication",
  3306. 401,
  3307. {
  3308. headers: error.headers,
  3309. request: options
  3310. }
  3311. );
  3312. }
  3313. }
  3314. if (typeof state.auth.on2fa !== "function") {
  3315. throw new RequestError(
  3316. "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication",
  3317. 401,
  3318. {
  3319. headers: error.headers,
  3320. request: options
  3321. }
  3322. );
  3323. }
  3324. return Promise.resolve()
  3325. .then(() => {
  3326. return state.auth.on2fa();
  3327. })
  3328. .then(oneTimePassword => {
  3329. const newOptions = Object.assign(options, {
  3330. headers: Object.assign(options.headers, {
  3331. "x-github-otp": oneTimePassword
  3332. })
  3333. });
  3334. return state.octokit.request(newOptions).then(response => {
  3335. // If OTP still valid, then persist it for following requests
  3336. state.otp = oneTimePassword;
  3337. return response;
  3338. });
  3339. });
  3340. }
  3341. /***/ }),
  3342. /***/ 294:
  3343. /***/ (function(module, __unusedexports, __webpack_require__) {
  3344. module.exports = parseOptions;
  3345. const { Deprecation } = __webpack_require__(692);
  3346. const { getUserAgent } = __webpack_require__(619);
  3347. const once = __webpack_require__(969);
  3348. const pkg = __webpack_require__(215);
  3349. const deprecateOptionsTimeout = once((log, deprecation) =>
  3350. log.warn(deprecation)
  3351. );
  3352. const deprecateOptionsAgent = once((log, deprecation) => log.warn(deprecation));
  3353. const deprecateOptionsHeaders = once((log, deprecation) =>
  3354. log.warn(deprecation)
  3355. );
  3356. function parseOptions(options, log, hook) {
  3357. if (options.headers) {
  3358. options.headers = Object.keys(options.headers).reduce((newObj, key) => {
  3359. newObj[key.toLowerCase()] = options.headers[key];
  3360. return newObj;
  3361. }, {});
  3362. }
  3363. const clientDefaults = {
  3364. headers: options.headers || {},
  3365. request: options.request || {},
  3366. mediaType: {
  3367. previews: [],
  3368. format: ""
  3369. }
  3370. };
  3371. if (options.baseUrl) {
  3372. clientDefaults.baseUrl = options.baseUrl;
  3373. }
  3374. if (options.userAgent) {
  3375. clientDefaults.headers["user-agent"] = options.userAgent;
  3376. }
  3377. if (options.previews) {
  3378. clientDefaults.mediaType.previews = options.previews;
  3379. }
  3380. if (options.timeZone) {
  3381. clientDefaults.headers["time-zone"] = options.timeZone;
  3382. }
  3383. if (options.timeout) {
  3384. deprecateOptionsTimeout(
  3385. log,
  3386. new Deprecation(
  3387. "[@octokit/rest] new Octokit({timeout}) is deprecated. Use {request: {timeout}} instead. See https://github.com/octokit/request.js#request"
  3388. )
  3389. );
  3390. clientDefaults.request.timeout = options.timeout;
  3391. }
  3392. if (options.agent) {
  3393. deprecateOptionsAgent(
  3394. log,
  3395. new Deprecation(
  3396. "[@octokit/rest] new Octokit({agent}) is deprecated. Use {request: {agent}} instead. See https://github.com/octokit/request.js#request"
  3397. )
  3398. );
  3399. clientDefaults.request.agent = options.agent;
  3400. }
  3401. if (options.headers) {
  3402. deprecateOptionsHeaders(
  3403. log,
  3404. new Deprecation(
  3405. "[@octokit/rest] new Octokit({headers}) is deprecated. Use {userAgent, previews} instead. See https://github.com/octokit/request.js#request"
  3406. )
  3407. );
  3408. }
  3409. const userAgentOption = clientDefaults.headers["user-agent"];
  3410. const defaultUserAgent = `octokit.js/${pkg.version} ${getUserAgent()}`;
  3411. clientDefaults.headers["user-agent"] = [userAgentOption, defaultUserAgent]
  3412. .filter(Boolean)
  3413. .join(" ");
  3414. clientDefaults.request.hook = hook.bind(null, "request");
  3415. return clientDefaults;
  3416. }
  3417. /***/ }),
  3418. /***/ 297:
  3419. /***/ (function(module) {
  3420. module.exports = class HttpError extends Error {
  3421. constructor (message, code, headers) {
  3422. super(message)
  3423. // Maintains proper stack trace (only available on V8)
  3424. /* istanbul ignore next */
  3425. if (Error.captureStackTrace) {
  3426. Error.captureStackTrace(this, this.constructor)
  3427. }
  3428. this.name = 'HttpError'
  3429. this.code = code
  3430. this.headers = headers
  3431. }
  3432. }
  3433. /***/ }),
  3434. /***/ 299:
  3435. /***/ (function(__unusedmodule, exports) {
  3436. "use strict";
  3437. Object.defineProperty(exports, '__esModule', { value: true });
  3438. const VERSION = "1.1.2";
  3439. /**
  3440. * Some “list” response that can be paginated have a different response structure
  3441. *
  3442. * They have a `total_count` key in the response (search also has `incomplete_results`,
  3443. * /installation/repositories also has `repository_selection`), as well as a key with
  3444. * the list of the items which name varies from endpoint to endpoint:
  3445. *
  3446. * - https://developer.github.com/v3/search/#example (key `items`)
  3447. * - https://developer.github.com/v3/checks/runs/#response-3 (key: `check_runs`)
  3448. * - https://developer.github.com/v3/checks/suites/#response-1 (key: `check_suites`)
  3449. * - https://developer.github.com/v3/apps/installations/#list-repositories (key: `repositories`)
  3450. * - https://developer.github.com/v3/apps/installations/#list-installations-for-a-user (key `installations`)
  3451. *
  3452. * Octokit normalizes these responses so that paginated results are always returned following
  3453. * the same structure. One challenge is that if the list response has only one page, no Link
  3454. * header is provided, so this header alone is not sufficient to check wether a response is
  3455. * paginated or not. For the exceptions with the namespace, a fallback check for the route
  3456. * paths has to be added in order to normalize the response. We cannot check for the total_count
  3457. * property because it also exists in the response of Get the combined status for a specific ref.
  3458. */
  3459. const REGEX = [/^\/search\//, /^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)([^/]|$)/, /^\/installation\/repositories([^/]|$)/, /^\/user\/installations([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/secrets([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/workflows(\/[^/]+\/runs)?([^/]|$)/, /^\/repos\/[^/]+\/[^/]+\/actions\/runs(\/[^/]+\/(artifacts|jobs))?([^/]|$)/];
  3460. function normalizePaginatedListResponse(octokit, url, response) {
  3461. const path = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, "");
  3462. const responseNeedsNormalization = REGEX.find(regex => regex.test(path));
  3463. if (!responseNeedsNormalization) return; // keep the additional properties intact as there is currently no other way
  3464. // to retrieve the same information.
  3465. const incompleteResults = response.data.incomplete_results;
  3466. const repositorySelection = response.data.repository_selection;
  3467. const totalCount = response.data.total_count;
  3468. delete response.data.incomplete_results;
  3469. delete response.data.repository_selection;
  3470. delete response.data.total_count;
  3471. const namespaceKey = Object.keys(response.data)[0];
  3472. const data = response.data[namespaceKey];
  3473. response.data = data;
  3474. if (typeof incompleteResults !== "undefined") {
  3475. response.data.incomplete_results = incompleteResults;
  3476. }
  3477. if (typeof repositorySelection !== "undefined") {
  3478. response.data.repository_selection = repositorySelection;
  3479. }
  3480. response.data.total_count = totalCount;
  3481. Object.defineProperty(response.data, namespaceKey, {
  3482. get() {
  3483. octokit.log.warn(`[@octokit/paginate-rest] "response.data.${namespaceKey}" is deprecated for "GET ${path}". Get the results directly from "response.data"`);
  3484. return Array.from(data);
  3485. }
  3486. });
  3487. }
  3488. function iterator(octokit, route, parameters) {
  3489. const options = octokit.request.endpoint(route, parameters);
  3490. const method = options.method;
  3491. const headers = options.headers;
  3492. let url = options.url;
  3493. return {
  3494. [Symbol.asyncIterator]: () => ({
  3495. next() {
  3496. if (!url) {
  3497. return Promise.resolve({
  3498. done: true
  3499. });
  3500. }
  3501. return octokit.request({
  3502. method,
  3503. url,
  3504. headers
  3505. }).then(response => {
  3506. normalizePaginatedListResponse(octokit, url, response); // `response.headers.link` format:
  3507. // '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
  3508. // sets `url` to undefined if "next" URL is not present or `link` header is not set
  3509. url = ((response.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
  3510. return {
  3511. value: response
  3512. };
  3513. });
  3514. }
  3515. })
  3516. };
  3517. }
  3518. function paginate(octokit, route, parameters, mapFn) {
  3519. if (typeof parameters === "function") {
  3520. mapFn = parameters;
  3521. parameters = undefined;
  3522. }
  3523. return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
  3524. }
  3525. function gather(octokit, results, iterator, mapFn) {
  3526. return iterator.next().then(result => {
  3527. if (result.done) {
  3528. return results;
  3529. }
  3530. let earlyExit = false;
  3531. function done() {
  3532. earlyExit = true;
  3533. }
  3534. results = results.concat(mapFn ? mapFn(result.value, done) : result.value.data);
  3535. if (earlyExit) {
  3536. return results;
  3537. }
  3538. return gather(octokit, results, iterator, mapFn);
  3539. });
  3540. }
  3541. /**
  3542. * @param octokit Octokit instance
  3543. * @param options Options passed to Octokit constructor
  3544. */
  3545. function paginateRest(octokit) {
  3546. return {
  3547. paginate: Object.assign(paginate.bind(null, octokit), {
  3548. iterator: iterator.bind(null, octokit)
  3549. })
  3550. };
  3551. }
  3552. paginateRest.VERSION = VERSION;
  3553. exports.paginateRest = paginateRest;
  3554. //# sourceMappingURL=index.js.map
  3555. /***/ }),
  3556. /***/ 323:
  3557. /***/ (function(module) {
  3558. "use strict";
  3559. var isStream = module.exports = function (stream) {
  3560. return stream !== null && typeof stream === 'object' && typeof stream.pipe === 'function';
  3561. };
  3562. isStream.writable = function (stream) {
  3563. return isStream(stream) && stream.writable !== false && typeof stream._write === 'function' && typeof stream._writableState === 'object';
  3564. };
  3565. isStream.readable = function (stream) {
  3566. return isStream(stream) && stream.readable !== false && typeof stream._read === 'function' && typeof stream._readableState === 'object';
  3567. };
  3568. isStream.duplex = function (stream) {
  3569. return isStream.writable(stream) && isStream.readable(stream);
  3570. };
  3571. isStream.transform = function (stream) {
  3572. return isStream.duplex(stream) && typeof stream._transform === 'function' && typeof stream._transformState === 'object';
  3573. };
  3574. /***/ }),
  3575. /***/ 336:
  3576. /***/ (function(module, __unusedexports, __webpack_require__) {
  3577. module.exports = hasLastPage
  3578. const deprecate = __webpack_require__(370)
  3579. const getPageLinks = __webpack_require__(577)
  3580. function hasLastPage (link) {
  3581. deprecate(`octokit.hasLastPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`)
  3582. return getPageLinks(link).last
  3583. }
  3584. /***/ }),
  3585. /***/ 348:
  3586. /***/ (function(module, __unusedexports, __webpack_require__) {
  3587. "use strict";
  3588. module.exports = validate;
  3589. const { RequestError } = __webpack_require__(497);
  3590. const get = __webpack_require__(854);
  3591. const set = __webpack_require__(883);
  3592. function validate(octokit, options) {
  3593. if (!options.request.validate) {
  3594. return;
  3595. }
  3596. const { validate: params } = options.request;
  3597. Object.keys(params).forEach(parameterName => {
  3598. const parameter = get(params, parameterName);
  3599. const expectedType = parameter.type;
  3600. let parentParameterName;
  3601. let parentValue;
  3602. let parentParamIsPresent = true;
  3603. let parentParameterIsArray = false;
  3604. if (/\./.test(parameterName)) {
  3605. parentParameterName = parameterName.replace(/\.[^.]+$/, "");
  3606. parentParameterIsArray = parentParameterName.slice(-2) === "[]";
  3607. if (parentParameterIsArray) {
  3608. parentParameterName = parentParameterName.slice(0, -2);
  3609. }
  3610. parentValue = get(options, parentParameterName);
  3611. parentParamIsPresent =
  3612. parentParameterName === "headers" ||
  3613. (typeof parentValue === "object" && parentValue !== null);
  3614. }
  3615. const values = parentParameterIsArray
  3616. ? (get(options, parentParameterName) || []).map(
  3617. value => value[parameterName.split(/\./).pop()]
  3618. )
  3619. : [get(options, parameterName)];
  3620. values.forEach((value, i) => {
  3621. const valueIsPresent = typeof value !== "undefined";
  3622. const valueIsNull = value === null;
  3623. const currentParameterName = parentParameterIsArray
  3624. ? parameterName.replace(/\[\]/, `[${i}]`)
  3625. : parameterName;
  3626. if (!parameter.required && !valueIsPresent) {
  3627. return;
  3628. }
  3629. // if the parent parameter is of type object but allows null
  3630. // then the child parameters can be ignored
  3631. if (!parentParamIsPresent) {
  3632. return;
  3633. }
  3634. if (parameter.allowNull && valueIsNull) {
  3635. return;
  3636. }
  3637. if (!parameter.allowNull && valueIsNull) {
  3638. throw new RequestError(
  3639. `'${currentParameterName}' cannot be null`,
  3640. 400,
  3641. {
  3642. request: options
  3643. }
  3644. );
  3645. }
  3646. if (parameter.required && !valueIsPresent) {
  3647. throw new RequestError(
  3648. `Empty value for parameter '${currentParameterName}': ${JSON.stringify(
  3649. value
  3650. )}`,
  3651. 400,
  3652. {
  3653. request: options
  3654. }
  3655. );
  3656. }
  3657. // parse to integer before checking for enum
  3658. // so that string "1" will match enum with number 1
  3659. if (expectedType === "integer") {
  3660. const unparsedValue = value;
  3661. value = parseInt(value, 10);
  3662. if (isNaN(value)) {
  3663. throw new RequestError(
  3664. `Invalid value for parameter '${currentParameterName}': ${JSON.stringify(
  3665. unparsedValue
  3666. )} is NaN`,
  3667. 400,
  3668. {
  3669. request: options
  3670. }
  3671. );
  3672. }
  3673. }
  3674. if (parameter.enum && parameter.enum.indexOf(String(value)) === -1) {
  3675. throw new RequestError(
  3676. `Invalid value for parameter '${currentParameterName}': ${JSON.stringify(
  3677. value
  3678. )}`,
  3679. 400,
  3680. {
  3681. request: options
  3682. }
  3683. );
  3684. }
  3685. if (parameter.validation) {
  3686. const regex = new RegExp(parameter.validation);
  3687. if (!regex.test(value)) {
  3688. throw new RequestError(
  3689. `Invalid value for parameter '${currentParameterName}': ${JSON.stringify(
  3690. value
  3691. )}`,
  3692. 400,
  3693. {
  3694. request: options
  3695. }
  3696. );
  3697. }
  3698. }
  3699. if (expectedType === "object" && typeof value === "string") {
  3700. try {
  3701. value = JSON.parse(value);
  3702. } catch (exception) {
  3703. throw new RequestError(
  3704. `JSON parse error of value for parameter '${currentParameterName}': ${JSON.stringify(
  3705. value
  3706. )}`,
  3707. 400,
  3708. {
  3709. request: options
  3710. }
  3711. );
  3712. }
  3713. }
  3714. set(options, parameter.mapTo || currentParameterName, value);
  3715. });
  3716. });
  3717. return options;
  3718. }
  3719. /***/ }),
  3720. /***/ 349:
  3721. /***/ (function(module, __unusedexports, __webpack_require__) {
  3722. module.exports = authenticationRequestError;
  3723. const { RequestError } = __webpack_require__(497);
  3724. function authenticationRequestError(state, error, options) {
  3725. /* istanbul ignore next */
  3726. if (!error.headers) throw error;
  3727. const otpRequired = /required/.test(error.headers["x-github-otp"] || "");
  3728. // handle "2FA required" error only
  3729. if (error.status !== 401 || !otpRequired) {
  3730. throw error;
  3731. }
  3732. if (
  3733. error.status === 401 &&
  3734. otpRequired &&
  3735. error.request &&
  3736. error.request.headers["x-github-otp"]
  3737. ) {
  3738. throw new RequestError(
  3739. "Invalid one-time password for two-factor authentication",
  3740. 401,
  3741. {
  3742. headers: error.headers,
  3743. request: options
  3744. }
  3745. );
  3746. }
  3747. if (typeof state.auth.on2fa !== "function") {
  3748. throw new RequestError(
  3749. "2FA required, but options.on2fa is not a function. See https://github.com/octokit/rest.js#authentication",
  3750. 401,
  3751. {
  3752. headers: error.headers,
  3753. request: options
  3754. }
  3755. );
  3756. }
  3757. return Promise.resolve()
  3758. .then(() => {
  3759. return state.auth.on2fa();
  3760. })
  3761. .then(oneTimePassword => {
  3762. const newOptions = Object.assign(options, {
  3763. headers: Object.assign(
  3764. { "x-github-otp": oneTimePassword },
  3765. options.headers
  3766. )
  3767. });
  3768. return state.octokit.request(newOptions);
  3769. });
  3770. }
  3771. /***/ }),
  3772. /***/ 357:
  3773. /***/ (function(module) {
  3774. module.exports = require("assert");
  3775. /***/ }),
  3776. /***/ 363:
  3777. /***/ (function(module) {
  3778. module.exports = register
  3779. function register (state, name, method, options) {
  3780. if (typeof method !== 'function') {
  3781. throw new Error('method for before hook must be a function')
  3782. }
  3783. if (!options) {
  3784. options = {}
  3785. }
  3786. if (Array.isArray(name)) {
  3787. return name.reverse().reduce(function (callback, name) {
  3788. return register.bind(null, state, name, callback, options)
  3789. }, method)()
  3790. }
  3791. return Promise.resolve()
  3792. .then(function () {
  3793. if (!state.registry[name]) {
  3794. return method(options)
  3795. }
  3796. return (state.registry[name]).reduce(function (method, registered) {
  3797. return registered.hook.bind(null, method, options)
  3798. }, method)()
  3799. })
  3800. }
  3801. /***/ }),
  3802. /***/ 368:
  3803. /***/ (function(module) {
  3804. module.exports = function atob(str) {
  3805. return Buffer.from(str, 'base64').toString('binary')
  3806. }
  3807. /***/ }),
  3808. /***/ 370:
  3809. /***/ (function(module) {
  3810. module.exports = deprecate
  3811. const loggedMessages = {}
  3812. function deprecate (message) {
  3813. if (loggedMessages[message]) {
  3814. return
  3815. }
  3816. console.warn(`DEPRECATED (@octokit/rest): ${message}`)
  3817. loggedMessages[message] = 1
  3818. }
  3819. /***/ }),
  3820. /***/ 385:
  3821. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  3822. "use strict";
  3823. Object.defineProperty(exports, '__esModule', { value: true });
  3824. function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
  3825. var isPlainObject = _interopDefault(__webpack_require__(696));
  3826. var universalUserAgent = __webpack_require__(796);
  3827. function lowercaseKeys(object) {
  3828. if (!object) {
  3829. return {};
  3830. }
  3831. return Object.keys(object).reduce((newObj, key) => {
  3832. newObj[key.toLowerCase()] = object[key];
  3833. return newObj;
  3834. }, {});
  3835. }
  3836. function mergeDeep(defaults, options) {
  3837. const result = Object.assign({}, defaults);
  3838. Object.keys(options).forEach(key => {
  3839. if (isPlainObject(options[key])) {
  3840. if (!(key in defaults)) Object.assign(result, {
  3841. [key]: options[key]
  3842. });else result[key] = mergeDeep(defaults[key], options[key]);
  3843. } else {
  3844. Object.assign(result, {
  3845. [key]: options[key]
  3846. });
  3847. }
  3848. });
  3849. return result;
  3850. }
  3851. function merge(defaults, route, options) {
  3852. if (typeof route === "string") {
  3853. let [method, url] = route.split(" ");
  3854. options = Object.assign(url ? {
  3855. method,
  3856. url
  3857. } : {
  3858. url: method
  3859. }, options);
  3860. } else {
  3861. options = Object.assign({}, route);
  3862. } // lowercase header names before merging with defaults to avoid duplicates
  3863. options.headers = lowercaseKeys(options.headers);
  3864. const mergedOptions = mergeDeep(defaults || {}, options); // mediaType.previews arrays are merged, instead of overwritten
  3865. if (defaults && defaults.mediaType.previews.length) {
  3866. mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(preview => !mergedOptions.mediaType.previews.includes(preview)).concat(mergedOptions.mediaType.previews);
  3867. }
  3868. mergedOptions.mediaType.previews = mergedOptions.mediaType.previews.map(preview => preview.replace(/-preview/, ""));
  3869. return mergedOptions;
  3870. }
  3871. function addQueryParameters(url, parameters) {
  3872. const separator = /\?/.test(url) ? "&" : "?";
  3873. const names = Object.keys(parameters);
  3874. if (names.length === 0) {
  3875. return url;
  3876. }
  3877. return url + separator + names.map(name => {
  3878. if (name === "q") {
  3879. return "q=" + parameters.q.split("+").map(encodeURIComponent).join("+");
  3880. }
  3881. return `${name}=${encodeURIComponent(parameters[name])}`;
  3882. }).join("&");
  3883. }
  3884. const urlVariableRegex = /\{[^}]+\}/g;
  3885. function removeNonChars(variableName) {
  3886. return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
  3887. }
  3888. function extractUrlVariableNames(url) {
  3889. const matches = url.match(urlVariableRegex);
  3890. if (!matches) {
  3891. return [];
  3892. }
  3893. return matches.map(removeNonChars).reduce((a, b) => a.concat(b), []);
  3894. }
  3895. function omit(object, keysToOmit) {
  3896. return Object.keys(object).filter(option => !keysToOmit.includes(option)).reduce((obj, key) => {
  3897. obj[key] = object[key];
  3898. return obj;
  3899. }, {});
  3900. }
  3901. // Based on https://github.com/bramstein/url-template, licensed under BSD
  3902. // TODO: create separate package.
  3903. //
  3904. // Copyright (c) 2012-2014, Bram Stein
  3905. // All rights reserved.
  3906. // Redistribution and use in source and binary forms, with or without
  3907. // modification, are permitted provided that the following conditions
  3908. // are met:
  3909. // 1. Redistributions of source code must retain the above copyright
  3910. // notice, this list of conditions and the following disclaimer.
  3911. // 2. Redistributions in binary form must reproduce the above copyright
  3912. // notice, this list of conditions and the following disclaimer in the
  3913. // documentation and/or other materials provided with the distribution.
  3914. // 3. The name of the author may not be used to endorse or promote products
  3915. // derived from this software without specific prior written permission.
  3916. // THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
  3917. // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  3918. // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
  3919. // EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
  3920. // INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  3921. // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  3922. // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  3923. // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  3924. // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  3925. // EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  3926. /* istanbul ignore file */
  3927. function encodeReserved(str) {
  3928. return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) {
  3929. if (!/%[0-9A-Fa-f]/.test(part)) {
  3930. part = encodeURI(part).replace(/%5B/g, "[").replace(/%5D/g, "]");
  3931. }
  3932. return part;
  3933. }).join("");
  3934. }
  3935. function encodeUnreserved(str) {
  3936. return encodeURIComponent(str).replace(/[!'()*]/g, function (c) {
  3937. return "%" + c.charCodeAt(0).toString(16).toUpperCase();
  3938. });
  3939. }
  3940. function encodeValue(operator, value, key) {
  3941. value = operator === "+" || operator === "#" ? encodeReserved(value) : encodeUnreserved(value);
  3942. if (key) {
  3943. return encodeUnreserved(key) + "=" + value;
  3944. } else {
  3945. return value;
  3946. }
  3947. }
  3948. function isDefined(value) {
  3949. return value !== undefined && value !== null;
  3950. }
  3951. function isKeyOperator(operator) {
  3952. return operator === ";" || operator === "&" || operator === "?";
  3953. }
  3954. function getValues(context, operator, key, modifier) {
  3955. var value = context[key],
  3956. result = [];
  3957. if (isDefined(value) && value !== "") {
  3958. if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
  3959. value = value.toString();
  3960. if (modifier && modifier !== "*") {
  3961. value = value.substring(0, parseInt(modifier, 10));
  3962. }
  3963. result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
  3964. } else {
  3965. if (modifier === "*") {
  3966. if (Array.isArray(value)) {
  3967. value.filter(isDefined).forEach(function (value) {
  3968. result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : ""));
  3969. });
  3970. } else {
  3971. Object.keys(value).forEach(function (k) {
  3972. if (isDefined(value[k])) {
  3973. result.push(encodeValue(operator, value[k], k));
  3974. }
  3975. });
  3976. }
  3977. } else {
  3978. const tmp = [];
  3979. if (Array.isArray(value)) {
  3980. value.filter(isDefined).forEach(function (value) {
  3981. tmp.push(encodeValue(operator, value));
  3982. });
  3983. } else {
  3984. Object.keys(value).forEach(function (k) {
  3985. if (isDefined(value[k])) {
  3986. tmp.push(encodeUnreserved(k));
  3987. tmp.push(encodeValue(operator, value[k].toString()));
  3988. }
  3989. });
  3990. }
  3991. if (isKeyOperator(operator)) {
  3992. result.push(encodeUnreserved(key) + "=" + tmp.join(","));
  3993. } else if (tmp.length !== 0) {
  3994. result.push(tmp.join(","));
  3995. }
  3996. }
  3997. }
  3998. } else {
  3999. if (operator === ";") {
  4000. if (isDefined(value)) {
  4001. result.push(encodeUnreserved(key));
  4002. }
  4003. } else if (value === "" && (operator === "&" || operator === "?")) {
  4004. result.push(encodeUnreserved(key) + "=");
  4005. } else if (value === "") {
  4006. result.push("");
  4007. }
  4008. }
  4009. return result;
  4010. }
  4011. function parseUrl(template) {
  4012. return {
  4013. expand: expand.bind(null, template)
  4014. };
  4015. }
  4016. function expand(template, context) {
  4017. var operators = ["+", "#", ".", "/", ";", "?", "&"];
  4018. return template.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g, function (_, expression, literal) {
  4019. if (expression) {
  4020. let operator = "";
  4021. const values = [];
  4022. if (operators.indexOf(expression.charAt(0)) !== -1) {
  4023. operator = expression.charAt(0);
  4024. expression = expression.substr(1);
  4025. }
  4026. expression.split(/,/g).forEach(function (variable) {
  4027. var tmp = /([^:\*]*)(?::(\d+)|(\*))?/.exec(variable);
  4028. values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));
  4029. });
  4030. if (operator && operator !== "+") {
  4031. var separator = ",";
  4032. if (operator === "?") {
  4033. separator = "&";
  4034. } else if (operator !== "#") {
  4035. separator = operator;
  4036. }
  4037. return (values.length !== 0 ? operator : "") + values.join(separator);
  4038. } else {
  4039. return values.join(",");
  4040. }
  4041. } else {
  4042. return encodeReserved(literal);
  4043. }
  4044. });
  4045. }
  4046. function parse(options) {
  4047. // https://fetch.spec.whatwg.org/#methods
  4048. let method = options.method.toUpperCase(); // replace :varname with {varname} to make it RFC 6570 compatible
  4049. let url = (options.url || "/").replace(/:([a-z]\w+)/g, "{+$1}");
  4050. let headers = Object.assign({}, options.headers);
  4051. let body;
  4052. let parameters = omit(options, ["method", "baseUrl", "url", "headers", "request", "mediaType"]); // extract variable names from URL to calculate remaining variables later
  4053. const urlVariableNames = extractUrlVariableNames(url);
  4054. url = parseUrl(url).expand(parameters);
  4055. if (!/^http/.test(url)) {
  4056. url = options.baseUrl + url;
  4057. }
  4058. const omittedParameters = Object.keys(options).filter(option => urlVariableNames.includes(option)).concat("baseUrl");
  4059. const remainingParameters = omit(parameters, omittedParameters);
  4060. const isBinaryRequset = /application\/octet-stream/i.test(headers.accept);
  4061. if (!isBinaryRequset) {
  4062. if (options.mediaType.format) {
  4063. // e.g. application/vnd.github.v3+json => application/vnd.github.v3.raw
  4064. headers.accept = headers.accept.split(/,/).map(preview => preview.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/, `application/vnd$1$2.${options.mediaType.format}`)).join(",");
  4065. }
  4066. if (options.mediaType.previews.length) {
  4067. const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
  4068. headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map(preview => {
  4069. const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
  4070. return `application/vnd.github.${preview}-preview${format}`;
  4071. }).join(",");
  4072. }
  4073. } // for GET/HEAD requests, set URL query parameters from remaining parameters
  4074. // for PATCH/POST/PUT/DELETE requests, set request body from remaining parameters
  4075. if (["GET", "HEAD"].includes(method)) {
  4076. url = addQueryParameters(url, remainingParameters);
  4077. } else {
  4078. if ("data" in remainingParameters) {
  4079. body = remainingParameters.data;
  4080. } else {
  4081. if (Object.keys(remainingParameters).length) {
  4082. body = remainingParameters;
  4083. } else {
  4084. headers["content-length"] = 0;
  4085. }
  4086. }
  4087. } // default content-type for JSON if body is set
  4088. if (!headers["content-type"] && typeof body !== "undefined") {
  4089. headers["content-type"] = "application/json; charset=utf-8";
  4090. } // GitHub expects 'content-length: 0' header for PUT/PATCH requests without body.
  4091. // fetch does not allow to set `content-length` header, but we can set body to an empty string
  4092. if (["PATCH", "PUT"].includes(method) && typeof body === "undefined") {
  4093. body = "";
  4094. } // Only return body/request keys if present
  4095. return Object.assign({
  4096. method,
  4097. url,
  4098. headers
  4099. }, typeof body !== "undefined" ? {
  4100. body
  4101. } : null, options.request ? {
  4102. request: options.request
  4103. } : null);
  4104. }
  4105. function endpointWithDefaults(defaults, route, options) {
  4106. return parse(merge(defaults, route, options));
  4107. }
  4108. function withDefaults(oldDefaults, newDefaults) {
  4109. const DEFAULTS = merge(oldDefaults, newDefaults);
  4110. const endpoint = endpointWithDefaults.bind(null, DEFAULTS);
  4111. return Object.assign(endpoint, {
  4112. DEFAULTS,
  4113. defaults: withDefaults.bind(null, DEFAULTS),
  4114. merge: merge.bind(null, DEFAULTS),
  4115. parse
  4116. });
  4117. }
  4118. const VERSION = "6.0.2";
  4119. const userAgent = `octokit-endpoint.js/${VERSION} ${universalUserAgent.getUserAgent()}`; // DEFAULTS has all properties set that EndpointOptions has, except url.
  4120. // So we use RequestParameters and add method as additional required property.
  4121. const DEFAULTS = {
  4122. method: "GET",
  4123. baseUrl: "https://api.github.com",
  4124. headers: {
  4125. accept: "application/vnd.github.v3+json",
  4126. "user-agent": userAgent
  4127. },
  4128. mediaType: {
  4129. format: "",
  4130. previews: []
  4131. }
  4132. };
  4133. const endpoint = withDefaults(null, DEFAULTS);
  4134. exports.endpoint = endpoint;
  4135. //# sourceMappingURL=index.js.map
  4136. /***/ }),
  4137. /***/ 389:
  4138. /***/ (function(module, __unusedexports, __webpack_require__) {
  4139. "use strict";
  4140. const fs = __webpack_require__(747);
  4141. const shebangCommand = __webpack_require__(866);
  4142. function readShebang(command) {
  4143. // Read the first 150 bytes from the file
  4144. const size = 150;
  4145. let buffer;
  4146. if (Buffer.alloc) {
  4147. // Node.js v4.5+ / v5.10+
  4148. buffer = Buffer.alloc(size);
  4149. } else {
  4150. // Old Node.js API
  4151. buffer = new Buffer(size);
  4152. buffer.fill(0); // zero-fill
  4153. }
  4154. let fd;
  4155. try {
  4156. fd = fs.openSync(command, 'r');
  4157. fs.readSync(fd, buffer, 0, size, 0);
  4158. fs.closeSync(fd);
  4159. } catch (e) { /* Empty */ }
  4160. // Attempt to extract shebang (null is returned if not a shebang)
  4161. return shebangCommand(buffer.toString());
  4162. }
  4163. module.exports = readShebang;
  4164. /***/ }),
  4165. /***/ 402:
  4166. /***/ (function(module, __unusedexports, __webpack_require__) {
  4167. module.exports = Octokit;
  4168. const { request } = __webpack_require__(753);
  4169. const Hook = __webpack_require__(523);
  4170. const parseClientOptions = __webpack_require__(294);
  4171. function Octokit(plugins, options) {
  4172. options = options || {};
  4173. const hook = new Hook.Collection();
  4174. const log = Object.assign(
  4175. {
  4176. debug: () => {},
  4177. info: () => {},
  4178. warn: console.warn,
  4179. error: console.error
  4180. },
  4181. options && options.log
  4182. );
  4183. const api = {
  4184. hook,
  4185. log,
  4186. request: request.defaults(parseClientOptions(options, log, hook))
  4187. };
  4188. plugins.forEach(pluginFunction => pluginFunction(api, options));
  4189. return api;
  4190. }
  4191. /***/ }),
  4192. /***/ 413:
  4193. /***/ (function(module) {
  4194. module.exports = require("stream");
  4195. /***/ }),
  4196. /***/ 427:
  4197. /***/ (function(module, __unusedexports, __webpack_require__) {
  4198. "use strict";
  4199. // Older verions of Node.js might not have `util.getSystemErrorName()`.
  4200. // In that case, fall back to a deprecated internal.
  4201. const util = __webpack_require__(669);
  4202. let uv;
  4203. if (typeof util.getSystemErrorName === 'function') {
  4204. module.exports = util.getSystemErrorName;
  4205. } else {
  4206. try {
  4207. uv = process.binding('uv');
  4208. if (typeof uv.errname !== 'function') {
  4209. throw new TypeError('uv.errname is not a function');
  4210. }
  4211. } catch (err) {
  4212. console.error('execa/lib/errname: unable to establish process.binding(\'uv\')', err);
  4213. uv = null;
  4214. }
  4215. module.exports = code => errname(uv, code);
  4216. }
  4217. // Used for testing the fallback behavior
  4218. module.exports.__test__ = errname;
  4219. function errname(uv, code) {
  4220. if (uv) {
  4221. return uv.errname(code);
  4222. }
  4223. if (!(code < 0)) {
  4224. throw new Error('err >= 0');
  4225. }
  4226. return `Unknown system error ${code}`;
  4227. }
  4228. /***/ }),
  4229. /***/ 430:
  4230. /***/ (function(module, __unusedexports, __webpack_require__) {
  4231. module.exports = octokitValidate;
  4232. const validate = __webpack_require__(348);
  4233. function octokitValidate(octokit) {
  4234. octokit.hook.before("request", validate.bind(null, octokit));
  4235. }
  4236. /***/ }),
  4237. /***/ 431:
  4238. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  4239. "use strict";
  4240. var __importStar = (this && this.__importStar) || function (mod) {
  4241. if (mod && mod.__esModule) return mod;
  4242. var result = {};
  4243. if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
  4244. result["default"] = mod;
  4245. return result;
  4246. };
  4247. Object.defineProperty(exports, "__esModule", { value: true });
  4248. const os = __importStar(__webpack_require__(87));
  4249. /**
  4250. * Commands
  4251. *
  4252. * Command Format:
  4253. * ::name key=value,key=value::message
  4254. *
  4255. * Examples:
  4256. * ::warning::This is the message
  4257. * ::set-env name=MY_VAR::some value
  4258. */
  4259. function issueCommand(command, properties, message) {
  4260. const cmd = new Command(command, properties, message);
  4261. process.stdout.write(cmd.toString() + os.EOL);
  4262. }
  4263. exports.issueCommand = issueCommand;
  4264. function issue(name, message = '') {
  4265. issueCommand(name, {}, message);
  4266. }
  4267. exports.issue = issue;
  4268. const CMD_STRING = '::';
  4269. class Command {
  4270. constructor(command, properties, message) {
  4271. if (!command) {
  4272. command = 'missing.command';
  4273. }
  4274. this.command = command;
  4275. this.properties = properties;
  4276. this.message = message;
  4277. }
  4278. toString() {
  4279. let cmdStr = CMD_STRING + this.command;
  4280. if (this.properties && Object.keys(this.properties).length > 0) {
  4281. cmdStr += ' ';
  4282. let first = true;
  4283. for (const key in this.properties) {
  4284. if (this.properties.hasOwnProperty(key)) {
  4285. const val = this.properties[key];
  4286. if (val) {
  4287. if (first) {
  4288. first = false;
  4289. }
  4290. else {
  4291. cmdStr += ',';
  4292. }
  4293. cmdStr += `${key}=${escapeProperty(val)}`;
  4294. }
  4295. }
  4296. }
  4297. }
  4298. cmdStr += `${CMD_STRING}${escapeData(this.message)}`;
  4299. return cmdStr;
  4300. }
  4301. }
  4302. function escapeData(s) {
  4303. return (s || '')
  4304. .replace(/%/g, '%25')
  4305. .replace(/\r/g, '%0D')
  4306. .replace(/\n/g, '%0A');
  4307. }
  4308. function escapeProperty(s) {
  4309. return (s || '')
  4310. .replace(/%/g, '%25')
  4311. .replace(/\r/g, '%0D')
  4312. .replace(/\n/g, '%0A')
  4313. .replace(/:/g, '%3A')
  4314. .replace(/,/g, '%2C');
  4315. }
  4316. //# sourceMappingURL=command.js.map
  4317. /***/ }),
  4318. /***/ 453:
  4319. /***/ (function(module, __unusedexports, __webpack_require__) {
  4320. var once = __webpack_require__(969)
  4321. var eos = __webpack_require__(9)
  4322. var fs = __webpack_require__(747) // we only need fs to get the ReadStream and WriteStream prototypes
  4323. var noop = function () {}
  4324. var ancient = /^v?\.0/.test(process.version)
  4325. var isFn = function (fn) {
  4326. return typeof fn === 'function'
  4327. }
  4328. var isFS = function (stream) {
  4329. if (!ancient) return false // newer node version do not need to care about fs is a special way
  4330. if (!fs) return false // browser
  4331. return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close)
  4332. }
  4333. var isRequest = function (stream) {
  4334. return stream.setHeader && isFn(stream.abort)
  4335. }
  4336. var destroyer = function (stream, reading, writing, callback) {
  4337. callback = once(callback)
  4338. var closed = false
  4339. stream.on('close', function () {
  4340. closed = true
  4341. })
  4342. eos(stream, {readable: reading, writable: writing}, function (err) {
  4343. if (err) return callback(err)
  4344. closed = true
  4345. callback()
  4346. })
  4347. var destroyed = false
  4348. return function (err) {
  4349. if (closed) return
  4350. if (destroyed) return
  4351. destroyed = true
  4352. if (isFS(stream)) return stream.close(noop) // use close for fs streams to avoid fd leaks
  4353. if (isRequest(stream)) return stream.abort() // request.destroy just do .end - .abort is what we want
  4354. if (isFn(stream.destroy)) return stream.destroy()
  4355. callback(err || new Error('stream was destroyed'))
  4356. }
  4357. }
  4358. var call = function (fn) {
  4359. fn()
  4360. }
  4361. var pipe = function (from, to) {
  4362. return from.pipe(to)
  4363. }
  4364. var pump = function () {
  4365. var streams = Array.prototype.slice.call(arguments)
  4366. var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop
  4367. if (Array.isArray(streams[0])) streams = streams[0]
  4368. if (streams.length < 2) throw new Error('pump requires two streams per minimum')
  4369. var error
  4370. var destroys = streams.map(function (stream, i) {
  4371. var reading = i < streams.length - 1
  4372. var writing = i > 0
  4373. return destroyer(stream, reading, writing, function (err) {
  4374. if (!error) error = err
  4375. if (err) destroys.forEach(call)
  4376. if (reading) return
  4377. destroys.forEach(call)
  4378. callback(error)
  4379. })
  4380. })
  4381. return streams.reduce(pipe)
  4382. }
  4383. module.exports = pump
  4384. /***/ }),
  4385. /***/ 454:
  4386. /***/ (function(module, exports, __webpack_require__) {
  4387. "use strict";
  4388. Object.defineProperty(exports, '__esModule', { value: true });
  4389. function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
  4390. var Stream = _interopDefault(__webpack_require__(413));
  4391. var http = _interopDefault(__webpack_require__(605));
  4392. var Url = _interopDefault(__webpack_require__(835));
  4393. var https = _interopDefault(__webpack_require__(211));
  4394. var zlib = _interopDefault(__webpack_require__(761));
  4395. // Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js
  4396. // fix for "Readable" isn't a named export issue
  4397. const Readable = Stream.Readable;
  4398. const BUFFER = Symbol('buffer');
  4399. const TYPE = Symbol('type');
  4400. class Blob {
  4401. constructor() {
  4402. this[TYPE] = '';
  4403. const blobParts = arguments[0];
  4404. const options = arguments[1];
  4405. const buffers = [];
  4406. let size = 0;
  4407. if (blobParts) {
  4408. const a = blobParts;
  4409. const length = Number(a.length);
  4410. for (let i = 0; i < length; i++) {
  4411. const element = a[i];
  4412. let buffer;
  4413. if (element instanceof Buffer) {
  4414. buffer = element;
  4415. } else if (ArrayBuffer.isView(element)) {
  4416. buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength);
  4417. } else if (element instanceof ArrayBuffer) {
  4418. buffer = Buffer.from(element);
  4419. } else if (element instanceof Blob) {
  4420. buffer = element[BUFFER];
  4421. } else {
  4422. buffer = Buffer.from(typeof element === 'string' ? element : String(element));
  4423. }
  4424. size += buffer.length;
  4425. buffers.push(buffer);
  4426. }
  4427. }
  4428. this[BUFFER] = Buffer.concat(buffers);
  4429. let type = options && options.type !== undefined && String(options.type).toLowerCase();
  4430. if (type && !/[^\u0020-\u007E]/.test(type)) {
  4431. this[TYPE] = type;
  4432. }
  4433. }
  4434. get size() {
  4435. return this[BUFFER].length;
  4436. }
  4437. get type() {
  4438. return this[TYPE];
  4439. }
  4440. text() {
  4441. return Promise.resolve(this[BUFFER].toString());
  4442. }
  4443. arrayBuffer() {
  4444. const buf = this[BUFFER];
  4445. const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
  4446. return Promise.resolve(ab);
  4447. }
  4448. stream() {
  4449. const readable = new Readable();
  4450. readable._read = function () {};
  4451. readable.push(this[BUFFER]);
  4452. readable.push(null);
  4453. return readable;
  4454. }
  4455. toString() {
  4456. return '[object Blob]';
  4457. }
  4458. slice() {
  4459. const size = this.size;
  4460. const start = arguments[0];
  4461. const end = arguments[1];
  4462. let relativeStart, relativeEnd;
  4463. if (start === undefined) {
  4464. relativeStart = 0;
  4465. } else if (start < 0) {
  4466. relativeStart = Math.max(size + start, 0);
  4467. } else {
  4468. relativeStart = Math.min(start, size);
  4469. }
  4470. if (end === undefined) {
  4471. relativeEnd = size;
  4472. } else if (end < 0) {
  4473. relativeEnd = Math.max(size + end, 0);
  4474. } else {
  4475. relativeEnd = Math.min(end, size);
  4476. }
  4477. const span = Math.max(relativeEnd - relativeStart, 0);
  4478. const buffer = this[BUFFER];
  4479. const slicedBuffer = buffer.slice(relativeStart, relativeStart + span);
  4480. const blob = new Blob([], { type: arguments[2] });
  4481. blob[BUFFER] = slicedBuffer;
  4482. return blob;
  4483. }
  4484. }
  4485. Object.defineProperties(Blob.prototype, {
  4486. size: { enumerable: true },
  4487. type: { enumerable: true },
  4488. slice: { enumerable: true }
  4489. });
  4490. Object.defineProperty(Blob.prototype, Symbol.toStringTag, {
  4491. value: 'Blob',
  4492. writable: false,
  4493. enumerable: false,
  4494. configurable: true
  4495. });
  4496. /**
  4497. * fetch-error.js
  4498. *
  4499. * FetchError interface for operational errors
  4500. */
  4501. /**
  4502. * Create FetchError instance
  4503. *
  4504. * @param String message Error message for human
  4505. * @param String type Error type for machine
  4506. * @param String systemError For Node.js system error
  4507. * @return FetchError
  4508. */
  4509. function FetchError(message, type, systemError) {
  4510. Error.call(this, message);
  4511. this.message = message;
  4512. this.type = type;
  4513. // when err.type is `system`, err.code contains system error code
  4514. if (systemError) {
  4515. this.code = this.errno = systemError.code;
  4516. }
  4517. // hide custom error implementation details from end-users
  4518. Error.captureStackTrace(this, this.constructor);
  4519. }
  4520. FetchError.prototype = Object.create(Error.prototype);
  4521. FetchError.prototype.constructor = FetchError;
  4522. FetchError.prototype.name = 'FetchError';
  4523. let convert;
  4524. try {
  4525. convert = __webpack_require__(18).convert;
  4526. } catch (e) {}
  4527. const INTERNALS = Symbol('Body internals');
  4528. // fix an issue where "PassThrough" isn't a named export for node <10
  4529. const PassThrough = Stream.PassThrough;
  4530. /**
  4531. * Body mixin
  4532. *
  4533. * Ref: https://fetch.spec.whatwg.org/#body
  4534. *
  4535. * @param Stream body Readable stream
  4536. * @param Object opts Response options
  4537. * @return Void
  4538. */
  4539. function Body(body) {
  4540. var _this = this;
  4541. var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
  4542. _ref$size = _ref.size;
  4543. let size = _ref$size === undefined ? 0 : _ref$size;
  4544. var _ref$timeout = _ref.timeout;
  4545. let timeout = _ref$timeout === undefined ? 0 : _ref$timeout;
  4546. if (body == null) {
  4547. // body is undefined or null
  4548. body = null;
  4549. } else if (isURLSearchParams(body)) {
  4550. // body is a URLSearchParams
  4551. body = Buffer.from(body.toString());
  4552. } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
  4553. // body is ArrayBuffer
  4554. body = Buffer.from(body);
  4555. } else if (ArrayBuffer.isView(body)) {
  4556. // body is ArrayBufferView
  4557. body = Buffer.from(body.buffer, body.byteOffset, body.byteLength);
  4558. } else if (body instanceof Stream) ; else {
  4559. // none of the above
  4560. // coerce to string then buffer
  4561. body = Buffer.from(String(body));
  4562. }
  4563. this[INTERNALS] = {
  4564. body,
  4565. disturbed: false,
  4566. error: null
  4567. };
  4568. this.size = size;
  4569. this.timeout = timeout;
  4570. if (body instanceof Stream) {
  4571. body.on('error', function (err) {
  4572. const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err);
  4573. _this[INTERNALS].error = error;
  4574. });
  4575. }
  4576. }
  4577. Body.prototype = {
  4578. get body() {
  4579. return this[INTERNALS].body;
  4580. },
  4581. get bodyUsed() {
  4582. return this[INTERNALS].disturbed;
  4583. },
  4584. /**
  4585. * Decode response as ArrayBuffer
  4586. *
  4587. * @return Promise
  4588. */
  4589. arrayBuffer() {
  4590. return consumeBody.call(this).then(function (buf) {
  4591. return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);
  4592. });
  4593. },
  4594. /**
  4595. * Return raw response as Blob
  4596. *
  4597. * @return Promise
  4598. */
  4599. blob() {
  4600. let ct = this.headers && this.headers.get('content-type') || '';
  4601. return consumeBody.call(this).then(function (buf) {
  4602. return Object.assign(
  4603. // Prevent copying
  4604. new Blob([], {
  4605. type: ct.toLowerCase()
  4606. }), {
  4607. [BUFFER]: buf
  4608. });
  4609. });
  4610. },
  4611. /**
  4612. * Decode response as json
  4613. *
  4614. * @return Promise
  4615. */
  4616. json() {
  4617. var _this2 = this;
  4618. return consumeBody.call(this).then(function (buffer) {
  4619. try {
  4620. return JSON.parse(buffer.toString());
  4621. } catch (err) {
  4622. return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json'));
  4623. }
  4624. });
  4625. },
  4626. /**
  4627. * Decode response as text
  4628. *
  4629. * @return Promise
  4630. */
  4631. text() {
  4632. return consumeBody.call(this).then(function (buffer) {
  4633. return buffer.toString();
  4634. });
  4635. },
  4636. /**
  4637. * Decode response as buffer (non-spec api)
  4638. *
  4639. * @return Promise
  4640. */
  4641. buffer() {
  4642. return consumeBody.call(this);
  4643. },
  4644. /**
  4645. * Decode response as text, while automatically detecting the encoding and
  4646. * trying to decode to UTF-8 (non-spec api)
  4647. *
  4648. * @return Promise
  4649. */
  4650. textConverted() {
  4651. var _this3 = this;
  4652. return consumeBody.call(this).then(function (buffer) {
  4653. return convertBody(buffer, _this3.headers);
  4654. });
  4655. }
  4656. };
  4657. // In browsers, all properties are enumerable.
  4658. Object.defineProperties(Body.prototype, {
  4659. body: { enumerable: true },
  4660. bodyUsed: { enumerable: true },
  4661. arrayBuffer: { enumerable: true },
  4662. blob: { enumerable: true },
  4663. json: { enumerable: true },
  4664. text: { enumerable: true }
  4665. });
  4666. Body.mixIn = function (proto) {
  4667. for (const name of Object.getOwnPropertyNames(Body.prototype)) {
  4668. // istanbul ignore else: future proof
  4669. if (!(name in proto)) {
  4670. const desc = Object.getOwnPropertyDescriptor(Body.prototype, name);
  4671. Object.defineProperty(proto, name, desc);
  4672. }
  4673. }
  4674. };
  4675. /**
  4676. * Consume and convert an entire Body to a Buffer.
  4677. *
  4678. * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body
  4679. *
  4680. * @return Promise
  4681. */
  4682. function consumeBody() {
  4683. var _this4 = this;
  4684. if (this[INTERNALS].disturbed) {
  4685. return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`));
  4686. }
  4687. this[INTERNALS].disturbed = true;
  4688. if (this[INTERNALS].error) {
  4689. return Body.Promise.reject(this[INTERNALS].error);
  4690. }
  4691. let body = this.body;
  4692. // body is null
  4693. if (body === null) {
  4694. return Body.Promise.resolve(Buffer.alloc(0));
  4695. }
  4696. // body is blob
  4697. if (isBlob(body)) {
  4698. body = body.stream();
  4699. }
  4700. // body is buffer
  4701. if (Buffer.isBuffer(body)) {
  4702. return Body.Promise.resolve(body);
  4703. }
  4704. // istanbul ignore if: should never happen
  4705. if (!(body instanceof Stream)) {
  4706. return Body.Promise.resolve(Buffer.alloc(0));
  4707. }
  4708. // body is stream
  4709. // get ready to actually consume the body
  4710. let accum = [];
  4711. let accumBytes = 0;
  4712. let abort = false;
  4713. return new Body.Promise(function (resolve, reject) {
  4714. let resTimeout;
  4715. // allow timeout on slow response body
  4716. if (_this4.timeout) {
  4717. resTimeout = setTimeout(function () {
  4718. abort = true;
  4719. reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout'));
  4720. }, _this4.timeout);
  4721. }
  4722. // handle stream errors
  4723. body.on('error', function (err) {
  4724. if (err.name === 'AbortError') {
  4725. // if the request was aborted, reject with this Error
  4726. abort = true;
  4727. reject(err);
  4728. } else {
  4729. // other errors, such as incorrect content-encoding
  4730. reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
  4731. }
  4732. });
  4733. body.on('data', function (chunk) {
  4734. if (abort || chunk === null) {
  4735. return;
  4736. }
  4737. if (_this4.size && accumBytes + chunk.length > _this4.size) {
  4738. abort = true;
  4739. reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size'));
  4740. return;
  4741. }
  4742. accumBytes += chunk.length;
  4743. accum.push(chunk);
  4744. });
  4745. body.on('end', function () {
  4746. if (abort) {
  4747. return;
  4748. }
  4749. clearTimeout(resTimeout);
  4750. try {
  4751. resolve(Buffer.concat(accum, accumBytes));
  4752. } catch (err) {
  4753. // handle streams that have accumulated too much data (issue #414)
  4754. reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err));
  4755. }
  4756. });
  4757. });
  4758. }
  4759. /**
  4760. * Detect buffer encoding and convert to target encoding
  4761. * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding
  4762. *
  4763. * @param Buffer buffer Incoming buffer
  4764. * @param String encoding Target encoding
  4765. * @return String
  4766. */
  4767. function convertBody(buffer, headers) {
  4768. if (typeof convert !== 'function') {
  4769. throw new Error('The package `encoding` must be installed to use the textConverted() function');
  4770. }
  4771. const ct = headers.get('content-type');
  4772. let charset = 'utf-8';
  4773. let res, str;
  4774. // header
  4775. if (ct) {
  4776. res = /charset=([^;]*)/i.exec(ct);
  4777. }
  4778. // no charset in content type, peek at response body for at most 1024 bytes
  4779. str = buffer.slice(0, 1024).toString();
  4780. // html5
  4781. if (!res && str) {
  4782. res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str);
  4783. }
  4784. // html4
  4785. if (!res && str) {
  4786. res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str);
  4787. if (res) {
  4788. res = /charset=(.*)/i.exec(res.pop());
  4789. }
  4790. }
  4791. // xml
  4792. if (!res && str) {
  4793. res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str);
  4794. }
  4795. // found charset
  4796. if (res) {
  4797. charset = res.pop();
  4798. // prevent decode issues when sites use incorrect encoding
  4799. // ref: https://hsivonen.fi/encoding-menu/
  4800. if (charset === 'gb2312' || charset === 'gbk') {
  4801. charset = 'gb18030';
  4802. }
  4803. }
  4804. // turn raw buffers into a single utf-8 buffer
  4805. return convert(buffer, 'UTF-8', charset).toString();
  4806. }
  4807. /**
  4808. * Detect a URLSearchParams object
  4809. * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143
  4810. *
  4811. * @param Object obj Object to detect by type or brand
  4812. * @return String
  4813. */
  4814. function isURLSearchParams(obj) {
  4815. // Duck-typing as a necessary condition.
  4816. if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') {
  4817. return false;
  4818. }
  4819. // Brand-checking and more duck-typing as optional condition.
  4820. return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function';
  4821. }
  4822. /**
  4823. * Check if `obj` is a W3C `Blob` object (which `File` inherits from)
  4824. * @param {*} obj
  4825. * @return {boolean}
  4826. */
  4827. function isBlob(obj) {
  4828. return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]);
  4829. }
  4830. /**
  4831. * Clone body given Res/Req instance
  4832. *
  4833. * @param Mixed instance Response or Request instance
  4834. * @return Mixed
  4835. */
  4836. function clone(instance) {
  4837. let p1, p2;
  4838. let body = instance.body;
  4839. // don't allow cloning a used body
  4840. if (instance.bodyUsed) {
  4841. throw new Error('cannot clone body after it is used');
  4842. }
  4843. // check that body is a stream and not form-data object
  4844. // note: we can't clone the form-data object without having it as a dependency
  4845. if (body instanceof Stream && typeof body.getBoundary !== 'function') {
  4846. // tee instance body
  4847. p1 = new PassThrough();
  4848. p2 = new PassThrough();
  4849. body.pipe(p1);
  4850. body.pipe(p2);
  4851. // set instance body to teed body and return the other teed body
  4852. instance[INTERNALS].body = p1;
  4853. body = p2;
  4854. }
  4855. return body;
  4856. }
  4857. /**
  4858. * Performs the operation "extract a `Content-Type` value from |object|" as
  4859. * specified in the specification:
  4860. * https://fetch.spec.whatwg.org/#concept-bodyinit-extract
  4861. *
  4862. * This function assumes that instance.body is present.
  4863. *
  4864. * @param Mixed instance Any options.body input
  4865. */
  4866. function extractContentType(body) {
  4867. if (body === null) {
  4868. // body is null
  4869. return null;
  4870. } else if (typeof body === 'string') {
  4871. // body is string
  4872. return 'text/plain;charset=UTF-8';
  4873. } else if (isURLSearchParams(body)) {
  4874. // body is a URLSearchParams
  4875. return 'application/x-www-form-urlencoded;charset=UTF-8';
  4876. } else if (isBlob(body)) {
  4877. // body is blob
  4878. return body.type || null;
  4879. } else if (Buffer.isBuffer(body)) {
  4880. // body is buffer
  4881. return null;
  4882. } else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') {
  4883. // body is ArrayBuffer
  4884. return null;
  4885. } else if (ArrayBuffer.isView(body)) {
  4886. // body is ArrayBufferView
  4887. return null;
  4888. } else if (typeof body.getBoundary === 'function') {
  4889. // detect form data input from form-data module
  4890. return `multipart/form-data;boundary=${body.getBoundary()}`;
  4891. } else if (body instanceof Stream) {
  4892. // body is stream
  4893. // can't really do much about this
  4894. return null;
  4895. } else {
  4896. // Body constructor defaults other things to string
  4897. return 'text/plain;charset=UTF-8';
  4898. }
  4899. }
  4900. /**
  4901. * The Fetch Standard treats this as if "total bytes" is a property on the body.
  4902. * For us, we have to explicitly get it with a function.
  4903. *
  4904. * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes
  4905. *
  4906. * @param Body instance Instance of Body
  4907. * @return Number? Number of bytes, or null if not possible
  4908. */
  4909. function getTotalBytes(instance) {
  4910. const body = instance.body;
  4911. if (body === null) {
  4912. // body is null
  4913. return 0;
  4914. } else if (isBlob(body)) {
  4915. return body.size;
  4916. } else if (Buffer.isBuffer(body)) {
  4917. // body is buffer
  4918. return body.length;
  4919. } else if (body && typeof body.getLengthSync === 'function') {
  4920. // detect form data input from form-data module
  4921. if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x
  4922. body.hasKnownLength && body.hasKnownLength()) {
  4923. // 2.x
  4924. return body.getLengthSync();
  4925. }
  4926. return null;
  4927. } else {
  4928. // body is stream
  4929. return null;
  4930. }
  4931. }
  4932. /**
  4933. * Write a Body to a Node.js WritableStream (e.g. http.Request) object.
  4934. *
  4935. * @param Body instance Instance of Body
  4936. * @return Void
  4937. */
  4938. function writeToStream(dest, instance) {
  4939. const body = instance.body;
  4940. if (body === null) {
  4941. // body is null
  4942. dest.end();
  4943. } else if (isBlob(body)) {
  4944. body.stream().pipe(dest);
  4945. } else if (Buffer.isBuffer(body)) {
  4946. // body is buffer
  4947. dest.write(body);
  4948. dest.end();
  4949. } else {
  4950. // body is stream
  4951. body.pipe(dest);
  4952. }
  4953. }
  4954. // expose Promise
  4955. Body.Promise = global.Promise;
  4956. /**
  4957. * headers.js
  4958. *
  4959. * Headers class offers convenient helpers
  4960. */
  4961. const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/;
  4962. const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/;
  4963. function validateName(name) {
  4964. name = `${name}`;
  4965. if (invalidTokenRegex.test(name) || name === '') {
  4966. throw new TypeError(`${name} is not a legal HTTP header name`);
  4967. }
  4968. }
  4969. function validateValue(value) {
  4970. value = `${value}`;
  4971. if (invalidHeaderCharRegex.test(value)) {
  4972. throw new TypeError(`${value} is not a legal HTTP header value`);
  4973. }
  4974. }
  4975. /**
  4976. * Find the key in the map object given a header name.
  4977. *
  4978. * Returns undefined if not found.
  4979. *
  4980. * @param String name Header name
  4981. * @return String|Undefined
  4982. */
  4983. function find(map, name) {
  4984. name = name.toLowerCase();
  4985. for (const key in map) {
  4986. if (key.toLowerCase() === name) {
  4987. return key;
  4988. }
  4989. }
  4990. return undefined;
  4991. }
  4992. const MAP = Symbol('map');
  4993. class Headers {
  4994. /**
  4995. * Headers class
  4996. *
  4997. * @param Object headers Response headers
  4998. * @return Void
  4999. */
  5000. constructor() {
  5001. let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined;
  5002. this[MAP] = Object.create(null);
  5003. if (init instanceof Headers) {
  5004. const rawHeaders = init.raw();
  5005. const headerNames = Object.keys(rawHeaders);
  5006. for (const headerName of headerNames) {
  5007. for (const value of rawHeaders[headerName]) {
  5008. this.append(headerName, value);
  5009. }
  5010. }
  5011. return;
  5012. }
  5013. // We don't worry about converting prop to ByteString here as append()
  5014. // will handle it.
  5015. if (init == null) ; else if (typeof init === 'object') {
  5016. const method = init[Symbol.iterator];
  5017. if (method != null) {
  5018. if (typeof method !== 'function') {
  5019. throw new TypeError('Header pairs must be iterable');
  5020. }
  5021. // sequence<sequence<ByteString>>
  5022. // Note: per spec we have to first exhaust the lists then process them
  5023. const pairs = [];
  5024. for (const pair of init) {
  5025. if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') {
  5026. throw new TypeError('Each header pair must be iterable');
  5027. }
  5028. pairs.push(Array.from(pair));
  5029. }
  5030. for (const pair of pairs) {
  5031. if (pair.length !== 2) {
  5032. throw new TypeError('Each header pair must be a name/value tuple');
  5033. }
  5034. this.append(pair[0], pair[1]);
  5035. }
  5036. } else {
  5037. // record<ByteString, ByteString>
  5038. for (const key of Object.keys(init)) {
  5039. const value = init[key];
  5040. this.append(key, value);
  5041. }
  5042. }
  5043. } else {
  5044. throw new TypeError('Provided initializer must be an object');
  5045. }
  5046. }
  5047. /**
  5048. * Return combined header value given name
  5049. *
  5050. * @param String name Header name
  5051. * @return Mixed
  5052. */
  5053. get(name) {
  5054. name = `${name}`;
  5055. validateName(name);
  5056. const key = find(this[MAP], name);
  5057. if (key === undefined) {
  5058. return null;
  5059. }
  5060. return this[MAP][key].join(', ');
  5061. }
  5062. /**
  5063. * Iterate over all headers
  5064. *
  5065. * @param Function callback Executed for each item with parameters (value, name, thisArg)
  5066. * @param Boolean thisArg `this` context for callback function
  5067. * @return Void
  5068. */
  5069. forEach(callback) {
  5070. let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
  5071. let pairs = getHeaders(this);
  5072. let i = 0;
  5073. while (i < pairs.length) {
  5074. var _pairs$i = pairs[i];
  5075. const name = _pairs$i[0],
  5076. value = _pairs$i[1];
  5077. callback.call(thisArg, value, name, this);
  5078. pairs = getHeaders(this);
  5079. i++;
  5080. }
  5081. }
  5082. /**
  5083. * Overwrite header values given name
  5084. *
  5085. * @param String name Header name
  5086. * @param String value Header value
  5087. * @return Void
  5088. */
  5089. set(name, value) {
  5090. name = `${name}`;
  5091. value = `${value}`;
  5092. validateName(name);
  5093. validateValue(value);
  5094. const key = find(this[MAP], name);
  5095. this[MAP][key !== undefined ? key : name] = [value];
  5096. }
  5097. /**
  5098. * Append a value onto existing header
  5099. *
  5100. * @param String name Header name
  5101. * @param String value Header value
  5102. * @return Void
  5103. */
  5104. append(name, value) {
  5105. name = `${name}`;
  5106. value = `${value}`;
  5107. validateName(name);
  5108. validateValue(value);
  5109. const key = find(this[MAP], name);
  5110. if (key !== undefined) {
  5111. this[MAP][key].push(value);
  5112. } else {
  5113. this[MAP][name] = [value];
  5114. }
  5115. }
  5116. /**
  5117. * Check for header name existence
  5118. *
  5119. * @param String name Header name
  5120. * @return Boolean
  5121. */
  5122. has(name) {
  5123. name = `${name}`;
  5124. validateName(name);
  5125. return find(this[MAP], name) !== undefined;
  5126. }
  5127. /**
  5128. * Delete all header values given name
  5129. *
  5130. * @param String name Header name
  5131. * @return Void
  5132. */
  5133. delete(name) {
  5134. name = `${name}`;
  5135. validateName(name);
  5136. const key = find(this[MAP], name);
  5137. if (key !== undefined) {
  5138. delete this[MAP][key];
  5139. }
  5140. }
  5141. /**
  5142. * Return raw headers (non-spec api)
  5143. *
  5144. * @return Object
  5145. */
  5146. raw() {
  5147. return this[MAP];
  5148. }
  5149. /**
  5150. * Get an iterator on keys.
  5151. *
  5152. * @return Iterator
  5153. */
  5154. keys() {
  5155. return createHeadersIterator(this, 'key');
  5156. }
  5157. /**
  5158. * Get an iterator on values.
  5159. *
  5160. * @return Iterator
  5161. */
  5162. values() {
  5163. return createHeadersIterator(this, 'value');
  5164. }
  5165. /**
  5166. * Get an iterator on entries.
  5167. *
  5168. * This is the default iterator of the Headers object.
  5169. *
  5170. * @return Iterator
  5171. */
  5172. [Symbol.iterator]() {
  5173. return createHeadersIterator(this, 'key+value');
  5174. }
  5175. }
  5176. Headers.prototype.entries = Headers.prototype[Symbol.iterator];
  5177. Object.defineProperty(Headers.prototype, Symbol.toStringTag, {
  5178. value: 'Headers',
  5179. writable: false,
  5180. enumerable: false,
  5181. configurable: true
  5182. });
  5183. Object.defineProperties(Headers.prototype, {
  5184. get: { enumerable: true },
  5185. forEach: { enumerable: true },
  5186. set: { enumerable: true },
  5187. append: { enumerable: true },
  5188. has: { enumerable: true },
  5189. delete: { enumerable: true },
  5190. keys: { enumerable: true },
  5191. values: { enumerable: true },
  5192. entries: { enumerable: true }
  5193. });
  5194. function getHeaders(headers) {
  5195. let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value';
  5196. const keys = Object.keys(headers[MAP]).sort();
  5197. return keys.map(kind === 'key' ? function (k) {
  5198. return k.toLowerCase();
  5199. } : kind === 'value' ? function (k) {
  5200. return headers[MAP][k].join(', ');
  5201. } : function (k) {
  5202. return [k.toLowerCase(), headers[MAP][k].join(', ')];
  5203. });
  5204. }
  5205. const INTERNAL = Symbol('internal');
  5206. function createHeadersIterator(target, kind) {
  5207. const iterator = Object.create(HeadersIteratorPrototype);
  5208. iterator[INTERNAL] = {
  5209. target,
  5210. kind,
  5211. index: 0
  5212. };
  5213. return iterator;
  5214. }
  5215. const HeadersIteratorPrototype = Object.setPrototypeOf({
  5216. next() {
  5217. // istanbul ignore if
  5218. if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) {
  5219. throw new TypeError('Value of `this` is not a HeadersIterator');
  5220. }
  5221. var _INTERNAL = this[INTERNAL];
  5222. const target = _INTERNAL.target,
  5223. kind = _INTERNAL.kind,
  5224. index = _INTERNAL.index;
  5225. const values = getHeaders(target, kind);
  5226. const len = values.length;
  5227. if (index >= len) {
  5228. return {
  5229. value: undefined,
  5230. done: true
  5231. };
  5232. }
  5233. this[INTERNAL].index = index + 1;
  5234. return {
  5235. value: values[index],
  5236. done: false
  5237. };
  5238. }
  5239. }, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));
  5240. Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, {
  5241. value: 'HeadersIterator',
  5242. writable: false,
  5243. enumerable: false,
  5244. configurable: true
  5245. });
  5246. /**
  5247. * Export the Headers object in a form that Node.js can consume.
  5248. *
  5249. * @param Headers headers
  5250. * @return Object
  5251. */
  5252. function exportNodeCompatibleHeaders(headers) {
  5253. const obj = Object.assign({ __proto__: null }, headers[MAP]);
  5254. // http.request() only supports string as Host header. This hack makes
  5255. // specifying custom Host header possible.
  5256. const hostHeaderKey = find(headers[MAP], 'Host');
  5257. if (hostHeaderKey !== undefined) {
  5258. obj[hostHeaderKey] = obj[hostHeaderKey][0];
  5259. }
  5260. return obj;
  5261. }
  5262. /**
  5263. * Create a Headers object from an object of headers, ignoring those that do
  5264. * not conform to HTTP grammar productions.
  5265. *
  5266. * @param Object obj Object of headers
  5267. * @return Headers
  5268. */
  5269. function createHeadersLenient(obj) {
  5270. const headers = new Headers();
  5271. for (const name of Object.keys(obj)) {
  5272. if (invalidTokenRegex.test(name)) {
  5273. continue;
  5274. }
  5275. if (Array.isArray(obj[name])) {
  5276. for (const val of obj[name]) {
  5277. if (invalidHeaderCharRegex.test(val)) {
  5278. continue;
  5279. }
  5280. if (headers[MAP][name] === undefined) {
  5281. headers[MAP][name] = [val];
  5282. } else {
  5283. headers[MAP][name].push(val);
  5284. }
  5285. }
  5286. } else if (!invalidHeaderCharRegex.test(obj[name])) {
  5287. headers[MAP][name] = [obj[name]];
  5288. }
  5289. }
  5290. return headers;
  5291. }
  5292. const INTERNALS$1 = Symbol('Response internals');
  5293. // fix an issue where "STATUS_CODES" aren't a named export for node <10
  5294. const STATUS_CODES = http.STATUS_CODES;
  5295. /**
  5296. * Response class
  5297. *
  5298. * @param Stream body Readable stream
  5299. * @param Object opts Response options
  5300. * @return Void
  5301. */
  5302. class Response {
  5303. constructor() {
  5304. let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  5305. let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  5306. Body.call(this, body, opts);
  5307. const status = opts.status || 200;
  5308. const headers = new Headers(opts.headers);
  5309. if (body != null && !headers.has('Content-Type')) {
  5310. const contentType = extractContentType(body);
  5311. if (contentType) {
  5312. headers.append('Content-Type', contentType);
  5313. }
  5314. }
  5315. this[INTERNALS$1] = {
  5316. url: opts.url,
  5317. status,
  5318. statusText: opts.statusText || STATUS_CODES[status],
  5319. headers,
  5320. counter: opts.counter
  5321. };
  5322. }
  5323. get url() {
  5324. return this[INTERNALS$1].url || '';
  5325. }
  5326. get status() {
  5327. return this[INTERNALS$1].status;
  5328. }
  5329. /**
  5330. * Convenience property representing if the request ended normally
  5331. */
  5332. get ok() {
  5333. return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300;
  5334. }
  5335. get redirected() {
  5336. return this[INTERNALS$1].counter > 0;
  5337. }
  5338. get statusText() {
  5339. return this[INTERNALS$1].statusText;
  5340. }
  5341. get headers() {
  5342. return this[INTERNALS$1].headers;
  5343. }
  5344. /**
  5345. * Clone this response
  5346. *
  5347. * @return Response
  5348. */
  5349. clone() {
  5350. return new Response(clone(this), {
  5351. url: this.url,
  5352. status: this.status,
  5353. statusText: this.statusText,
  5354. headers: this.headers,
  5355. ok: this.ok,
  5356. redirected: this.redirected
  5357. });
  5358. }
  5359. }
  5360. Body.mixIn(Response.prototype);
  5361. Object.defineProperties(Response.prototype, {
  5362. url: { enumerable: true },
  5363. status: { enumerable: true },
  5364. ok: { enumerable: true },
  5365. redirected: { enumerable: true },
  5366. statusText: { enumerable: true },
  5367. headers: { enumerable: true },
  5368. clone: { enumerable: true }
  5369. });
  5370. Object.defineProperty(Response.prototype, Symbol.toStringTag, {
  5371. value: 'Response',
  5372. writable: false,
  5373. enumerable: false,
  5374. configurable: true
  5375. });
  5376. const INTERNALS$2 = Symbol('Request internals');
  5377. // fix an issue where "format", "parse" aren't a named export for node <10
  5378. const parse_url = Url.parse;
  5379. const format_url = Url.format;
  5380. const streamDestructionSupported = 'destroy' in Stream.Readable.prototype;
  5381. /**
  5382. * Check if a value is an instance of Request.
  5383. *
  5384. * @param Mixed input
  5385. * @return Boolean
  5386. */
  5387. function isRequest(input) {
  5388. return typeof input === 'object' && typeof input[INTERNALS$2] === 'object';
  5389. }
  5390. function isAbortSignal(signal) {
  5391. const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal);
  5392. return !!(proto && proto.constructor.name === 'AbortSignal');
  5393. }
  5394. /**
  5395. * Request class
  5396. *
  5397. * @param Mixed input Url or Request instance
  5398. * @param Object init Custom options
  5399. * @return Void
  5400. */
  5401. class Request {
  5402. constructor(input) {
  5403. let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  5404. let parsedURL;
  5405. // normalize input
  5406. if (!isRequest(input)) {
  5407. if (input && input.href) {
  5408. // in order to support Node.js' Url objects; though WHATWG's URL objects
  5409. // will fall into this branch also (since their `toString()` will return
  5410. // `href` property anyway)
  5411. parsedURL = parse_url(input.href);
  5412. } else {
  5413. // coerce input to a string before attempting to parse
  5414. parsedURL = parse_url(`${input}`);
  5415. }
  5416. input = {};
  5417. } else {
  5418. parsedURL = parse_url(input.url);
  5419. }
  5420. let method = init.method || input.method || 'GET';
  5421. method = method.toUpperCase();
  5422. if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) {
  5423. throw new TypeError('Request with GET/HEAD method cannot have body');
  5424. }
  5425. let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null;
  5426. Body.call(this, inputBody, {
  5427. timeout: init.timeout || input.timeout || 0,
  5428. size: init.size || input.size || 0
  5429. });
  5430. const headers = new Headers(init.headers || input.headers || {});
  5431. if (inputBody != null && !headers.has('Content-Type')) {
  5432. const contentType = extractContentType(inputBody);
  5433. if (contentType) {
  5434. headers.append('Content-Type', contentType);
  5435. }
  5436. }
  5437. let signal = isRequest(input) ? input.signal : null;
  5438. if ('signal' in init) signal = init.signal;
  5439. if (signal != null && !isAbortSignal(signal)) {
  5440. throw new TypeError('Expected signal to be an instanceof AbortSignal');
  5441. }
  5442. this[INTERNALS$2] = {
  5443. method,
  5444. redirect: init.redirect || input.redirect || 'follow',
  5445. headers,
  5446. parsedURL,
  5447. signal
  5448. };
  5449. // node-fetch-only options
  5450. this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20;
  5451. this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
  5452. this.counter = init.counter || input.counter || 0;
  5453. this.agent = init.agent || input.agent;
  5454. }
  5455. get method() {
  5456. return this[INTERNALS$2].method;
  5457. }
  5458. get url() {
  5459. return format_url(this[INTERNALS$2].parsedURL);
  5460. }
  5461. get headers() {
  5462. return this[INTERNALS$2].headers;
  5463. }
  5464. get redirect() {
  5465. return this[INTERNALS$2].redirect;
  5466. }
  5467. get signal() {
  5468. return this[INTERNALS$2].signal;
  5469. }
  5470. /**
  5471. * Clone this request
  5472. *
  5473. * @return Request
  5474. */
  5475. clone() {
  5476. return new Request(this);
  5477. }
  5478. }
  5479. Body.mixIn(Request.prototype);
  5480. Object.defineProperty(Request.prototype, Symbol.toStringTag, {
  5481. value: 'Request',
  5482. writable: false,
  5483. enumerable: false,
  5484. configurable: true
  5485. });
  5486. Object.defineProperties(Request.prototype, {
  5487. method: { enumerable: true },
  5488. url: { enumerable: true },
  5489. headers: { enumerable: true },
  5490. redirect: { enumerable: true },
  5491. clone: { enumerable: true },
  5492. signal: { enumerable: true }
  5493. });
  5494. /**
  5495. * Convert a Request to Node.js http request options.
  5496. *
  5497. * @param Request A Request instance
  5498. * @return Object The options object to be passed to http.request
  5499. */
  5500. function getNodeRequestOptions(request) {
  5501. const parsedURL = request[INTERNALS$2].parsedURL;
  5502. const headers = new Headers(request[INTERNALS$2].headers);
  5503. // fetch step 1.3
  5504. if (!headers.has('Accept')) {
  5505. headers.set('Accept', '*/*');
  5506. }
  5507. // Basic fetch
  5508. if (!parsedURL.protocol || !parsedURL.hostname) {
  5509. throw new TypeError('Only absolute URLs are supported');
  5510. }
  5511. if (!/^https?:$/.test(parsedURL.protocol)) {
  5512. throw new TypeError('Only HTTP(S) protocols are supported');
  5513. }
  5514. if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) {
  5515. throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8');
  5516. }
  5517. // HTTP-network-or-cache fetch steps 2.4-2.7
  5518. let contentLengthValue = null;
  5519. if (request.body == null && /^(POST|PUT)$/i.test(request.method)) {
  5520. contentLengthValue = '0';
  5521. }
  5522. if (request.body != null) {
  5523. const totalBytes = getTotalBytes(request);
  5524. if (typeof totalBytes === 'number') {
  5525. contentLengthValue = String(totalBytes);
  5526. }
  5527. }
  5528. if (contentLengthValue) {
  5529. headers.set('Content-Length', contentLengthValue);
  5530. }
  5531. // HTTP-network-or-cache fetch step 2.11
  5532. if (!headers.has('User-Agent')) {
  5533. headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)');
  5534. }
  5535. // HTTP-network-or-cache fetch step 2.15
  5536. if (request.compress && !headers.has('Accept-Encoding')) {
  5537. headers.set('Accept-Encoding', 'gzip,deflate');
  5538. }
  5539. let agent = request.agent;
  5540. if (typeof agent === 'function') {
  5541. agent = agent(parsedURL);
  5542. }
  5543. if (!headers.has('Connection') && !agent) {
  5544. headers.set('Connection', 'close');
  5545. }
  5546. // HTTP-network fetch step 4.2
  5547. // chunked encoding is handled by Node.js
  5548. return Object.assign({}, parsedURL, {
  5549. method: request.method,
  5550. headers: exportNodeCompatibleHeaders(headers),
  5551. agent
  5552. });
  5553. }
  5554. /**
  5555. * abort-error.js
  5556. *
  5557. * AbortError interface for cancelled requests
  5558. */
  5559. /**
  5560. * Create AbortError instance
  5561. *
  5562. * @param String message Error message for human
  5563. * @return AbortError
  5564. */
  5565. function AbortError(message) {
  5566. Error.call(this, message);
  5567. this.type = 'aborted';
  5568. this.message = message;
  5569. // hide custom error implementation details from end-users
  5570. Error.captureStackTrace(this, this.constructor);
  5571. }
  5572. AbortError.prototype = Object.create(Error.prototype);
  5573. AbortError.prototype.constructor = AbortError;
  5574. AbortError.prototype.name = 'AbortError';
  5575. // fix an issue where "PassThrough", "resolve" aren't a named export for node <10
  5576. const PassThrough$1 = Stream.PassThrough;
  5577. const resolve_url = Url.resolve;
  5578. /**
  5579. * Fetch function
  5580. *
  5581. * @param Mixed url Absolute url or Request instance
  5582. * @param Object opts Fetch options
  5583. * @return Promise
  5584. */
  5585. function fetch(url, opts) {
  5586. // allow custom promise
  5587. if (!fetch.Promise) {
  5588. throw new Error('native promise missing, set fetch.Promise to your favorite alternative');
  5589. }
  5590. Body.Promise = fetch.Promise;
  5591. // wrap http.request into fetch
  5592. return new fetch.Promise(function (resolve, reject) {
  5593. // build request object
  5594. const request = new Request(url, opts);
  5595. const options = getNodeRequestOptions(request);
  5596. const send = (options.protocol === 'https:' ? https : http).request;
  5597. const signal = request.signal;
  5598. let response = null;
  5599. const abort = function abort() {
  5600. let error = new AbortError('The user aborted a request.');
  5601. reject(error);
  5602. if (request.body && request.body instanceof Stream.Readable) {
  5603. request.body.destroy(error);
  5604. }
  5605. if (!response || !response.body) return;
  5606. response.body.emit('error', error);
  5607. };
  5608. if (signal && signal.aborted) {
  5609. abort();
  5610. return;
  5611. }
  5612. const abortAndFinalize = function abortAndFinalize() {
  5613. abort();
  5614. finalize();
  5615. };
  5616. // send request
  5617. const req = send(options);
  5618. let reqTimeout;
  5619. if (signal) {
  5620. signal.addEventListener('abort', abortAndFinalize);
  5621. }
  5622. function finalize() {
  5623. req.abort();
  5624. if (signal) signal.removeEventListener('abort', abortAndFinalize);
  5625. clearTimeout(reqTimeout);
  5626. }
  5627. if (request.timeout) {
  5628. req.once('socket', function (socket) {
  5629. reqTimeout = setTimeout(function () {
  5630. reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout'));
  5631. finalize();
  5632. }, request.timeout);
  5633. });
  5634. }
  5635. req.on('error', function (err) {
  5636. reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err));
  5637. finalize();
  5638. });
  5639. req.on('response', function (res) {
  5640. clearTimeout(reqTimeout);
  5641. const headers = createHeadersLenient(res.headers);
  5642. // HTTP fetch step 5
  5643. if (fetch.isRedirect(res.statusCode)) {
  5644. // HTTP fetch step 5.2
  5645. const location = headers.get('Location');
  5646. // HTTP fetch step 5.3
  5647. const locationURL = location === null ? null : resolve_url(request.url, location);
  5648. // HTTP fetch step 5.5
  5649. switch (request.redirect) {
  5650. case 'error':
  5651. reject(new FetchError(`redirect mode is set to error: ${request.url}`, 'no-redirect'));
  5652. finalize();
  5653. return;
  5654. case 'manual':
  5655. // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL.
  5656. if (locationURL !== null) {
  5657. // handle corrupted header
  5658. try {
  5659. headers.set('Location', locationURL);
  5660. } catch (err) {
  5661. // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request
  5662. reject(err);
  5663. }
  5664. }
  5665. break;
  5666. case 'follow':
  5667. // HTTP-redirect fetch step 2
  5668. if (locationURL === null) {
  5669. break;
  5670. }
  5671. // HTTP-redirect fetch step 5
  5672. if (request.counter >= request.follow) {
  5673. reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect'));
  5674. finalize();
  5675. return;
  5676. }
  5677. // HTTP-redirect fetch step 6 (counter increment)
  5678. // Create a new Request object.
  5679. const requestOpts = {
  5680. headers: new Headers(request.headers),
  5681. follow: request.follow,
  5682. counter: request.counter + 1,
  5683. agent: request.agent,
  5684. compress: request.compress,
  5685. method: request.method,
  5686. body: request.body,
  5687. signal: request.signal,
  5688. timeout: request.timeout
  5689. };
  5690. // HTTP-redirect fetch step 9
  5691. if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) {
  5692. reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect'));
  5693. finalize();
  5694. return;
  5695. }
  5696. // HTTP-redirect fetch step 11
  5697. if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') {
  5698. requestOpts.method = 'GET';
  5699. requestOpts.body = undefined;
  5700. requestOpts.headers.delete('content-length');
  5701. }
  5702. // HTTP-redirect fetch step 15
  5703. resolve(fetch(new Request(locationURL, requestOpts)));
  5704. finalize();
  5705. return;
  5706. }
  5707. }
  5708. // prepare response
  5709. res.once('end', function () {
  5710. if (signal) signal.removeEventListener('abort', abortAndFinalize);
  5711. });
  5712. let body = res.pipe(new PassThrough$1());
  5713. const response_options = {
  5714. url: request.url,
  5715. status: res.statusCode,
  5716. statusText: res.statusMessage,
  5717. headers: headers,
  5718. size: request.size,
  5719. timeout: request.timeout,
  5720. counter: request.counter
  5721. };
  5722. // HTTP-network fetch step 12.1.1.3
  5723. const codings = headers.get('Content-Encoding');
  5724. // HTTP-network fetch step 12.1.1.4: handle content codings
  5725. // in following scenarios we ignore compression support
  5726. // 1. compression support is disabled
  5727. // 2. HEAD request
  5728. // 3. no Content-Encoding header
  5729. // 4. no content response (204)
  5730. // 5. content not modified response (304)
  5731. if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) {
  5732. response = new Response(body, response_options);
  5733. resolve(response);
  5734. return;
  5735. }
  5736. // For Node v6+
  5737. // Be less strict when decoding compressed responses, since sometimes
  5738. // servers send slightly invalid responses that are still accepted
  5739. // by common browsers.
  5740. // Always using Z_SYNC_FLUSH is what cURL does.
  5741. const zlibOptions = {
  5742. flush: zlib.Z_SYNC_FLUSH,
  5743. finishFlush: zlib.Z_SYNC_FLUSH
  5744. };
  5745. // for gzip
  5746. if (codings == 'gzip' || codings == 'x-gzip') {
  5747. body = body.pipe(zlib.createGunzip(zlibOptions));
  5748. response = new Response(body, response_options);
  5749. resolve(response);
  5750. return;
  5751. }
  5752. // for deflate
  5753. if (codings == 'deflate' || codings == 'x-deflate') {
  5754. // handle the infamous raw deflate response from old servers
  5755. // a hack for old IIS and Apache servers
  5756. const raw = res.pipe(new PassThrough$1());
  5757. raw.once('data', function (chunk) {
  5758. // see http://stackoverflow.com/questions/37519828
  5759. if ((chunk[0] & 0x0F) === 0x08) {
  5760. body = body.pipe(zlib.createInflate());
  5761. } else {
  5762. body = body.pipe(zlib.createInflateRaw());
  5763. }
  5764. response = new Response(body, response_options);
  5765. resolve(response);
  5766. });
  5767. return;
  5768. }
  5769. // for br
  5770. if (codings == 'br' && typeof zlib.createBrotliDecompress === 'function') {
  5771. body = body.pipe(zlib.createBrotliDecompress());
  5772. response = new Response(body, response_options);
  5773. resolve(response);
  5774. return;
  5775. }
  5776. // otherwise, use response as-is
  5777. response = new Response(body, response_options);
  5778. resolve(response);
  5779. });
  5780. writeToStream(req, request);
  5781. });
  5782. }
  5783. /**
  5784. * Redirect code matching
  5785. *
  5786. * @param Number code Status code
  5787. * @return Boolean
  5788. */
  5789. fetch.isRedirect = function (code) {
  5790. return code === 301 || code === 302 || code === 303 || code === 307 || code === 308;
  5791. };
  5792. // expose Promise
  5793. fetch.Promise = global.Promise;
  5794. module.exports = exports = fetch;
  5795. Object.defineProperty(exports, "__esModule", { value: true });
  5796. exports.default = exports;
  5797. exports.Headers = Headers;
  5798. exports.Request = Request;
  5799. exports.Response = Response;
  5800. exports.FetchError = FetchError;
  5801. /***/ }),
  5802. /***/ 462:
  5803. /***/ (function(module) {
  5804. "use strict";
  5805. // See http://www.robvanderwoude.com/escapechars.php
  5806. const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
  5807. function escapeCommand(arg) {
  5808. // Escape meta chars
  5809. arg = arg.replace(metaCharsRegExp, '^$1');
  5810. return arg;
  5811. }
  5812. function escapeArgument(arg, doubleEscapeMetaChars) {
  5813. // Convert to string
  5814. arg = `${arg}`;
  5815. // Algorithm below is based on https://qntm.org/cmd
  5816. // Sequence of backslashes followed by a double quote:
  5817. // double up all the backslashes and escape the double quote
  5818. arg = arg.replace(/(\\*)"/g, '$1$1\\"');
  5819. // Sequence of backslashes followed by the end of the string
  5820. // (which will become a double quote later):
  5821. // double up all the backslashes
  5822. arg = arg.replace(/(\\*)$/, '$1$1');
  5823. // All other backslashes occur literally
  5824. // Quote the whole thing:
  5825. arg = `"${arg}"`;
  5826. // Escape meta chars
  5827. arg = arg.replace(metaCharsRegExp, '^$1');
  5828. // Double escape meta chars if necessary
  5829. if (doubleEscapeMetaChars) {
  5830. arg = arg.replace(metaCharsRegExp, '^$1');
  5831. }
  5832. return arg;
  5833. }
  5834. module.exports.command = escapeCommand;
  5835. module.exports.argument = escapeArgument;
  5836. /***/ }),
  5837. /***/ 463:
  5838. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  5839. "use strict";
  5840. Object.defineProperty(exports, '__esModule', { value: true });
  5841. function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
  5842. var deprecation = __webpack_require__(692);
  5843. var once = _interopDefault(__webpack_require__(969));
  5844. const logOnce = once(deprecation => console.warn(deprecation));
  5845. /**
  5846. * Error with extra properties to help with debugging
  5847. */
  5848. class RequestError extends Error {
  5849. constructor(message, statusCode, options) {
  5850. super(message); // Maintains proper stack trace (only available on V8)
  5851. /* istanbul ignore next */
  5852. if (Error.captureStackTrace) {
  5853. Error.captureStackTrace(this, this.constructor);
  5854. }
  5855. this.name = "HttpError";
  5856. this.status = statusCode;
  5857. Object.defineProperty(this, "code", {
  5858. get() {
  5859. logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
  5860. return statusCode;
  5861. }
  5862. });
  5863. this.headers = options.headers || {}; // redact request credentials without mutating original request options
  5864. const requestCopy = Object.assign({}, options.request);
  5865. if (options.request.headers.authorization) {
  5866. requestCopy.headers = Object.assign({}, options.request.headers, {
  5867. authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]")
  5868. });
  5869. }
  5870. requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit
  5871. // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications
  5872. .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended
  5873. // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header
  5874. .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
  5875. this.request = requestCopy;
  5876. }
  5877. }
  5878. exports.RequestError = RequestError;
  5879. //# sourceMappingURL=index.js.map
  5880. /***/ }),
  5881. /***/ 469:
  5882. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  5883. "use strict";
  5884. var __importStar = (this && this.__importStar) || function (mod) {
  5885. if (mod && mod.__esModule) return mod;
  5886. var result = {};
  5887. if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
  5888. result["default"] = mod;
  5889. return result;
  5890. };
  5891. Object.defineProperty(exports, "__esModule", { value: true });
  5892. // Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/github.ts
  5893. const graphql_1 = __webpack_require__(898);
  5894. const rest_1 = __webpack_require__(0);
  5895. const Context = __importStar(__webpack_require__(262));
  5896. const httpClient = __importStar(__webpack_require__(539));
  5897. // We need this in order to extend Octokit
  5898. rest_1.Octokit.prototype = new rest_1.Octokit();
  5899. exports.context = new Context.Context();
  5900. class GitHub extends rest_1.Octokit {
  5901. constructor(token, opts) {
  5902. super(GitHub.getOctokitOptions(GitHub.disambiguate(token, opts)));
  5903. this.graphql = GitHub.getGraphQL(GitHub.disambiguate(token, opts));
  5904. }
  5905. /**
  5906. * Disambiguates the constructor overload parameters
  5907. */
  5908. static disambiguate(token, opts) {
  5909. return [
  5910. typeof token === 'string' ? token : '',
  5911. typeof token === 'object' ? token : opts || {}
  5912. ];
  5913. }
  5914. static getOctokitOptions(args) {
  5915. const token = args[0];
  5916. const options = Object.assign({}, args[1]); // Shallow clone - don't mutate the object provided by the caller
  5917. // Auth
  5918. const auth = GitHub.getAuthString(token, options);
  5919. if (auth) {
  5920. options.auth = auth;
  5921. }
  5922. // Proxy
  5923. const agent = GitHub.getProxyAgent(options);
  5924. if (agent) {
  5925. // Shallow clone - don't mutate the object provided by the caller
  5926. options.request = options.request ? Object.assign({}, options.request) : {};
  5927. // Set the agent
  5928. options.request.agent = agent;
  5929. }
  5930. return options;
  5931. }
  5932. static getGraphQL(args) {
  5933. const defaults = {};
  5934. const token = args[0];
  5935. const options = args[1];
  5936. // Authorization
  5937. const auth = this.getAuthString(token, options);
  5938. if (auth) {
  5939. defaults.headers = {
  5940. authorization: auth
  5941. };
  5942. }
  5943. // Proxy
  5944. const agent = GitHub.getProxyAgent(options);
  5945. if (agent) {
  5946. defaults.request = { agent };
  5947. }
  5948. return graphql_1.graphql.defaults(defaults);
  5949. }
  5950. static getAuthString(token, options) {
  5951. // Validate args
  5952. if (!token && !options.auth) {
  5953. throw new Error('Parameter token or opts.auth is required');
  5954. }
  5955. else if (token && options.auth) {
  5956. throw new Error('Parameters token and opts.auth may not both be specified');
  5957. }
  5958. return typeof options.auth === 'string' ? options.auth : `token ${token}`;
  5959. }
  5960. static getProxyAgent(options) {
  5961. var _a;
  5962. if (!((_a = options.request) === null || _a === void 0 ? void 0 : _a.agent)) {
  5963. const serverUrl = 'https://api.github.com';
  5964. if (httpClient.getProxyUrl(serverUrl)) {
  5965. const hc = new httpClient.HttpClient();
  5966. return hc.getAgent(serverUrl);
  5967. }
  5968. }
  5969. return undefined;
  5970. }
  5971. }
  5972. exports.GitHub = GitHub;
  5973. //# sourceMappingURL=github.js.map
  5974. /***/ }),
  5975. /***/ 470:
  5976. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  5977. "use strict";
  5978. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  5979. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  5980. return new (P || (P = Promise))(function (resolve, reject) {
  5981. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  5982. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  5983. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  5984. step((generator = generator.apply(thisArg, _arguments || [])).next());
  5985. });
  5986. };
  5987. var __importStar = (this && this.__importStar) || function (mod) {
  5988. if (mod && mod.__esModule) return mod;
  5989. var result = {};
  5990. if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
  5991. result["default"] = mod;
  5992. return result;
  5993. };
  5994. Object.defineProperty(exports, "__esModule", { value: true });
  5995. const command_1 = __webpack_require__(431);
  5996. const os = __importStar(__webpack_require__(87));
  5997. const path = __importStar(__webpack_require__(622));
  5998. /**
  5999. * The code to exit an action
  6000. */
  6001. var ExitCode;
  6002. (function (ExitCode) {
  6003. /**
  6004. * A code indicating that the action was successful
  6005. */
  6006. ExitCode[ExitCode["Success"] = 0] = "Success";
  6007. /**
  6008. * A code indicating that the action was a failure
  6009. */
  6010. ExitCode[ExitCode["Failure"] = 1] = "Failure";
  6011. })(ExitCode = exports.ExitCode || (exports.ExitCode = {}));
  6012. //-----------------------------------------------------------------------
  6013. // Variables
  6014. //-----------------------------------------------------------------------
  6015. /**
  6016. * Sets env variable for this action and future actions in the job
  6017. * @param name the name of the variable to set
  6018. * @param val the value of the variable
  6019. */
  6020. function exportVariable(name, val) {
  6021. process.env[name] = val;
  6022. command_1.issueCommand('set-env', { name }, val);
  6023. }
  6024. exports.exportVariable = exportVariable;
  6025. /**
  6026. * Registers a secret which will get masked from logs
  6027. * @param secret value of the secret
  6028. */
  6029. function setSecret(secret) {
  6030. command_1.issueCommand('add-mask', {}, secret);
  6031. }
  6032. exports.setSecret = setSecret;
  6033. /**
  6034. * Prepends inputPath to the PATH (for this action and future actions)
  6035. * @param inputPath
  6036. */
  6037. function addPath(inputPath) {
  6038. command_1.issueCommand('add-path', {}, inputPath);
  6039. process.env['PATH'] = `${inputPath}${path.delimiter}${process.env['PATH']}`;
  6040. }
  6041. exports.addPath = addPath;
  6042. /**
  6043. * Gets the value of an input. The value is also trimmed.
  6044. *
  6045. * @param name name of the input to get
  6046. * @param options optional. See InputOptions.
  6047. * @returns string
  6048. */
  6049. function getInput(name, options) {
  6050. const val = process.env[`INPUT_${name.replace(/ /g, '_').toUpperCase()}`] || '';
  6051. if (options && options.required && !val) {
  6052. throw new Error(`Input required and not supplied: ${name}`);
  6053. }
  6054. return val.trim();
  6055. }
  6056. exports.getInput = getInput;
  6057. /**
  6058. * Sets the value of an output.
  6059. *
  6060. * @param name name of the output to set
  6061. * @param value value to store
  6062. */
  6063. function setOutput(name, value) {
  6064. command_1.issueCommand('set-output', { name }, value);
  6065. }
  6066. exports.setOutput = setOutput;
  6067. //-----------------------------------------------------------------------
  6068. // Results
  6069. //-----------------------------------------------------------------------
  6070. /**
  6071. * Sets the action status to failed.
  6072. * When the action exits it will be with an exit code of 1
  6073. * @param message add error issue message
  6074. */
  6075. function setFailed(message) {
  6076. process.exitCode = ExitCode.Failure;
  6077. error(message);
  6078. }
  6079. exports.setFailed = setFailed;
  6080. //-----------------------------------------------------------------------
  6081. // Logging Commands
  6082. //-----------------------------------------------------------------------
  6083. /**
  6084. * Gets whether Actions Step Debug is on or not
  6085. */
  6086. function isDebug() {
  6087. return process.env['RUNNER_DEBUG'] === '1';
  6088. }
  6089. exports.isDebug = isDebug;
  6090. /**
  6091. * Writes debug message to user log
  6092. * @param message debug message
  6093. */
  6094. function debug(message) {
  6095. command_1.issueCommand('debug', {}, message);
  6096. }
  6097. exports.debug = debug;
  6098. /**
  6099. * Adds an error issue
  6100. * @param message error issue message
  6101. */
  6102. function error(message) {
  6103. command_1.issue('error', message);
  6104. }
  6105. exports.error = error;
  6106. /**
  6107. * Adds an warning issue
  6108. * @param message warning issue message
  6109. */
  6110. function warning(message) {
  6111. command_1.issue('warning', message);
  6112. }
  6113. exports.warning = warning;
  6114. /**
  6115. * Writes info to log with console.log.
  6116. * @param message info message
  6117. */
  6118. function info(message) {
  6119. process.stdout.write(message + os.EOL);
  6120. }
  6121. exports.info = info;
  6122. /**
  6123. * Begin an output group.
  6124. *
  6125. * Output until the next `groupEnd` will be foldable in this group
  6126. *
  6127. * @param name The name of the output group
  6128. */
  6129. function startGroup(name) {
  6130. command_1.issue('group', name);
  6131. }
  6132. exports.startGroup = startGroup;
  6133. /**
  6134. * End an output group.
  6135. */
  6136. function endGroup() {
  6137. command_1.issue('endgroup');
  6138. }
  6139. exports.endGroup = endGroup;
  6140. /**
  6141. * Wrap an asynchronous function call in a group.
  6142. *
  6143. * Returns the same type as the function itself.
  6144. *
  6145. * @param name The name of the group
  6146. * @param fn The function to wrap in the group
  6147. */
  6148. function group(name, fn) {
  6149. return __awaiter(this, void 0, void 0, function* () {
  6150. startGroup(name);
  6151. let result;
  6152. try {
  6153. result = yield fn();
  6154. }
  6155. finally {
  6156. endGroup();
  6157. }
  6158. return result;
  6159. });
  6160. }
  6161. exports.group = group;
  6162. //-----------------------------------------------------------------------
  6163. // Wrapper action state
  6164. //-----------------------------------------------------------------------
  6165. /**
  6166. * Saves state for current action, the state can only be retrieved by this action's post job execution.
  6167. *
  6168. * @param name name of the state to store
  6169. * @param value value to store
  6170. */
  6171. function saveState(name, value) {
  6172. command_1.issueCommand('save-state', { name }, value);
  6173. }
  6174. exports.saveState = saveState;
  6175. /**
  6176. * Gets the value of an state set by this action's main execution.
  6177. *
  6178. * @param name name of the state to get
  6179. * @returns string
  6180. */
  6181. function getState(name) {
  6182. return process.env[`STATE_${name}`] || '';
  6183. }
  6184. exports.getState = getState;
  6185. //# sourceMappingURL=core.js.map
  6186. /***/ }),
  6187. /***/ 471:
  6188. /***/ (function(module, __unusedexports, __webpack_require__) {
  6189. module.exports = authenticationBeforeRequest;
  6190. const btoa = __webpack_require__(675);
  6191. const uniq = __webpack_require__(126);
  6192. function authenticationBeforeRequest(state, options) {
  6193. if (!state.auth.type) {
  6194. return;
  6195. }
  6196. if (state.auth.type === "basic") {
  6197. const hash = btoa(`${state.auth.username}:${state.auth.password}`);
  6198. options.headers.authorization = `Basic ${hash}`;
  6199. return;
  6200. }
  6201. if (state.auth.type === "token") {
  6202. options.headers.authorization = `token ${state.auth.token}`;
  6203. return;
  6204. }
  6205. if (state.auth.type === "app") {
  6206. options.headers.authorization = `Bearer ${state.auth.token}`;
  6207. const acceptHeaders = options.headers.accept
  6208. .split(",")
  6209. .concat("application/vnd.github.machine-man-preview+json");
  6210. options.headers.accept = uniq(acceptHeaders)
  6211. .filter(Boolean)
  6212. .join(",");
  6213. return;
  6214. }
  6215. options.url += options.url.indexOf("?") === -1 ? "?" : "&";
  6216. if (state.auth.token) {
  6217. options.url += `access_token=${encodeURIComponent(state.auth.token)}`;
  6218. return;
  6219. }
  6220. const key = encodeURIComponent(state.auth.key);
  6221. const secret = encodeURIComponent(state.auth.secret);
  6222. options.url += `client_id=${key}&client_secret=${secret}`;
  6223. }
  6224. /***/ }),
  6225. /***/ 489:
  6226. /***/ (function(module, __unusedexports, __webpack_require__) {
  6227. "use strict";
  6228. const path = __webpack_require__(622);
  6229. const which = __webpack_require__(814);
  6230. const pathKey = __webpack_require__(39)();
  6231. function resolveCommandAttempt(parsed, withoutPathExt) {
  6232. const cwd = process.cwd();
  6233. const hasCustomCwd = parsed.options.cwd != null;
  6234. // If a custom `cwd` was specified, we need to change the process cwd
  6235. // because `which` will do stat calls but does not support a custom cwd
  6236. if (hasCustomCwd) {
  6237. try {
  6238. process.chdir(parsed.options.cwd);
  6239. } catch (err) {
  6240. /* Empty */
  6241. }
  6242. }
  6243. let resolved;
  6244. try {
  6245. resolved = which.sync(parsed.command, {
  6246. path: (parsed.options.env || process.env)[pathKey],
  6247. pathExt: withoutPathExt ? path.delimiter : undefined,
  6248. });
  6249. } catch (e) {
  6250. /* Empty */
  6251. } finally {
  6252. process.chdir(cwd);
  6253. }
  6254. // If we successfully resolved, ensure that an absolute path is returned
  6255. // Note that when a custom `cwd` was used, we need to resolve to an absolute path based on it
  6256. if (resolved) {
  6257. resolved = path.resolve(hasCustomCwd ? parsed.options.cwd : '', resolved);
  6258. }
  6259. return resolved;
  6260. }
  6261. function resolveCommand(parsed) {
  6262. return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
  6263. }
  6264. module.exports = resolveCommand;
  6265. /***/ }),
  6266. /***/ 497:
  6267. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  6268. "use strict";
  6269. Object.defineProperty(exports, '__esModule', { value: true });
  6270. function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
  6271. var deprecation = __webpack_require__(692);
  6272. var once = _interopDefault(__webpack_require__(969));
  6273. const logOnce = once(deprecation => console.warn(deprecation));
  6274. /**
  6275. * Error with extra properties to help with debugging
  6276. */
  6277. class RequestError extends Error {
  6278. constructor(message, statusCode, options) {
  6279. super(message); // Maintains proper stack trace (only available on V8)
  6280. /* istanbul ignore next */
  6281. if (Error.captureStackTrace) {
  6282. Error.captureStackTrace(this, this.constructor);
  6283. }
  6284. this.name = "HttpError";
  6285. this.status = statusCode;
  6286. Object.defineProperty(this, "code", {
  6287. get() {
  6288. logOnce(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
  6289. return statusCode;
  6290. }
  6291. });
  6292. this.headers = options.headers || {}; // redact request credentials without mutating original request options
  6293. const requestCopy = Object.assign({}, options.request);
  6294. if (options.request.headers.authorization) {
  6295. requestCopy.headers = Object.assign({}, options.request.headers, {
  6296. authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]")
  6297. });
  6298. }
  6299. requestCopy.url = requestCopy.url // client_id & client_secret can be passed as URL query parameters to increase rate limit
  6300. // see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications
  6301. .replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]") // OAuth tokens can be passed as URL query parameters, although it is not recommended
  6302. // see https://developer.github.com/v3/#oauth2-token-sent-in-a-header
  6303. .replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
  6304. this.request = requestCopy;
  6305. }
  6306. }
  6307. exports.RequestError = RequestError;
  6308. //# sourceMappingURL=index.js.map
  6309. /***/ }),
  6310. /***/ 510:
  6311. /***/ (function(module) {
  6312. module.exports = addHook
  6313. function addHook (state, kind, name, hook) {
  6314. var orig = hook
  6315. if (!state.registry[name]) {
  6316. state.registry[name] = []
  6317. }
  6318. if (kind === 'before') {
  6319. hook = function (method, options) {
  6320. return Promise.resolve()
  6321. .then(orig.bind(null, options))
  6322. .then(method.bind(null, options))
  6323. }
  6324. }
  6325. if (kind === 'after') {
  6326. hook = function (method, options) {
  6327. var result
  6328. return Promise.resolve()
  6329. .then(method.bind(null, options))
  6330. .then(function (result_) {
  6331. result = result_
  6332. return orig(result, options)
  6333. })
  6334. .then(function () {
  6335. return result
  6336. })
  6337. }
  6338. }
  6339. if (kind === 'error') {
  6340. hook = function (method, options) {
  6341. return Promise.resolve()
  6342. .then(method.bind(null, options))
  6343. .catch(function (error) {
  6344. return orig(error, options)
  6345. })
  6346. }
  6347. }
  6348. state.registry[name].push({
  6349. hook: hook,
  6350. orig: orig
  6351. })
  6352. }
  6353. /***/ }),
  6354. /***/ 523:
  6355. /***/ (function(module, __unusedexports, __webpack_require__) {
  6356. var register = __webpack_require__(363)
  6357. var addHook = __webpack_require__(510)
  6358. var removeHook = __webpack_require__(763)
  6359. // bind with array of arguments: https://stackoverflow.com/a/21792913
  6360. var bind = Function.bind
  6361. var bindable = bind.bind(bind)
  6362. function bindApi (hook, state, name) {
  6363. var removeHookRef = bindable(removeHook, null).apply(null, name ? [state, name] : [state])
  6364. hook.api = { remove: removeHookRef }
  6365. hook.remove = removeHookRef
  6366. ;['before', 'error', 'after', 'wrap'].forEach(function (kind) {
  6367. var args = name ? [state, kind, name] : [state, kind]
  6368. hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args)
  6369. })
  6370. }
  6371. function HookSingular () {
  6372. var singularHookName = 'h'
  6373. var singularHookState = {
  6374. registry: {}
  6375. }
  6376. var singularHook = register.bind(null, singularHookState, singularHookName)
  6377. bindApi(singularHook, singularHookState, singularHookName)
  6378. return singularHook
  6379. }
  6380. function HookCollection () {
  6381. var state = {
  6382. registry: {}
  6383. }
  6384. var hook = register.bind(null, state)
  6385. bindApi(hook, state)
  6386. return hook
  6387. }
  6388. var collectionHookDeprecationMessageDisplayed = false
  6389. function Hook () {
  6390. if (!collectionHookDeprecationMessageDisplayed) {
  6391. console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4')
  6392. collectionHookDeprecationMessageDisplayed = true
  6393. }
  6394. return HookCollection()
  6395. }
  6396. Hook.Singular = HookSingular.bind()
  6397. Hook.Collection = HookCollection.bind()
  6398. module.exports = Hook
  6399. // expose constructors as a named property for TypeScript
  6400. module.exports.Hook = Hook
  6401. module.exports.Singular = Hook.Singular
  6402. module.exports.Collection = Hook.Collection
  6403. /***/ }),
  6404. /***/ 529:
  6405. /***/ (function(module, __unusedexports, __webpack_require__) {
  6406. const factory = __webpack_require__(47);
  6407. module.exports = factory();
  6408. /***/ }),
  6409. /***/ 536:
  6410. /***/ (function(module, __unusedexports, __webpack_require__) {
  6411. module.exports = hasFirstPage
  6412. const deprecate = __webpack_require__(370)
  6413. const getPageLinks = __webpack_require__(577)
  6414. function hasFirstPage (link) {
  6415. deprecate(`octokit.hasFirstPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`)
  6416. return getPageLinks(link).first
  6417. }
  6418. /***/ }),
  6419. /***/ 539:
  6420. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  6421. "use strict";
  6422. Object.defineProperty(exports, "__esModule", { value: true });
  6423. const url = __webpack_require__(835);
  6424. const http = __webpack_require__(605);
  6425. const https = __webpack_require__(211);
  6426. const pm = __webpack_require__(950);
  6427. let tunnel;
  6428. var HttpCodes;
  6429. (function (HttpCodes) {
  6430. HttpCodes[HttpCodes["OK"] = 200] = "OK";
  6431. HttpCodes[HttpCodes["MultipleChoices"] = 300] = "MultipleChoices";
  6432. HttpCodes[HttpCodes["MovedPermanently"] = 301] = "MovedPermanently";
  6433. HttpCodes[HttpCodes["ResourceMoved"] = 302] = "ResourceMoved";
  6434. HttpCodes[HttpCodes["SeeOther"] = 303] = "SeeOther";
  6435. HttpCodes[HttpCodes["NotModified"] = 304] = "NotModified";
  6436. HttpCodes[HttpCodes["UseProxy"] = 305] = "UseProxy";
  6437. HttpCodes[HttpCodes["SwitchProxy"] = 306] = "SwitchProxy";
  6438. HttpCodes[HttpCodes["TemporaryRedirect"] = 307] = "TemporaryRedirect";
  6439. HttpCodes[HttpCodes["PermanentRedirect"] = 308] = "PermanentRedirect";
  6440. HttpCodes[HttpCodes["BadRequest"] = 400] = "BadRequest";
  6441. HttpCodes[HttpCodes["Unauthorized"] = 401] = "Unauthorized";
  6442. HttpCodes[HttpCodes["PaymentRequired"] = 402] = "PaymentRequired";
  6443. HttpCodes[HttpCodes["Forbidden"] = 403] = "Forbidden";
  6444. HttpCodes[HttpCodes["NotFound"] = 404] = "NotFound";
  6445. HttpCodes[HttpCodes["MethodNotAllowed"] = 405] = "MethodNotAllowed";
  6446. HttpCodes[HttpCodes["NotAcceptable"] = 406] = "NotAcceptable";
  6447. HttpCodes[HttpCodes["ProxyAuthenticationRequired"] = 407] = "ProxyAuthenticationRequired";
  6448. HttpCodes[HttpCodes["RequestTimeout"] = 408] = "RequestTimeout";
  6449. HttpCodes[HttpCodes["Conflict"] = 409] = "Conflict";
  6450. HttpCodes[HttpCodes["Gone"] = 410] = "Gone";
  6451. HttpCodes[HttpCodes["TooManyRequests"] = 429] = "TooManyRequests";
  6452. HttpCodes[HttpCodes["InternalServerError"] = 500] = "InternalServerError";
  6453. HttpCodes[HttpCodes["NotImplemented"] = 501] = "NotImplemented";
  6454. HttpCodes[HttpCodes["BadGateway"] = 502] = "BadGateway";
  6455. HttpCodes[HttpCodes["ServiceUnavailable"] = 503] = "ServiceUnavailable";
  6456. HttpCodes[HttpCodes["GatewayTimeout"] = 504] = "GatewayTimeout";
  6457. })(HttpCodes = exports.HttpCodes || (exports.HttpCodes = {}));
  6458. var Headers;
  6459. (function (Headers) {
  6460. Headers["Accept"] = "accept";
  6461. Headers["ContentType"] = "content-type";
  6462. })(Headers = exports.Headers || (exports.Headers = {}));
  6463. var MediaTypes;
  6464. (function (MediaTypes) {
  6465. MediaTypes["ApplicationJson"] = "application/json";
  6466. })(MediaTypes = exports.MediaTypes || (exports.MediaTypes = {}));
  6467. /**
  6468. * Returns the proxy URL, depending upon the supplied url and proxy environment variables.
  6469. * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
  6470. */
  6471. function getProxyUrl(serverUrl) {
  6472. let proxyUrl = pm.getProxyUrl(url.parse(serverUrl));
  6473. return proxyUrl ? proxyUrl.href : '';
  6474. }
  6475. exports.getProxyUrl = getProxyUrl;
  6476. const HttpRedirectCodes = [
  6477. HttpCodes.MovedPermanently,
  6478. HttpCodes.ResourceMoved,
  6479. HttpCodes.SeeOther,
  6480. HttpCodes.TemporaryRedirect,
  6481. HttpCodes.PermanentRedirect
  6482. ];
  6483. const HttpResponseRetryCodes = [
  6484. HttpCodes.BadGateway,
  6485. HttpCodes.ServiceUnavailable,
  6486. HttpCodes.GatewayTimeout
  6487. ];
  6488. const RetryableHttpVerbs = ['OPTIONS', 'GET', 'DELETE', 'HEAD'];
  6489. const ExponentialBackoffCeiling = 10;
  6490. const ExponentialBackoffTimeSlice = 5;
  6491. class HttpClientResponse {
  6492. constructor(message) {
  6493. this.message = message;
  6494. }
  6495. readBody() {
  6496. return new Promise(async (resolve, reject) => {
  6497. let output = Buffer.alloc(0);
  6498. this.message.on('data', (chunk) => {
  6499. output = Buffer.concat([output, chunk]);
  6500. });
  6501. this.message.on('end', () => {
  6502. resolve(output.toString());
  6503. });
  6504. });
  6505. }
  6506. }
  6507. exports.HttpClientResponse = HttpClientResponse;
  6508. function isHttps(requestUrl) {
  6509. let parsedUrl = url.parse(requestUrl);
  6510. return parsedUrl.protocol === 'https:';
  6511. }
  6512. exports.isHttps = isHttps;
  6513. class HttpClient {
  6514. constructor(userAgent, handlers, requestOptions) {
  6515. this._ignoreSslError = false;
  6516. this._allowRedirects = true;
  6517. this._allowRedirectDowngrade = false;
  6518. this._maxRedirects = 50;
  6519. this._allowRetries = false;
  6520. this._maxRetries = 1;
  6521. this._keepAlive = false;
  6522. this._disposed = false;
  6523. this.userAgent = userAgent;
  6524. this.handlers = handlers || [];
  6525. this.requestOptions = requestOptions;
  6526. if (requestOptions) {
  6527. if (requestOptions.ignoreSslError != null) {
  6528. this._ignoreSslError = requestOptions.ignoreSslError;
  6529. }
  6530. this._socketTimeout = requestOptions.socketTimeout;
  6531. if (requestOptions.allowRedirects != null) {
  6532. this._allowRedirects = requestOptions.allowRedirects;
  6533. }
  6534. if (requestOptions.allowRedirectDowngrade != null) {
  6535. this._allowRedirectDowngrade = requestOptions.allowRedirectDowngrade;
  6536. }
  6537. if (requestOptions.maxRedirects != null) {
  6538. this._maxRedirects = Math.max(requestOptions.maxRedirects, 0);
  6539. }
  6540. if (requestOptions.keepAlive != null) {
  6541. this._keepAlive = requestOptions.keepAlive;
  6542. }
  6543. if (requestOptions.allowRetries != null) {
  6544. this._allowRetries = requestOptions.allowRetries;
  6545. }
  6546. if (requestOptions.maxRetries != null) {
  6547. this._maxRetries = requestOptions.maxRetries;
  6548. }
  6549. }
  6550. }
  6551. options(requestUrl, additionalHeaders) {
  6552. return this.request('OPTIONS', requestUrl, null, additionalHeaders || {});
  6553. }
  6554. get(requestUrl, additionalHeaders) {
  6555. return this.request('GET', requestUrl, null, additionalHeaders || {});
  6556. }
  6557. del(requestUrl, additionalHeaders) {
  6558. return this.request('DELETE', requestUrl, null, additionalHeaders || {});
  6559. }
  6560. post(requestUrl, data, additionalHeaders) {
  6561. return this.request('POST', requestUrl, data, additionalHeaders || {});
  6562. }
  6563. patch(requestUrl, data, additionalHeaders) {
  6564. return this.request('PATCH', requestUrl, data, additionalHeaders || {});
  6565. }
  6566. put(requestUrl, data, additionalHeaders) {
  6567. return this.request('PUT', requestUrl, data, additionalHeaders || {});
  6568. }
  6569. head(requestUrl, additionalHeaders) {
  6570. return this.request('HEAD', requestUrl, null, additionalHeaders || {});
  6571. }
  6572. sendStream(verb, requestUrl, stream, additionalHeaders) {
  6573. return this.request(verb, requestUrl, stream, additionalHeaders);
  6574. }
  6575. /**
  6576. * Gets a typed object from an endpoint
  6577. * Be aware that not found returns a null. Other errors (4xx, 5xx) reject the promise
  6578. */
  6579. async getJson(requestUrl, additionalHeaders = {}) {
  6580. additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
  6581. let res = await this.get(requestUrl, additionalHeaders);
  6582. return this._processResponse(res, this.requestOptions);
  6583. }
  6584. async postJson(requestUrl, obj, additionalHeaders = {}) {
  6585. let data = JSON.stringify(obj, null, 2);
  6586. additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
  6587. additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
  6588. let res = await this.post(requestUrl, data, additionalHeaders);
  6589. return this._processResponse(res, this.requestOptions);
  6590. }
  6591. async putJson(requestUrl, obj, additionalHeaders = {}) {
  6592. let data = JSON.stringify(obj, null, 2);
  6593. additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
  6594. additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
  6595. let res = await this.put(requestUrl, data, additionalHeaders);
  6596. return this._processResponse(res, this.requestOptions);
  6597. }
  6598. async patchJson(requestUrl, obj, additionalHeaders = {}) {
  6599. let data = JSON.stringify(obj, null, 2);
  6600. additionalHeaders[Headers.Accept] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.Accept, MediaTypes.ApplicationJson);
  6601. additionalHeaders[Headers.ContentType] = this._getExistingOrDefaultHeader(additionalHeaders, Headers.ContentType, MediaTypes.ApplicationJson);
  6602. let res = await this.patch(requestUrl, data, additionalHeaders);
  6603. return this._processResponse(res, this.requestOptions);
  6604. }
  6605. /**
  6606. * Makes a raw http request.
  6607. * All other methods such as get, post, patch, and request ultimately call this.
  6608. * Prefer get, del, post and patch
  6609. */
  6610. async request(verb, requestUrl, data, headers) {
  6611. if (this._disposed) {
  6612. throw new Error('Client has already been disposed.');
  6613. }
  6614. let parsedUrl = url.parse(requestUrl);
  6615. let info = this._prepareRequest(verb, parsedUrl, headers);
  6616. // Only perform retries on reads since writes may not be idempotent.
  6617. let maxTries = this._allowRetries && RetryableHttpVerbs.indexOf(verb) != -1
  6618. ? this._maxRetries + 1
  6619. : 1;
  6620. let numTries = 0;
  6621. let response;
  6622. while (numTries < maxTries) {
  6623. response = await this.requestRaw(info, data);
  6624. // Check if it's an authentication challenge
  6625. if (response &&
  6626. response.message &&
  6627. response.message.statusCode === HttpCodes.Unauthorized) {
  6628. let authenticationHandler;
  6629. for (let i = 0; i < this.handlers.length; i++) {
  6630. if (this.handlers[i].canHandleAuthentication(response)) {
  6631. authenticationHandler = this.handlers[i];
  6632. break;
  6633. }
  6634. }
  6635. if (authenticationHandler) {
  6636. return authenticationHandler.handleAuthentication(this, info, data);
  6637. }
  6638. else {
  6639. // We have received an unauthorized response but have no handlers to handle it.
  6640. // Let the response return to the caller.
  6641. return response;
  6642. }
  6643. }
  6644. let redirectsRemaining = this._maxRedirects;
  6645. while (HttpRedirectCodes.indexOf(response.message.statusCode) != -1 &&
  6646. this._allowRedirects &&
  6647. redirectsRemaining > 0) {
  6648. const redirectUrl = response.message.headers['location'];
  6649. if (!redirectUrl) {
  6650. // if there's no location to redirect to, we won't
  6651. break;
  6652. }
  6653. let parsedRedirectUrl = url.parse(redirectUrl);
  6654. if (parsedUrl.protocol == 'https:' &&
  6655. parsedUrl.protocol != parsedRedirectUrl.protocol &&
  6656. !this._allowRedirectDowngrade) {
  6657. throw new Error('Redirect from HTTPS to HTTP protocol. This downgrade is not allowed for security reasons. If you want to allow this behavior, set the allowRedirectDowngrade option to true.');
  6658. }
  6659. // we need to finish reading the response before reassigning response
  6660. // which will leak the open socket.
  6661. await response.readBody();
  6662. // strip authorization header if redirected to a different hostname
  6663. if (parsedRedirectUrl.hostname !== parsedUrl.hostname) {
  6664. for (let header in headers) {
  6665. // header names are case insensitive
  6666. if (header.toLowerCase() === 'authorization') {
  6667. delete headers[header];
  6668. }
  6669. }
  6670. }
  6671. // let's make the request with the new redirectUrl
  6672. info = this._prepareRequest(verb, parsedRedirectUrl, headers);
  6673. response = await this.requestRaw(info, data);
  6674. redirectsRemaining--;
  6675. }
  6676. if (HttpResponseRetryCodes.indexOf(response.message.statusCode) == -1) {
  6677. // If not a retry code, return immediately instead of retrying
  6678. return response;
  6679. }
  6680. numTries += 1;
  6681. if (numTries < maxTries) {
  6682. await response.readBody();
  6683. await this._performExponentialBackoff(numTries);
  6684. }
  6685. }
  6686. return response;
  6687. }
  6688. /**
  6689. * Needs to be called if keepAlive is set to true in request options.
  6690. */
  6691. dispose() {
  6692. if (this._agent) {
  6693. this._agent.destroy();
  6694. }
  6695. this._disposed = true;
  6696. }
  6697. /**
  6698. * Raw request.
  6699. * @param info
  6700. * @param data
  6701. */
  6702. requestRaw(info, data) {
  6703. return new Promise((resolve, reject) => {
  6704. let callbackForResult = function (err, res) {
  6705. if (err) {
  6706. reject(err);
  6707. }
  6708. resolve(res);
  6709. };
  6710. this.requestRawWithCallback(info, data, callbackForResult);
  6711. });
  6712. }
  6713. /**
  6714. * Raw request with callback.
  6715. * @param info
  6716. * @param data
  6717. * @param onResult
  6718. */
  6719. requestRawWithCallback(info, data, onResult) {
  6720. let socket;
  6721. if (typeof data === 'string') {
  6722. info.options.headers['Content-Length'] = Buffer.byteLength(data, 'utf8');
  6723. }
  6724. let callbackCalled = false;
  6725. let handleResult = (err, res) => {
  6726. if (!callbackCalled) {
  6727. callbackCalled = true;
  6728. onResult(err, res);
  6729. }
  6730. };
  6731. let req = info.httpModule.request(info.options, (msg) => {
  6732. let res = new HttpClientResponse(msg);
  6733. handleResult(null, res);
  6734. });
  6735. req.on('socket', sock => {
  6736. socket = sock;
  6737. });
  6738. // If we ever get disconnected, we want the socket to timeout eventually
  6739. req.setTimeout(this._socketTimeout || 3 * 60000, () => {
  6740. if (socket) {
  6741. socket.end();
  6742. }
  6743. handleResult(new Error('Request timeout: ' + info.options.path), null);
  6744. });
  6745. req.on('error', function (err) {
  6746. // err has statusCode property
  6747. // res should have headers
  6748. handleResult(err, null);
  6749. });
  6750. if (data && typeof data === 'string') {
  6751. req.write(data, 'utf8');
  6752. }
  6753. if (data && typeof data !== 'string') {
  6754. data.on('close', function () {
  6755. req.end();
  6756. });
  6757. data.pipe(req);
  6758. }
  6759. else {
  6760. req.end();
  6761. }
  6762. }
  6763. /**
  6764. * Gets an http agent. This function is useful when you need an http agent that handles
  6765. * routing through a proxy server - depending upon the url and proxy environment variables.
  6766. * @param serverUrl The server URL where the request will be sent. For example, https://api.github.com
  6767. */
  6768. getAgent(serverUrl) {
  6769. let parsedUrl = url.parse(serverUrl);
  6770. return this._getAgent(parsedUrl);
  6771. }
  6772. _prepareRequest(method, requestUrl, headers) {
  6773. const info = {};
  6774. info.parsedUrl = requestUrl;
  6775. const usingSsl = info.parsedUrl.protocol === 'https:';
  6776. info.httpModule = usingSsl ? https : http;
  6777. const defaultPort = usingSsl ? 443 : 80;
  6778. info.options = {};
  6779. info.options.host = info.parsedUrl.hostname;
  6780. info.options.port = info.parsedUrl.port
  6781. ? parseInt(info.parsedUrl.port)
  6782. : defaultPort;
  6783. info.options.path =
  6784. (info.parsedUrl.pathname || '') + (info.parsedUrl.search || '');
  6785. info.options.method = method;
  6786. info.options.headers = this._mergeHeaders(headers);
  6787. if (this.userAgent != null) {
  6788. info.options.headers['user-agent'] = this.userAgent;
  6789. }
  6790. info.options.agent = this._getAgent(info.parsedUrl);
  6791. // gives handlers an opportunity to participate
  6792. if (this.handlers) {
  6793. this.handlers.forEach(handler => {
  6794. handler.prepareRequest(info.options);
  6795. });
  6796. }
  6797. return info;
  6798. }
  6799. _mergeHeaders(headers) {
  6800. const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
  6801. if (this.requestOptions && this.requestOptions.headers) {
  6802. return Object.assign({}, lowercaseKeys(this.requestOptions.headers), lowercaseKeys(headers));
  6803. }
  6804. return lowercaseKeys(headers || {});
  6805. }
  6806. _getExistingOrDefaultHeader(additionalHeaders, header, _default) {
  6807. const lowercaseKeys = obj => Object.keys(obj).reduce((c, k) => ((c[k.toLowerCase()] = obj[k]), c), {});
  6808. let clientHeader;
  6809. if (this.requestOptions && this.requestOptions.headers) {
  6810. clientHeader = lowercaseKeys(this.requestOptions.headers)[header];
  6811. }
  6812. return additionalHeaders[header] || clientHeader || _default;
  6813. }
  6814. _getAgent(parsedUrl) {
  6815. let agent;
  6816. let proxyUrl = pm.getProxyUrl(parsedUrl);
  6817. let useProxy = proxyUrl && proxyUrl.hostname;
  6818. if (this._keepAlive && useProxy) {
  6819. agent = this._proxyAgent;
  6820. }
  6821. if (this._keepAlive && !useProxy) {
  6822. agent = this._agent;
  6823. }
  6824. // if agent is already assigned use that agent.
  6825. if (!!agent) {
  6826. return agent;
  6827. }
  6828. const usingSsl = parsedUrl.protocol === 'https:';
  6829. let maxSockets = 100;
  6830. if (!!this.requestOptions) {
  6831. maxSockets = this.requestOptions.maxSockets || http.globalAgent.maxSockets;
  6832. }
  6833. if (useProxy) {
  6834. // If using proxy, need tunnel
  6835. if (!tunnel) {
  6836. tunnel = __webpack_require__(856);
  6837. }
  6838. const agentOptions = {
  6839. maxSockets: maxSockets,
  6840. keepAlive: this._keepAlive,
  6841. proxy: {
  6842. proxyAuth: proxyUrl.auth,
  6843. host: proxyUrl.hostname,
  6844. port: proxyUrl.port
  6845. }
  6846. };
  6847. let tunnelAgent;
  6848. const overHttps = proxyUrl.protocol === 'https:';
  6849. if (usingSsl) {
  6850. tunnelAgent = overHttps ? tunnel.httpsOverHttps : tunnel.httpsOverHttp;
  6851. }
  6852. else {
  6853. tunnelAgent = overHttps ? tunnel.httpOverHttps : tunnel.httpOverHttp;
  6854. }
  6855. agent = tunnelAgent(agentOptions);
  6856. this._proxyAgent = agent;
  6857. }
  6858. // if reusing agent across request and tunneling agent isn't assigned create a new agent
  6859. if (this._keepAlive && !agent) {
  6860. const options = { keepAlive: this._keepAlive, maxSockets: maxSockets };
  6861. agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
  6862. this._agent = agent;
  6863. }
  6864. // if not using private agent and tunnel agent isn't setup then use global agent
  6865. if (!agent) {
  6866. agent = usingSsl ? https.globalAgent : http.globalAgent;
  6867. }
  6868. if (usingSsl && this._ignoreSslError) {
  6869. // we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
  6870. // http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
  6871. // we have to cast it to any and change it directly
  6872. agent.options = Object.assign(agent.options || {}, {
  6873. rejectUnauthorized: false
  6874. });
  6875. }
  6876. return agent;
  6877. }
  6878. _performExponentialBackoff(retryNumber) {
  6879. retryNumber = Math.min(ExponentialBackoffCeiling, retryNumber);
  6880. const ms = ExponentialBackoffTimeSlice * Math.pow(2, retryNumber);
  6881. return new Promise(resolve => setTimeout(() => resolve(), ms));
  6882. }
  6883. static dateTimeDeserializer(key, value) {
  6884. if (typeof value === 'string') {
  6885. let a = new Date(value);
  6886. if (!isNaN(a.valueOf())) {
  6887. return a;
  6888. }
  6889. }
  6890. return value;
  6891. }
  6892. async _processResponse(res, options) {
  6893. return new Promise(async (resolve, reject) => {
  6894. const statusCode = res.message.statusCode;
  6895. const response = {
  6896. statusCode: statusCode,
  6897. result: null,
  6898. headers: {}
  6899. };
  6900. // not found leads to null obj returned
  6901. if (statusCode == HttpCodes.NotFound) {
  6902. resolve(response);
  6903. }
  6904. let obj;
  6905. let contents;
  6906. // get the result from the body
  6907. try {
  6908. contents = await res.readBody();
  6909. if (contents && contents.length > 0) {
  6910. if (options && options.deserializeDates) {
  6911. obj = JSON.parse(contents, HttpClient.dateTimeDeserializer);
  6912. }
  6913. else {
  6914. obj = JSON.parse(contents);
  6915. }
  6916. response.result = obj;
  6917. }
  6918. response.headers = res.message.headers;
  6919. }
  6920. catch (err) {
  6921. // Invalid resource (contents not json); leaving result obj null
  6922. }
  6923. // note that 3xx redirects are handled by the http layer.
  6924. if (statusCode > 299) {
  6925. let msg;
  6926. // if exception/error in body, attempt to get better error
  6927. if (obj && obj.message) {
  6928. msg = obj.message;
  6929. }
  6930. else if (contents && contents.length > 0) {
  6931. // it may be the case that the exception is in the body message as string
  6932. msg = contents;
  6933. }
  6934. else {
  6935. msg = 'Failed request: (' + statusCode + ')';
  6936. }
  6937. let err = new Error(msg);
  6938. // attach statusCode and body obj (if available) to the error object
  6939. err['statusCode'] = statusCode;
  6940. if (response.result) {
  6941. err['result'] = response.result;
  6942. }
  6943. reject(err);
  6944. }
  6945. else {
  6946. resolve(response);
  6947. }
  6948. });
  6949. }
  6950. }
  6951. exports.HttpClient = HttpClient;
  6952. /***/ }),
  6953. /***/ 550:
  6954. /***/ (function(module, __unusedexports, __webpack_require__) {
  6955. module.exports = getNextPage
  6956. const getPage = __webpack_require__(265)
  6957. function getNextPage (octokit, link, headers) {
  6958. return getPage(octokit, link, 'next', headers)
  6959. }
  6960. /***/ }),
  6961. /***/ 558:
  6962. /***/ (function(module, __unusedexports, __webpack_require__) {
  6963. module.exports = hasPreviousPage
  6964. const deprecate = __webpack_require__(370)
  6965. const getPageLinks = __webpack_require__(577)
  6966. function hasPreviousPage (link) {
  6967. deprecate(`octokit.hasPreviousPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`)
  6968. return getPageLinks(link).prev
  6969. }
  6970. /***/ }),
  6971. /***/ 563:
  6972. /***/ (function(module, __unusedexports, __webpack_require__) {
  6973. module.exports = getPreviousPage
  6974. const getPage = __webpack_require__(265)
  6975. function getPreviousPage (octokit, link, headers) {
  6976. return getPage(octokit, link, 'prev', headers)
  6977. }
  6978. /***/ }),
  6979. /***/ 568:
  6980. /***/ (function(module, __unusedexports, __webpack_require__) {
  6981. "use strict";
  6982. const path = __webpack_require__(622);
  6983. const niceTry = __webpack_require__(948);
  6984. const resolveCommand = __webpack_require__(489);
  6985. const escape = __webpack_require__(462);
  6986. const readShebang = __webpack_require__(389);
  6987. const semver = __webpack_require__(280);
  6988. const isWin = process.platform === 'win32';
  6989. const isExecutableRegExp = /\.(?:com|exe)$/i;
  6990. const isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
  6991. // `options.shell` is supported in Node ^4.8.0, ^5.7.0 and >= 6.0.0
  6992. const supportsShellOption = niceTry(() => semver.satisfies(process.version, '^4.8.0 || ^5.7.0 || >= 6.0.0', true)) || false;
  6993. function detectShebang(parsed) {
  6994. parsed.file = resolveCommand(parsed);
  6995. const shebang = parsed.file && readShebang(parsed.file);
  6996. if (shebang) {
  6997. parsed.args.unshift(parsed.file);
  6998. parsed.command = shebang;
  6999. return resolveCommand(parsed);
  7000. }
  7001. return parsed.file;
  7002. }
  7003. function parseNonShell(parsed) {
  7004. if (!isWin) {
  7005. return parsed;
  7006. }
  7007. // Detect & add support for shebangs
  7008. const commandFile = detectShebang(parsed);
  7009. // We don't need a shell if the command filename is an executable
  7010. const needsShell = !isExecutableRegExp.test(commandFile);
  7011. // If a shell is required, use cmd.exe and take care of escaping everything correctly
  7012. // Note that `forceShell` is an hidden option used only in tests
  7013. if (parsed.options.forceShell || needsShell) {
  7014. // Need to double escape meta chars if the command is a cmd-shim located in `node_modules/.bin/`
  7015. // The cmd-shim simply calls execute the package bin file with NodeJS, proxying any argument
  7016. // Because the escape of metachars with ^ gets interpreted when the cmd.exe is first called,
  7017. // we need to double escape them
  7018. const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
  7019. // Normalize posix paths into OS compatible paths (e.g.: foo/bar -> foo\bar)
  7020. // This is necessary otherwise it will always fail with ENOENT in those cases
  7021. parsed.command = path.normalize(parsed.command);
  7022. // Escape command & arguments
  7023. parsed.command = escape.command(parsed.command);
  7024. parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
  7025. const shellCommand = [parsed.command].concat(parsed.args).join(' ');
  7026. parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
  7027. parsed.command = process.env.comspec || 'cmd.exe';
  7028. parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
  7029. }
  7030. return parsed;
  7031. }
  7032. function parseShell(parsed) {
  7033. // If node supports the shell option, there's no need to mimic its behavior
  7034. if (supportsShellOption) {
  7035. return parsed;
  7036. }
  7037. // Mimic node shell option
  7038. // See https://github.com/nodejs/node/blob/b9f6a2dc059a1062776133f3d4fd848c4da7d150/lib/child_process.js#L335
  7039. const shellCommand = [parsed.command].concat(parsed.args).join(' ');
  7040. if (isWin) {
  7041. parsed.command = typeof parsed.options.shell === 'string' ? parsed.options.shell : process.env.comspec || 'cmd.exe';
  7042. parsed.args = ['/d', '/s', '/c', `"${shellCommand}"`];
  7043. parsed.options.windowsVerbatimArguments = true; // Tell node's spawn that the arguments are already escaped
  7044. } else {
  7045. if (typeof parsed.options.shell === 'string') {
  7046. parsed.command = parsed.options.shell;
  7047. } else if (process.platform === 'android') {
  7048. parsed.command = '/system/bin/sh';
  7049. } else {
  7050. parsed.command = '/bin/sh';
  7051. }
  7052. parsed.args = ['-c', shellCommand];
  7053. }
  7054. return parsed;
  7055. }
  7056. function parse(command, args, options) {
  7057. // Normalize arguments, similar to nodejs
  7058. if (args && !Array.isArray(args)) {
  7059. options = args;
  7060. args = null;
  7061. }
  7062. args = args ? args.slice(0) : []; // Clone array to avoid changing the original
  7063. options = Object.assign({}, options); // Clone object to avoid changing the original
  7064. // Build our parsed object
  7065. const parsed = {
  7066. command,
  7067. args,
  7068. options,
  7069. file: undefined,
  7070. original: {
  7071. command,
  7072. args,
  7073. },
  7074. };
  7075. // Delegate further parsing to shell or non-shell
  7076. return options.shell ? parseShell(parsed) : parseNonShell(parsed);
  7077. }
  7078. module.exports = parse;
  7079. /***/ }),
  7080. /***/ 577:
  7081. /***/ (function(module) {
  7082. module.exports = getPageLinks
  7083. function getPageLinks (link) {
  7084. link = link.link || link.headers.link || ''
  7085. const links = {}
  7086. // link format:
  7087. // '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
  7088. link.replace(/<([^>]*)>;\s*rel="([\w]*)"/g, (m, uri, type) => {
  7089. links[type] = uri
  7090. })
  7091. return links
  7092. }
  7093. /***/ }),
  7094. /***/ 605:
  7095. /***/ (function(module) {
  7096. module.exports = require("http");
  7097. /***/ }),
  7098. /***/ 614:
  7099. /***/ (function(module) {
  7100. module.exports = require("events");
  7101. /***/ }),
  7102. /***/ 619:
  7103. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  7104. "use strict";
  7105. Object.defineProperty(exports, '__esModule', { value: true });
  7106. function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
  7107. var osName = _interopDefault(__webpack_require__(2));
  7108. function getUserAgent() {
  7109. try {
  7110. return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
  7111. } catch (error) {
  7112. if (/wmic os get Caption/.test(error.message)) {
  7113. return "Windows <version undetectable>";
  7114. }
  7115. throw error;
  7116. }
  7117. }
  7118. exports.getUserAgent = getUserAgent;
  7119. //# sourceMappingURL=index.js.map
  7120. /***/ }),
  7121. /***/ 621:
  7122. /***/ (function(module, __unusedexports, __webpack_require__) {
  7123. "use strict";
  7124. const path = __webpack_require__(622);
  7125. const pathKey = __webpack_require__(39);
  7126. module.exports = opts => {
  7127. opts = Object.assign({
  7128. cwd: process.cwd(),
  7129. path: process.env[pathKey()]
  7130. }, opts);
  7131. let prev;
  7132. let pth = path.resolve(opts.cwd);
  7133. const ret = [];
  7134. while (prev !== pth) {
  7135. ret.push(path.join(pth, 'node_modules/.bin'));
  7136. prev = pth;
  7137. pth = path.resolve(pth, '..');
  7138. }
  7139. // ensure the running `node` binary is used
  7140. ret.push(path.dirname(process.execPath));
  7141. return ret.concat(opts.path).join(path.delimiter);
  7142. };
  7143. module.exports.env = opts => {
  7144. opts = Object.assign({
  7145. env: process.env
  7146. }, opts);
  7147. const env = Object.assign({}, opts.env);
  7148. const path = pathKey({env});
  7149. opts.path = env[path];
  7150. env[path] = module.exports(opts);
  7151. return env;
  7152. };
  7153. /***/ }),
  7154. /***/ 622:
  7155. /***/ (function(module) {
  7156. module.exports = require("path");
  7157. /***/ }),
  7158. /***/ 631:
  7159. /***/ (function(module) {
  7160. module.exports = require("net");
  7161. /***/ }),
  7162. /***/ 649:
  7163. /***/ (function(module, __unusedexports, __webpack_require__) {
  7164. module.exports = getLastPage
  7165. const getPage = __webpack_require__(265)
  7166. function getLastPage (octokit, link, headers) {
  7167. return getPage(octokit, link, 'last', headers)
  7168. }
  7169. /***/ }),
  7170. /***/ 654:
  7171. /***/ (function(module) {
  7172. // This is not the set of all possible signals.
  7173. //
  7174. // It IS, however, the set of all signals that trigger
  7175. // an exit on either Linux or BSD systems. Linux is a
  7176. // superset of the signal names supported on BSD, and
  7177. // the unknown signals just fail to register, so we can
  7178. // catch that easily enough.
  7179. //
  7180. // Don't bother with SIGKILL. It's uncatchable, which
  7181. // means that we can't fire any callbacks anyway.
  7182. //
  7183. // If a user does happen to register a handler on a non-
  7184. // fatal signal like SIGWINCH or something, and then
  7185. // exit, it'll end up firing `process.emit('exit')`, so
  7186. // the handler will be fired anyway.
  7187. //
  7188. // SIGBUS, SIGFPE, SIGSEGV and SIGILL, when not raised
  7189. // artificially, inherently leave the process in a
  7190. // state from which it is not safe to try and enter JS
  7191. // listeners.
  7192. module.exports = [
  7193. 'SIGABRT',
  7194. 'SIGALRM',
  7195. 'SIGHUP',
  7196. 'SIGINT',
  7197. 'SIGTERM'
  7198. ]
  7199. if (process.platform !== 'win32') {
  7200. module.exports.push(
  7201. 'SIGVTALRM',
  7202. 'SIGXCPU',
  7203. 'SIGXFSZ',
  7204. 'SIGUSR2',
  7205. 'SIGTRAP',
  7206. 'SIGSYS',
  7207. 'SIGQUIT',
  7208. 'SIGIOT'
  7209. // should detect profiler and enable/disable accordingly.
  7210. // see #21
  7211. // 'SIGPROF'
  7212. )
  7213. }
  7214. if (process.platform === 'linux') {
  7215. module.exports.push(
  7216. 'SIGIO',
  7217. 'SIGPOLL',
  7218. 'SIGPWR',
  7219. 'SIGSTKFLT',
  7220. 'SIGUNUSED'
  7221. )
  7222. }
  7223. /***/ }),
  7224. /***/ 669:
  7225. /***/ (function(module) {
  7226. module.exports = require("util");
  7227. /***/ }),
  7228. /***/ 674:
  7229. /***/ (function(module, __unusedexports, __webpack_require__) {
  7230. module.exports = authenticate;
  7231. const { Deprecation } = __webpack_require__(692);
  7232. const once = __webpack_require__(969);
  7233. const deprecateAuthenticate = once((log, deprecation) => log.warn(deprecation));
  7234. function authenticate(state, options) {
  7235. deprecateAuthenticate(
  7236. state.octokit.log,
  7237. new Deprecation(
  7238. '[@octokit/rest] octokit.authenticate() is deprecated. Use "auth" constructor option instead.'
  7239. )
  7240. );
  7241. if (!options) {
  7242. state.auth = false;
  7243. return;
  7244. }
  7245. switch (options.type) {
  7246. case "basic":
  7247. if (!options.username || !options.password) {
  7248. throw new Error(
  7249. "Basic authentication requires both a username and password to be set"
  7250. );
  7251. }
  7252. break;
  7253. case "oauth":
  7254. if (!options.token && !(options.key && options.secret)) {
  7255. throw new Error(
  7256. "OAuth2 authentication requires a token or key & secret to be set"
  7257. );
  7258. }
  7259. break;
  7260. case "token":
  7261. case "app":
  7262. if (!options.token) {
  7263. throw new Error("Token authentication requires a token to be set");
  7264. }
  7265. break;
  7266. default:
  7267. throw new Error(
  7268. "Invalid authentication type, must be 'basic', 'oauth', 'token' or 'app'"
  7269. );
  7270. }
  7271. state.auth = options;
  7272. }
  7273. /***/ }),
  7274. /***/ 675:
  7275. /***/ (function(module) {
  7276. module.exports = function btoa(str) {
  7277. return new Buffer(str).toString('base64')
  7278. }
  7279. /***/ }),
  7280. /***/ 692:
  7281. /***/ (function(__unusedmodule, exports) {
  7282. "use strict";
  7283. Object.defineProperty(exports, '__esModule', { value: true });
  7284. class Deprecation extends Error {
  7285. constructor(message) {
  7286. super(message); // Maintains proper stack trace (only available on V8)
  7287. /* istanbul ignore next */
  7288. if (Error.captureStackTrace) {
  7289. Error.captureStackTrace(this, this.constructor);
  7290. }
  7291. this.name = 'Deprecation';
  7292. }
  7293. }
  7294. exports.Deprecation = Deprecation;
  7295. /***/ }),
  7296. /***/ 696:
  7297. /***/ (function(module) {
  7298. "use strict";
  7299. /*!
  7300. * isobject <https://github.com/jonschlinkert/isobject>
  7301. *
  7302. * Copyright (c) 2014-2017, Jon Schlinkert.
  7303. * Released under the MIT License.
  7304. */
  7305. function isObject(val) {
  7306. return val != null && typeof val === 'object' && Array.isArray(val) === false;
  7307. }
  7308. /*!
  7309. * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
  7310. *
  7311. * Copyright (c) 2014-2017, Jon Schlinkert.
  7312. * Released under the MIT License.
  7313. */
  7314. function isObjectObject(o) {
  7315. return isObject(o) === true
  7316. && Object.prototype.toString.call(o) === '[object Object]';
  7317. }
  7318. function isPlainObject(o) {
  7319. var ctor,prot;
  7320. if (isObjectObject(o) === false) return false;
  7321. // If has modified constructor
  7322. ctor = o.constructor;
  7323. if (typeof ctor !== 'function') return false;
  7324. // If has modified prototype
  7325. prot = ctor.prototype;
  7326. if (isObjectObject(prot) === false) return false;
  7327. // If constructor does not have an Object-specific method
  7328. if (prot.hasOwnProperty('isPrototypeOf') === false) {
  7329. return false;
  7330. }
  7331. // Most likely a plain Object
  7332. return true;
  7333. }
  7334. module.exports = isPlainObject;
  7335. /***/ }),
  7336. /***/ 697:
  7337. /***/ (function(module) {
  7338. "use strict";
  7339. module.exports = (promise, onFinally) => {
  7340. onFinally = onFinally || (() => {});
  7341. return promise.then(
  7342. val => new Promise(resolve => {
  7343. resolve(onFinally());
  7344. }).then(() => val),
  7345. err => new Promise(resolve => {
  7346. resolve(onFinally());
  7347. }).then(() => {
  7348. throw err;
  7349. })
  7350. );
  7351. };
  7352. /***/ }),
  7353. /***/ 742:
  7354. /***/ (function(module, __unusedexports, __webpack_require__) {
  7355. var fs = __webpack_require__(747)
  7356. var core
  7357. if (process.platform === 'win32' || global.TESTING_WINDOWS) {
  7358. core = __webpack_require__(818)
  7359. } else {
  7360. core = __webpack_require__(197)
  7361. }
  7362. module.exports = isexe
  7363. isexe.sync = sync
  7364. function isexe (path, options, cb) {
  7365. if (typeof options === 'function') {
  7366. cb = options
  7367. options = {}
  7368. }
  7369. if (!cb) {
  7370. if (typeof Promise !== 'function') {
  7371. throw new TypeError('callback not provided')
  7372. }
  7373. return new Promise(function (resolve, reject) {
  7374. isexe(path, options || {}, function (er, is) {
  7375. if (er) {
  7376. reject(er)
  7377. } else {
  7378. resolve(is)
  7379. }
  7380. })
  7381. })
  7382. }
  7383. core(path, options || {}, function (er, is) {
  7384. // ignore EACCES because that just means we aren't allowed to run it
  7385. if (er) {
  7386. if (er.code === 'EACCES' || options && options.ignoreErrors) {
  7387. er = null
  7388. is = false
  7389. }
  7390. }
  7391. cb(er, is)
  7392. })
  7393. }
  7394. function sync (path, options) {
  7395. // my kingdom for a filtered catch
  7396. try {
  7397. return core.sync(path, options || {})
  7398. } catch (er) {
  7399. if (options && options.ignoreErrors || er.code === 'EACCES') {
  7400. return false
  7401. } else {
  7402. throw er
  7403. }
  7404. }
  7405. }
  7406. /***/ }),
  7407. /***/ 747:
  7408. /***/ (function(module) {
  7409. module.exports = require("fs");
  7410. /***/ }),
  7411. /***/ 753:
  7412. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  7413. "use strict";
  7414. Object.defineProperty(exports, '__esModule', { value: true });
  7415. function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
  7416. var endpoint = __webpack_require__(385);
  7417. var universalUserAgent = __webpack_require__(796);
  7418. var isPlainObject = _interopDefault(__webpack_require__(696));
  7419. var nodeFetch = _interopDefault(__webpack_require__(454));
  7420. var requestError = __webpack_require__(463);
  7421. const VERSION = "5.4.4";
  7422. function getBufferResponse(response) {
  7423. return response.arrayBuffer();
  7424. }
  7425. function fetchWrapper(requestOptions) {
  7426. if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
  7427. requestOptions.body = JSON.stringify(requestOptions.body);
  7428. }
  7429. let headers = {};
  7430. let status;
  7431. let url;
  7432. const fetch = requestOptions.request && requestOptions.request.fetch || nodeFetch;
  7433. return fetch(requestOptions.url, Object.assign({
  7434. method: requestOptions.method,
  7435. body: requestOptions.body,
  7436. headers: requestOptions.headers,
  7437. redirect: requestOptions.redirect
  7438. }, requestOptions.request)).then(response => {
  7439. url = response.url;
  7440. status = response.status;
  7441. for (const keyAndValue of response.headers) {
  7442. headers[keyAndValue[0]] = keyAndValue[1];
  7443. }
  7444. if (status === 204 || status === 205) {
  7445. return;
  7446. } // GitHub API returns 200 for HEAD requests
  7447. if (requestOptions.method === "HEAD") {
  7448. if (status < 400) {
  7449. return;
  7450. }
  7451. throw new requestError.RequestError(response.statusText, status, {
  7452. headers,
  7453. request: requestOptions
  7454. });
  7455. }
  7456. if (status === 304) {
  7457. throw new requestError.RequestError("Not modified", status, {
  7458. headers,
  7459. request: requestOptions
  7460. });
  7461. }
  7462. if (status >= 400) {
  7463. return response.text().then(message => {
  7464. const error = new requestError.RequestError(message, status, {
  7465. headers,
  7466. request: requestOptions
  7467. });
  7468. try {
  7469. let responseBody = JSON.parse(error.message);
  7470. Object.assign(error, responseBody);
  7471. let errors = responseBody.errors; // Assumption `errors` would always be in Array format
  7472. error.message = error.message + ": " + errors.map(JSON.stringify).join(", ");
  7473. } catch (e) {// ignore, see octokit/rest.js#684
  7474. }
  7475. throw error;
  7476. });
  7477. }
  7478. const contentType = response.headers.get("content-type");
  7479. if (/application\/json/.test(contentType)) {
  7480. return response.json();
  7481. }
  7482. if (!contentType || /^text\/|charset=utf-8$/.test(contentType)) {
  7483. return response.text();
  7484. }
  7485. return getBufferResponse(response);
  7486. }).then(data => {
  7487. return {
  7488. status,
  7489. url,
  7490. headers,
  7491. data
  7492. };
  7493. }).catch(error => {
  7494. if (error instanceof requestError.RequestError) {
  7495. throw error;
  7496. }
  7497. throw new requestError.RequestError(error.message, 500, {
  7498. headers,
  7499. request: requestOptions
  7500. });
  7501. });
  7502. }
  7503. function withDefaults(oldEndpoint, newDefaults) {
  7504. const endpoint = oldEndpoint.defaults(newDefaults);
  7505. const newApi = function (route, parameters) {
  7506. const endpointOptions = endpoint.merge(route, parameters);
  7507. if (!endpointOptions.request || !endpointOptions.request.hook) {
  7508. return fetchWrapper(endpoint.parse(endpointOptions));
  7509. }
  7510. const request = (route, parameters) => {
  7511. return fetchWrapper(endpoint.parse(endpoint.merge(route, parameters)));
  7512. };
  7513. Object.assign(request, {
  7514. endpoint,
  7515. defaults: withDefaults.bind(null, endpoint)
  7516. });
  7517. return endpointOptions.request.hook(request, endpointOptions);
  7518. };
  7519. return Object.assign(newApi, {
  7520. endpoint,
  7521. defaults: withDefaults.bind(null, endpoint)
  7522. });
  7523. }
  7524. const request = withDefaults(endpoint.endpoint, {
  7525. headers: {
  7526. "user-agent": `octokit-request.js/${VERSION} ${universalUserAgent.getUserAgent()}`
  7527. }
  7528. });
  7529. exports.request = request;
  7530. //# sourceMappingURL=index.js.map
  7531. /***/ }),
  7532. /***/ 761:
  7533. /***/ (function(module) {
  7534. module.exports = require("zlib");
  7535. /***/ }),
  7536. /***/ 763:
  7537. /***/ (function(module) {
  7538. module.exports = removeHook
  7539. function removeHook (state, name, method) {
  7540. if (!state.registry[name]) {
  7541. return
  7542. }
  7543. var index = state.registry[name]
  7544. .map(function (registered) { return registered.orig })
  7545. .indexOf(method)
  7546. if (index === -1) {
  7547. return
  7548. }
  7549. state.registry[name].splice(index, 1)
  7550. }
  7551. /***/ }),
  7552. /***/ 768:
  7553. /***/ (function(module) {
  7554. "use strict";
  7555. module.exports = function (x) {
  7556. var lf = typeof x === 'string' ? '\n' : '\n'.charCodeAt();
  7557. var cr = typeof x === 'string' ? '\r' : '\r'.charCodeAt();
  7558. if (x[x.length - 1] === lf) {
  7559. x = x.slice(0, x.length - 1);
  7560. }
  7561. if (x[x.length - 1] === cr) {
  7562. x = x.slice(0, x.length - 1);
  7563. }
  7564. return x;
  7565. };
  7566. /***/ }),
  7567. /***/ 777:
  7568. /***/ (function(module, __unusedexports, __webpack_require__) {
  7569. module.exports = getFirstPage
  7570. const getPage = __webpack_require__(265)
  7571. function getFirstPage (octokit, link, headers) {
  7572. return getPage(octokit, link, 'first', headers)
  7573. }
  7574. /***/ }),
  7575. /***/ 796:
  7576. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  7577. "use strict";
  7578. Object.defineProperty(exports, '__esModule', { value: true });
  7579. function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
  7580. var osName = _interopDefault(__webpack_require__(2));
  7581. function getUserAgent() {
  7582. try {
  7583. return `Node.js/${process.version.substr(1)} (${osName()}; ${process.arch})`;
  7584. } catch (error) {
  7585. if (/wmic os get Caption/.test(error.message)) {
  7586. return "Windows <version undetectable>";
  7587. }
  7588. return "<environment undetectable>";
  7589. }
  7590. }
  7591. exports.getUserAgent = getUserAgent;
  7592. //# sourceMappingURL=index.js.map
  7593. /***/ }),
  7594. /***/ 813:
  7595. /***/ (function(__unusedmodule, exports) {
  7596. "use strict";
  7597. Object.defineProperty(exports, '__esModule', { value: true });
  7598. async function auth(token) {
  7599. const tokenType = token.split(/\./).length === 3 ? "app" : /^v\d+\./.test(token) ? "installation" : "oauth";
  7600. return {
  7601. type: "token",
  7602. token: token,
  7603. tokenType
  7604. };
  7605. }
  7606. /**
  7607. * Prefix token for usage in the Authorization header
  7608. *
  7609. * @param token OAuth token or JSON Web Token
  7610. */
  7611. function withAuthorizationPrefix(token) {
  7612. if (token.split(/\./).length === 3) {
  7613. return `bearer ${token}`;
  7614. }
  7615. return `token ${token}`;
  7616. }
  7617. async function hook(token, request, route, parameters) {
  7618. const endpoint = request.endpoint.merge(route, parameters);
  7619. endpoint.headers.authorization = withAuthorizationPrefix(token);
  7620. return request(endpoint);
  7621. }
  7622. const createTokenAuth = function createTokenAuth(token) {
  7623. if (!token) {
  7624. throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");
  7625. }
  7626. if (typeof token !== "string") {
  7627. throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");
  7628. }
  7629. token = token.replace(/^(token|bearer) +/i, "");
  7630. return Object.assign(auth.bind(null, token), {
  7631. hook: hook.bind(null, token)
  7632. });
  7633. };
  7634. exports.createTokenAuth = createTokenAuth;
  7635. //# sourceMappingURL=index.js.map
  7636. /***/ }),
  7637. /***/ 814:
  7638. /***/ (function(module, __unusedexports, __webpack_require__) {
  7639. module.exports = which
  7640. which.sync = whichSync
  7641. var isWindows = process.platform === 'win32' ||
  7642. process.env.OSTYPE === 'cygwin' ||
  7643. process.env.OSTYPE === 'msys'
  7644. var path = __webpack_require__(622)
  7645. var COLON = isWindows ? ';' : ':'
  7646. var isexe = __webpack_require__(742)
  7647. function getNotFoundError (cmd) {
  7648. var er = new Error('not found: ' + cmd)
  7649. er.code = 'ENOENT'
  7650. return er
  7651. }
  7652. function getPathInfo (cmd, opt) {
  7653. var colon = opt.colon || COLON
  7654. var pathEnv = opt.path || process.env.PATH || ''
  7655. var pathExt = ['']
  7656. pathEnv = pathEnv.split(colon)
  7657. var pathExtExe = ''
  7658. if (isWindows) {
  7659. pathEnv.unshift(process.cwd())
  7660. pathExtExe = (opt.pathExt || process.env.PATHEXT || '.EXE;.CMD;.BAT;.COM')
  7661. pathExt = pathExtExe.split(colon)
  7662. // Always test the cmd itself first. isexe will check to make sure
  7663. // it's found in the pathExt set.
  7664. if (cmd.indexOf('.') !== -1 && pathExt[0] !== '')
  7665. pathExt.unshift('')
  7666. }
  7667. // If it has a slash, then we don't bother searching the pathenv.
  7668. // just check the file itself, and that's it.
  7669. if (cmd.match(/\//) || isWindows && cmd.match(/\\/))
  7670. pathEnv = ['']
  7671. return {
  7672. env: pathEnv,
  7673. ext: pathExt,
  7674. extExe: pathExtExe
  7675. }
  7676. }
  7677. function which (cmd, opt, cb) {
  7678. if (typeof opt === 'function') {
  7679. cb = opt
  7680. opt = {}
  7681. }
  7682. var info = getPathInfo(cmd, opt)
  7683. var pathEnv = info.env
  7684. var pathExt = info.ext
  7685. var pathExtExe = info.extExe
  7686. var found = []
  7687. ;(function F (i, l) {
  7688. if (i === l) {
  7689. if (opt.all && found.length)
  7690. return cb(null, found)
  7691. else
  7692. return cb(getNotFoundError(cmd))
  7693. }
  7694. var pathPart = pathEnv[i]
  7695. if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
  7696. pathPart = pathPart.slice(1, -1)
  7697. var p = path.join(pathPart, cmd)
  7698. if (!pathPart && (/^\.[\\\/]/).test(cmd)) {
  7699. p = cmd.slice(0, 2) + p
  7700. }
  7701. ;(function E (ii, ll) {
  7702. if (ii === ll) return F(i + 1, l)
  7703. var ext = pathExt[ii]
  7704. isexe(p + ext, { pathExt: pathExtExe }, function (er, is) {
  7705. if (!er && is) {
  7706. if (opt.all)
  7707. found.push(p + ext)
  7708. else
  7709. return cb(null, p + ext)
  7710. }
  7711. return E(ii + 1, ll)
  7712. })
  7713. })(0, pathExt.length)
  7714. })(0, pathEnv.length)
  7715. }
  7716. function whichSync (cmd, opt) {
  7717. opt = opt || {}
  7718. var info = getPathInfo(cmd, opt)
  7719. var pathEnv = info.env
  7720. var pathExt = info.ext
  7721. var pathExtExe = info.extExe
  7722. var found = []
  7723. for (var i = 0, l = pathEnv.length; i < l; i ++) {
  7724. var pathPart = pathEnv[i]
  7725. if (pathPart.charAt(0) === '"' && pathPart.slice(-1) === '"')
  7726. pathPart = pathPart.slice(1, -1)
  7727. var p = path.join(pathPart, cmd)
  7728. if (!pathPart && /^\.[\\\/]/.test(cmd)) {
  7729. p = cmd.slice(0, 2) + p
  7730. }
  7731. for (var j = 0, ll = pathExt.length; j < ll; j ++) {
  7732. var cur = p + pathExt[j]
  7733. var is
  7734. try {
  7735. is = isexe.sync(cur, { pathExt: pathExtExe })
  7736. if (is) {
  7737. if (opt.all)
  7738. found.push(cur)
  7739. else
  7740. return cur
  7741. }
  7742. } catch (ex) {}
  7743. }
  7744. }
  7745. if (opt.all && found.length)
  7746. return found
  7747. if (opt.nothrow)
  7748. return null
  7749. throw getNotFoundError(cmd)
  7750. }
  7751. /***/ }),
  7752. /***/ 816:
  7753. /***/ (function(module) {
  7754. "use strict";
  7755. module.exports = /^#!.*/;
  7756. /***/ }),
  7757. /***/ 818:
  7758. /***/ (function(module, __unusedexports, __webpack_require__) {
  7759. module.exports = isexe
  7760. isexe.sync = sync
  7761. var fs = __webpack_require__(747)
  7762. function checkPathExt (path, options) {
  7763. var pathext = options.pathExt !== undefined ?
  7764. options.pathExt : process.env.PATHEXT
  7765. if (!pathext) {
  7766. return true
  7767. }
  7768. pathext = pathext.split(';')
  7769. if (pathext.indexOf('') !== -1) {
  7770. return true
  7771. }
  7772. for (var i = 0; i < pathext.length; i++) {
  7773. var p = pathext[i].toLowerCase()
  7774. if (p && path.substr(-p.length).toLowerCase() === p) {
  7775. return true
  7776. }
  7777. }
  7778. return false
  7779. }
  7780. function checkStat (stat, path, options) {
  7781. if (!stat.isSymbolicLink() && !stat.isFile()) {
  7782. return false
  7783. }
  7784. return checkPathExt(path, options)
  7785. }
  7786. function isexe (path, options, cb) {
  7787. fs.stat(path, function (er, stat) {
  7788. cb(er, er ? false : checkStat(stat, path, options))
  7789. })
  7790. }
  7791. function sync (path, options) {
  7792. return checkStat(fs.statSync(path), path, options)
  7793. }
  7794. /***/ }),
  7795. /***/ 835:
  7796. /***/ (function(module) {
  7797. module.exports = require("url");
  7798. /***/ }),
  7799. /***/ 842:
  7800. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  7801. "use strict";
  7802. Object.defineProperty(exports, '__esModule', { value: true });
  7803. var deprecation = __webpack_require__(692);
  7804. var endpointsByScope = {
  7805. actions: {
  7806. cancelWorkflowRun: {
  7807. method: "POST",
  7808. params: {
  7809. owner: {
  7810. required: true,
  7811. type: "string"
  7812. },
  7813. repo: {
  7814. required: true,
  7815. type: "string"
  7816. },
  7817. run_id: {
  7818. required: true,
  7819. type: "integer"
  7820. }
  7821. },
  7822. url: "/repos/:owner/:repo/actions/runs/:run_id/cancel"
  7823. },
  7824. createOrUpdateSecretForRepo: {
  7825. method: "PUT",
  7826. params: {
  7827. encrypted_value: {
  7828. type: "string"
  7829. },
  7830. key_id: {
  7831. type: "string"
  7832. },
  7833. name: {
  7834. required: true,
  7835. type: "string"
  7836. },
  7837. owner: {
  7838. required: true,
  7839. type: "string"
  7840. },
  7841. repo: {
  7842. required: true,
  7843. type: "string"
  7844. }
  7845. },
  7846. url: "/repos/:owner/:repo/actions/secrets/:name"
  7847. },
  7848. createRegistrationToken: {
  7849. method: "POST",
  7850. params: {
  7851. owner: {
  7852. required: true,
  7853. type: "string"
  7854. },
  7855. repo: {
  7856. required: true,
  7857. type: "string"
  7858. }
  7859. },
  7860. url: "/repos/:owner/:repo/actions/runners/registration-token"
  7861. },
  7862. createRemoveToken: {
  7863. method: "POST",
  7864. params: {
  7865. owner: {
  7866. required: true,
  7867. type: "string"
  7868. },
  7869. repo: {
  7870. required: true,
  7871. type: "string"
  7872. }
  7873. },
  7874. url: "/repos/:owner/:repo/actions/runners/remove-token"
  7875. },
  7876. deleteArtifact: {
  7877. method: "DELETE",
  7878. params: {
  7879. artifact_id: {
  7880. required: true,
  7881. type: "integer"
  7882. },
  7883. owner: {
  7884. required: true,
  7885. type: "string"
  7886. },
  7887. repo: {
  7888. required: true,
  7889. type: "string"
  7890. }
  7891. },
  7892. url: "/repos/:owner/:repo/actions/artifacts/:artifact_id"
  7893. },
  7894. deleteSecretFromRepo: {
  7895. method: "DELETE",
  7896. params: {
  7897. name: {
  7898. required: true,
  7899. type: "string"
  7900. },
  7901. owner: {
  7902. required: true,
  7903. type: "string"
  7904. },
  7905. repo: {
  7906. required: true,
  7907. type: "string"
  7908. }
  7909. },
  7910. url: "/repos/:owner/:repo/actions/secrets/:name"
  7911. },
  7912. downloadArtifact: {
  7913. method: "GET",
  7914. params: {
  7915. archive_format: {
  7916. required: true,
  7917. type: "string"
  7918. },
  7919. artifact_id: {
  7920. required: true,
  7921. type: "integer"
  7922. },
  7923. owner: {
  7924. required: true,
  7925. type: "string"
  7926. },
  7927. repo: {
  7928. required: true,
  7929. type: "string"
  7930. }
  7931. },
  7932. url: "/repos/:owner/:repo/actions/artifacts/:artifact_id/:archive_format"
  7933. },
  7934. getArtifact: {
  7935. method: "GET",
  7936. params: {
  7937. artifact_id: {
  7938. required: true,
  7939. type: "integer"
  7940. },
  7941. owner: {
  7942. required: true,
  7943. type: "string"
  7944. },
  7945. repo: {
  7946. required: true,
  7947. type: "string"
  7948. }
  7949. },
  7950. url: "/repos/:owner/:repo/actions/artifacts/:artifact_id"
  7951. },
  7952. getPublicKey: {
  7953. method: "GET",
  7954. params: {
  7955. owner: {
  7956. required: true,
  7957. type: "string"
  7958. },
  7959. repo: {
  7960. required: true,
  7961. type: "string"
  7962. }
  7963. },
  7964. url: "/repos/:owner/:repo/actions/secrets/public-key"
  7965. },
  7966. getSecret: {
  7967. method: "GET",
  7968. params: {
  7969. name: {
  7970. required: true,
  7971. type: "string"
  7972. },
  7973. owner: {
  7974. required: true,
  7975. type: "string"
  7976. },
  7977. page: {
  7978. type: "integer"
  7979. },
  7980. per_page: {
  7981. type: "integer"
  7982. },
  7983. repo: {
  7984. required: true,
  7985. type: "string"
  7986. }
  7987. },
  7988. url: "/repos/:owner/:repo/actions/secrets/:name"
  7989. },
  7990. getSelfHostedRunner: {
  7991. method: "GET",
  7992. params: {
  7993. owner: {
  7994. required: true,
  7995. type: "string"
  7996. },
  7997. repo: {
  7998. required: true,
  7999. type: "string"
  8000. },
  8001. runner_id: {
  8002. required: true,
  8003. type: "integer"
  8004. }
  8005. },
  8006. url: "/repos/:owner/:repo/actions/runners/:runner_id"
  8007. },
  8008. getWorkflow: {
  8009. method: "GET",
  8010. params: {
  8011. owner: {
  8012. required: true,
  8013. type: "string"
  8014. },
  8015. repo: {
  8016. required: true,
  8017. type: "string"
  8018. },
  8019. workflow_id: {
  8020. required: true,
  8021. type: "integer"
  8022. }
  8023. },
  8024. url: "/repos/:owner/:repo/actions/workflows/:workflow_id"
  8025. },
  8026. getWorkflowJob: {
  8027. method: "GET",
  8028. params: {
  8029. job_id: {
  8030. required: true,
  8031. type: "integer"
  8032. },
  8033. owner: {
  8034. required: true,
  8035. type: "string"
  8036. },
  8037. repo: {
  8038. required: true,
  8039. type: "string"
  8040. }
  8041. },
  8042. url: "/repos/:owner/:repo/actions/jobs/:job_id"
  8043. },
  8044. getWorkflowRun: {
  8045. method: "GET",
  8046. params: {
  8047. owner: {
  8048. required: true,
  8049. type: "string"
  8050. },
  8051. repo: {
  8052. required: true,
  8053. type: "string"
  8054. },
  8055. run_id: {
  8056. required: true,
  8057. type: "integer"
  8058. }
  8059. },
  8060. url: "/repos/:owner/:repo/actions/runs/:run_id"
  8061. },
  8062. listDownloadsForSelfHostedRunnerApplication: {
  8063. method: "GET",
  8064. params: {
  8065. owner: {
  8066. required: true,
  8067. type: "string"
  8068. },
  8069. repo: {
  8070. required: true,
  8071. type: "string"
  8072. }
  8073. },
  8074. url: "/repos/:owner/:repo/actions/runners/downloads"
  8075. },
  8076. listJobsForWorkflowRun: {
  8077. method: "GET",
  8078. params: {
  8079. owner: {
  8080. required: true,
  8081. type: "string"
  8082. },
  8083. page: {
  8084. type: "integer"
  8085. },
  8086. per_page: {
  8087. type: "integer"
  8088. },
  8089. repo: {
  8090. required: true,
  8091. type: "string"
  8092. },
  8093. run_id: {
  8094. required: true,
  8095. type: "integer"
  8096. }
  8097. },
  8098. url: "/repos/:owner/:repo/actions/runs/:run_id/jobs"
  8099. },
  8100. listRepoWorkflowRuns: {
  8101. method: "GET",
  8102. params: {
  8103. actor: {
  8104. type: "string"
  8105. },
  8106. branch: {
  8107. type: "string"
  8108. },
  8109. event: {
  8110. type: "string"
  8111. },
  8112. owner: {
  8113. required: true,
  8114. type: "string"
  8115. },
  8116. page: {
  8117. type: "integer"
  8118. },
  8119. per_page: {
  8120. type: "integer"
  8121. },
  8122. repo: {
  8123. required: true,
  8124. type: "string"
  8125. },
  8126. status: {
  8127. enum: ["completed", "status", "conclusion"],
  8128. type: "string"
  8129. }
  8130. },
  8131. url: "/repos/:owner/:repo/actions/runs"
  8132. },
  8133. listRepoWorkflows: {
  8134. method: "GET",
  8135. params: {
  8136. owner: {
  8137. required: true,
  8138. type: "string"
  8139. },
  8140. page: {
  8141. type: "integer"
  8142. },
  8143. per_page: {
  8144. type: "integer"
  8145. },
  8146. repo: {
  8147. required: true,
  8148. type: "string"
  8149. }
  8150. },
  8151. url: "/repos/:owner/:repo/actions/workflows"
  8152. },
  8153. listSecretsForRepo: {
  8154. method: "GET",
  8155. params: {
  8156. owner: {
  8157. required: true,
  8158. type: "string"
  8159. },
  8160. page: {
  8161. type: "integer"
  8162. },
  8163. per_page: {
  8164. type: "integer"
  8165. },
  8166. repo: {
  8167. required: true,
  8168. type: "string"
  8169. }
  8170. },
  8171. url: "/repos/:owner/:repo/actions/secrets"
  8172. },
  8173. listSelfHostedRunnersForRepo: {
  8174. method: "GET",
  8175. params: {
  8176. owner: {
  8177. required: true,
  8178. type: "string"
  8179. },
  8180. page: {
  8181. type: "integer"
  8182. },
  8183. per_page: {
  8184. type: "integer"
  8185. },
  8186. repo: {
  8187. required: true,
  8188. type: "string"
  8189. }
  8190. },
  8191. url: "/repos/:owner/:repo/actions/runners"
  8192. },
  8193. listWorkflowJobLogs: {
  8194. method: "GET",
  8195. params: {
  8196. job_id: {
  8197. required: true,
  8198. type: "integer"
  8199. },
  8200. owner: {
  8201. required: true,
  8202. type: "string"
  8203. },
  8204. page: {
  8205. type: "integer"
  8206. },
  8207. per_page: {
  8208. type: "integer"
  8209. },
  8210. repo: {
  8211. required: true,
  8212. type: "string"
  8213. }
  8214. },
  8215. url: "/repos/:owner/:repo/actions/jobs/:job_id/logs"
  8216. },
  8217. listWorkflowRunArtifacts: {
  8218. method: "GET",
  8219. params: {
  8220. owner: {
  8221. required: true,
  8222. type: "string"
  8223. },
  8224. page: {
  8225. type: "integer"
  8226. },
  8227. per_page: {
  8228. type: "integer"
  8229. },
  8230. repo: {
  8231. required: true,
  8232. type: "string"
  8233. },
  8234. run_id: {
  8235. required: true,
  8236. type: "integer"
  8237. }
  8238. },
  8239. url: "/repos/:owner/:repo/actions/runs/:run_id/artifacts"
  8240. },
  8241. listWorkflowRunLogs: {
  8242. method: "GET",
  8243. params: {
  8244. owner: {
  8245. required: true,
  8246. type: "string"
  8247. },
  8248. page: {
  8249. type: "integer"
  8250. },
  8251. per_page: {
  8252. type: "integer"
  8253. },
  8254. repo: {
  8255. required: true,
  8256. type: "string"
  8257. },
  8258. run_id: {
  8259. required: true,
  8260. type: "integer"
  8261. }
  8262. },
  8263. url: "/repos/:owner/:repo/actions/runs/:run_id/logs"
  8264. },
  8265. listWorkflowRuns: {
  8266. method: "GET",
  8267. params: {
  8268. actor: {
  8269. type: "string"
  8270. },
  8271. branch: {
  8272. type: "string"
  8273. },
  8274. event: {
  8275. type: "string"
  8276. },
  8277. owner: {
  8278. required: true,
  8279. type: "string"
  8280. },
  8281. page: {
  8282. type: "integer"
  8283. },
  8284. per_page: {
  8285. type: "integer"
  8286. },
  8287. repo: {
  8288. required: true,
  8289. type: "string"
  8290. },
  8291. status: {
  8292. enum: ["completed", "status", "conclusion"],
  8293. type: "string"
  8294. },
  8295. workflow_id: {
  8296. required: true,
  8297. type: "integer"
  8298. }
  8299. },
  8300. url: "/repos/:owner/:repo/actions/workflows/:workflow_id/runs"
  8301. },
  8302. reRunWorkflow: {
  8303. method: "POST",
  8304. params: {
  8305. owner: {
  8306. required: true,
  8307. type: "string"
  8308. },
  8309. repo: {
  8310. required: true,
  8311. type: "string"
  8312. },
  8313. run_id: {
  8314. required: true,
  8315. type: "integer"
  8316. }
  8317. },
  8318. url: "/repos/:owner/:repo/actions/runs/:run_id/rerun"
  8319. },
  8320. removeSelfHostedRunner: {
  8321. method: "DELETE",
  8322. params: {
  8323. owner: {
  8324. required: true,
  8325. type: "string"
  8326. },
  8327. repo: {
  8328. required: true,
  8329. type: "string"
  8330. },
  8331. runner_id: {
  8332. required: true,
  8333. type: "integer"
  8334. }
  8335. },
  8336. url: "/repos/:owner/:repo/actions/runners/:runner_id"
  8337. }
  8338. },
  8339. activity: {
  8340. checkStarringRepo: {
  8341. method: "GET",
  8342. params: {
  8343. owner: {
  8344. required: true,
  8345. type: "string"
  8346. },
  8347. repo: {
  8348. required: true,
  8349. type: "string"
  8350. }
  8351. },
  8352. url: "/user/starred/:owner/:repo"
  8353. },
  8354. deleteRepoSubscription: {
  8355. method: "DELETE",
  8356. params: {
  8357. owner: {
  8358. required: true,
  8359. type: "string"
  8360. },
  8361. repo: {
  8362. required: true,
  8363. type: "string"
  8364. }
  8365. },
  8366. url: "/repos/:owner/:repo/subscription"
  8367. },
  8368. deleteThreadSubscription: {
  8369. method: "DELETE",
  8370. params: {
  8371. thread_id: {
  8372. required: true,
  8373. type: "integer"
  8374. }
  8375. },
  8376. url: "/notifications/threads/:thread_id/subscription"
  8377. },
  8378. getRepoSubscription: {
  8379. method: "GET",
  8380. params: {
  8381. owner: {
  8382. required: true,
  8383. type: "string"
  8384. },
  8385. repo: {
  8386. required: true,
  8387. type: "string"
  8388. }
  8389. },
  8390. url: "/repos/:owner/:repo/subscription"
  8391. },
  8392. getThread: {
  8393. method: "GET",
  8394. params: {
  8395. thread_id: {
  8396. required: true,
  8397. type: "integer"
  8398. }
  8399. },
  8400. url: "/notifications/threads/:thread_id"
  8401. },
  8402. getThreadSubscription: {
  8403. method: "GET",
  8404. params: {
  8405. thread_id: {
  8406. required: true,
  8407. type: "integer"
  8408. }
  8409. },
  8410. url: "/notifications/threads/:thread_id/subscription"
  8411. },
  8412. listEventsForOrg: {
  8413. method: "GET",
  8414. params: {
  8415. org: {
  8416. required: true,
  8417. type: "string"
  8418. },
  8419. page: {
  8420. type: "integer"
  8421. },
  8422. per_page: {
  8423. type: "integer"
  8424. },
  8425. username: {
  8426. required: true,
  8427. type: "string"
  8428. }
  8429. },
  8430. url: "/users/:username/events/orgs/:org"
  8431. },
  8432. listEventsForUser: {
  8433. method: "GET",
  8434. params: {
  8435. page: {
  8436. type: "integer"
  8437. },
  8438. per_page: {
  8439. type: "integer"
  8440. },
  8441. username: {
  8442. required: true,
  8443. type: "string"
  8444. }
  8445. },
  8446. url: "/users/:username/events"
  8447. },
  8448. listFeeds: {
  8449. method: "GET",
  8450. params: {},
  8451. url: "/feeds"
  8452. },
  8453. listNotifications: {
  8454. method: "GET",
  8455. params: {
  8456. all: {
  8457. type: "boolean"
  8458. },
  8459. before: {
  8460. type: "string"
  8461. },
  8462. page: {
  8463. type: "integer"
  8464. },
  8465. participating: {
  8466. type: "boolean"
  8467. },
  8468. per_page: {
  8469. type: "integer"
  8470. },
  8471. since: {
  8472. type: "string"
  8473. }
  8474. },
  8475. url: "/notifications"
  8476. },
  8477. listNotificationsForRepo: {
  8478. method: "GET",
  8479. params: {
  8480. all: {
  8481. type: "boolean"
  8482. },
  8483. before: {
  8484. type: "string"
  8485. },
  8486. owner: {
  8487. required: true,
  8488. type: "string"
  8489. },
  8490. page: {
  8491. type: "integer"
  8492. },
  8493. participating: {
  8494. type: "boolean"
  8495. },
  8496. per_page: {
  8497. type: "integer"
  8498. },
  8499. repo: {
  8500. required: true,
  8501. type: "string"
  8502. },
  8503. since: {
  8504. type: "string"
  8505. }
  8506. },
  8507. url: "/repos/:owner/:repo/notifications"
  8508. },
  8509. listPublicEvents: {
  8510. method: "GET",
  8511. params: {
  8512. page: {
  8513. type: "integer"
  8514. },
  8515. per_page: {
  8516. type: "integer"
  8517. }
  8518. },
  8519. url: "/events"
  8520. },
  8521. listPublicEventsForOrg: {
  8522. method: "GET",
  8523. params: {
  8524. org: {
  8525. required: true,
  8526. type: "string"
  8527. },
  8528. page: {
  8529. type: "integer"
  8530. },
  8531. per_page: {
  8532. type: "integer"
  8533. }
  8534. },
  8535. url: "/orgs/:org/events"
  8536. },
  8537. listPublicEventsForRepoNetwork: {
  8538. method: "GET",
  8539. params: {
  8540. owner: {
  8541. required: true,
  8542. type: "string"
  8543. },
  8544. page: {
  8545. type: "integer"
  8546. },
  8547. per_page: {
  8548. type: "integer"
  8549. },
  8550. repo: {
  8551. required: true,
  8552. type: "string"
  8553. }
  8554. },
  8555. url: "/networks/:owner/:repo/events"
  8556. },
  8557. listPublicEventsForUser: {
  8558. method: "GET",
  8559. params: {
  8560. page: {
  8561. type: "integer"
  8562. },
  8563. per_page: {
  8564. type: "integer"
  8565. },
  8566. username: {
  8567. required: true,
  8568. type: "string"
  8569. }
  8570. },
  8571. url: "/users/:username/events/public"
  8572. },
  8573. listReceivedEventsForUser: {
  8574. method: "GET",
  8575. params: {
  8576. page: {
  8577. type: "integer"
  8578. },
  8579. per_page: {
  8580. type: "integer"
  8581. },
  8582. username: {
  8583. required: true,
  8584. type: "string"
  8585. }
  8586. },
  8587. url: "/users/:username/received_events"
  8588. },
  8589. listReceivedPublicEventsForUser: {
  8590. method: "GET",
  8591. params: {
  8592. page: {
  8593. type: "integer"
  8594. },
  8595. per_page: {
  8596. type: "integer"
  8597. },
  8598. username: {
  8599. required: true,
  8600. type: "string"
  8601. }
  8602. },
  8603. url: "/users/:username/received_events/public"
  8604. },
  8605. listRepoEvents: {
  8606. method: "GET",
  8607. params: {
  8608. owner: {
  8609. required: true,
  8610. type: "string"
  8611. },
  8612. page: {
  8613. type: "integer"
  8614. },
  8615. per_page: {
  8616. type: "integer"
  8617. },
  8618. repo: {
  8619. required: true,
  8620. type: "string"
  8621. }
  8622. },
  8623. url: "/repos/:owner/:repo/events"
  8624. },
  8625. listReposStarredByAuthenticatedUser: {
  8626. method: "GET",
  8627. params: {
  8628. direction: {
  8629. enum: ["asc", "desc"],
  8630. type: "string"
  8631. },
  8632. page: {
  8633. type: "integer"
  8634. },
  8635. per_page: {
  8636. type: "integer"
  8637. },
  8638. sort: {
  8639. enum: ["created", "updated"],
  8640. type: "string"
  8641. }
  8642. },
  8643. url: "/user/starred"
  8644. },
  8645. listReposStarredByUser: {
  8646. method: "GET",
  8647. params: {
  8648. direction: {
  8649. enum: ["asc", "desc"],
  8650. type: "string"
  8651. },
  8652. page: {
  8653. type: "integer"
  8654. },
  8655. per_page: {
  8656. type: "integer"
  8657. },
  8658. sort: {
  8659. enum: ["created", "updated"],
  8660. type: "string"
  8661. },
  8662. username: {
  8663. required: true,
  8664. type: "string"
  8665. }
  8666. },
  8667. url: "/users/:username/starred"
  8668. },
  8669. listReposWatchedByUser: {
  8670. method: "GET",
  8671. params: {
  8672. page: {
  8673. type: "integer"
  8674. },
  8675. per_page: {
  8676. type: "integer"
  8677. },
  8678. username: {
  8679. required: true,
  8680. type: "string"
  8681. }
  8682. },
  8683. url: "/users/:username/subscriptions"
  8684. },
  8685. listStargazersForRepo: {
  8686. method: "GET",
  8687. params: {
  8688. owner: {
  8689. required: true,
  8690. type: "string"
  8691. },
  8692. page: {
  8693. type: "integer"
  8694. },
  8695. per_page: {
  8696. type: "integer"
  8697. },
  8698. repo: {
  8699. required: true,
  8700. type: "string"
  8701. }
  8702. },
  8703. url: "/repos/:owner/:repo/stargazers"
  8704. },
  8705. listWatchedReposForAuthenticatedUser: {
  8706. method: "GET",
  8707. params: {
  8708. page: {
  8709. type: "integer"
  8710. },
  8711. per_page: {
  8712. type: "integer"
  8713. }
  8714. },
  8715. url: "/user/subscriptions"
  8716. },
  8717. listWatchersForRepo: {
  8718. method: "GET",
  8719. params: {
  8720. owner: {
  8721. required: true,
  8722. type: "string"
  8723. },
  8724. page: {
  8725. type: "integer"
  8726. },
  8727. per_page: {
  8728. type: "integer"
  8729. },
  8730. repo: {
  8731. required: true,
  8732. type: "string"
  8733. }
  8734. },
  8735. url: "/repos/:owner/:repo/subscribers"
  8736. },
  8737. markAsRead: {
  8738. method: "PUT",
  8739. params: {
  8740. last_read_at: {
  8741. type: "string"
  8742. }
  8743. },
  8744. url: "/notifications"
  8745. },
  8746. markNotificationsAsReadForRepo: {
  8747. method: "PUT",
  8748. params: {
  8749. last_read_at: {
  8750. type: "string"
  8751. },
  8752. owner: {
  8753. required: true,
  8754. type: "string"
  8755. },
  8756. repo: {
  8757. required: true,
  8758. type: "string"
  8759. }
  8760. },
  8761. url: "/repos/:owner/:repo/notifications"
  8762. },
  8763. markThreadAsRead: {
  8764. method: "PATCH",
  8765. params: {
  8766. thread_id: {
  8767. required: true,
  8768. type: "integer"
  8769. }
  8770. },
  8771. url: "/notifications/threads/:thread_id"
  8772. },
  8773. setRepoSubscription: {
  8774. method: "PUT",
  8775. params: {
  8776. ignored: {
  8777. type: "boolean"
  8778. },
  8779. owner: {
  8780. required: true,
  8781. type: "string"
  8782. },
  8783. repo: {
  8784. required: true,
  8785. type: "string"
  8786. },
  8787. subscribed: {
  8788. type: "boolean"
  8789. }
  8790. },
  8791. url: "/repos/:owner/:repo/subscription"
  8792. },
  8793. setThreadSubscription: {
  8794. method: "PUT",
  8795. params: {
  8796. ignored: {
  8797. type: "boolean"
  8798. },
  8799. thread_id: {
  8800. required: true,
  8801. type: "integer"
  8802. }
  8803. },
  8804. url: "/notifications/threads/:thread_id/subscription"
  8805. },
  8806. starRepo: {
  8807. method: "PUT",
  8808. params: {
  8809. owner: {
  8810. required: true,
  8811. type: "string"
  8812. },
  8813. repo: {
  8814. required: true,
  8815. type: "string"
  8816. }
  8817. },
  8818. url: "/user/starred/:owner/:repo"
  8819. },
  8820. unstarRepo: {
  8821. method: "DELETE",
  8822. params: {
  8823. owner: {
  8824. required: true,
  8825. type: "string"
  8826. },
  8827. repo: {
  8828. required: true,
  8829. type: "string"
  8830. }
  8831. },
  8832. url: "/user/starred/:owner/:repo"
  8833. }
  8834. },
  8835. apps: {
  8836. addRepoToInstallation: {
  8837. headers: {
  8838. accept: "application/vnd.github.machine-man-preview+json"
  8839. },
  8840. method: "PUT",
  8841. params: {
  8842. installation_id: {
  8843. required: true,
  8844. type: "integer"
  8845. },
  8846. repository_id: {
  8847. required: true,
  8848. type: "integer"
  8849. }
  8850. },
  8851. url: "/user/installations/:installation_id/repositories/:repository_id"
  8852. },
  8853. checkAccountIsAssociatedWithAny: {
  8854. method: "GET",
  8855. params: {
  8856. account_id: {
  8857. required: true,
  8858. type: "integer"
  8859. }
  8860. },
  8861. url: "/marketplace_listing/accounts/:account_id"
  8862. },
  8863. checkAccountIsAssociatedWithAnyStubbed: {
  8864. method: "GET",
  8865. params: {
  8866. account_id: {
  8867. required: true,
  8868. type: "integer"
  8869. }
  8870. },
  8871. url: "/marketplace_listing/stubbed/accounts/:account_id"
  8872. },
  8873. checkAuthorization: {
  8874. deprecated: "octokit.apps.checkAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#check-an-authorization",
  8875. method: "GET",
  8876. params: {
  8877. access_token: {
  8878. required: true,
  8879. type: "string"
  8880. },
  8881. client_id: {
  8882. required: true,
  8883. type: "string"
  8884. }
  8885. },
  8886. url: "/applications/:client_id/tokens/:access_token"
  8887. },
  8888. checkToken: {
  8889. headers: {
  8890. accept: "application/vnd.github.doctor-strange-preview+json"
  8891. },
  8892. method: "POST",
  8893. params: {
  8894. access_token: {
  8895. type: "string"
  8896. },
  8897. client_id: {
  8898. required: true,
  8899. type: "string"
  8900. }
  8901. },
  8902. url: "/applications/:client_id/token"
  8903. },
  8904. createContentAttachment: {
  8905. headers: {
  8906. accept: "application/vnd.github.corsair-preview+json"
  8907. },
  8908. method: "POST",
  8909. params: {
  8910. body: {
  8911. required: true,
  8912. type: "string"
  8913. },
  8914. content_reference_id: {
  8915. required: true,
  8916. type: "integer"
  8917. },
  8918. title: {
  8919. required: true,
  8920. type: "string"
  8921. }
  8922. },
  8923. url: "/content_references/:content_reference_id/attachments"
  8924. },
  8925. createFromManifest: {
  8926. headers: {
  8927. accept: "application/vnd.github.fury-preview+json"
  8928. },
  8929. method: "POST",
  8930. params: {
  8931. code: {
  8932. required: true,
  8933. type: "string"
  8934. }
  8935. },
  8936. url: "/app-manifests/:code/conversions"
  8937. },
  8938. createInstallationToken: {
  8939. headers: {
  8940. accept: "application/vnd.github.machine-man-preview+json"
  8941. },
  8942. method: "POST",
  8943. params: {
  8944. installation_id: {
  8945. required: true,
  8946. type: "integer"
  8947. },
  8948. permissions: {
  8949. type: "object"
  8950. },
  8951. repository_ids: {
  8952. type: "integer[]"
  8953. }
  8954. },
  8955. url: "/app/installations/:installation_id/access_tokens"
  8956. },
  8957. deleteAuthorization: {
  8958. headers: {
  8959. accept: "application/vnd.github.doctor-strange-preview+json"
  8960. },
  8961. method: "DELETE",
  8962. params: {
  8963. access_token: {
  8964. type: "string"
  8965. },
  8966. client_id: {
  8967. required: true,
  8968. type: "string"
  8969. }
  8970. },
  8971. url: "/applications/:client_id/grant"
  8972. },
  8973. deleteInstallation: {
  8974. headers: {
  8975. accept: "application/vnd.github.gambit-preview+json,application/vnd.github.machine-man-preview+json"
  8976. },
  8977. method: "DELETE",
  8978. params: {
  8979. installation_id: {
  8980. required: true,
  8981. type: "integer"
  8982. }
  8983. },
  8984. url: "/app/installations/:installation_id"
  8985. },
  8986. deleteToken: {
  8987. headers: {
  8988. accept: "application/vnd.github.doctor-strange-preview+json"
  8989. },
  8990. method: "DELETE",
  8991. params: {
  8992. access_token: {
  8993. type: "string"
  8994. },
  8995. client_id: {
  8996. required: true,
  8997. type: "string"
  8998. }
  8999. },
  9000. url: "/applications/:client_id/token"
  9001. },
  9002. findOrgInstallation: {
  9003. deprecated: "octokit.apps.findOrgInstallation() has been renamed to octokit.apps.getOrgInstallation() (2019-04-10)",
  9004. headers: {
  9005. accept: "application/vnd.github.machine-man-preview+json"
  9006. },
  9007. method: "GET",
  9008. params: {
  9009. org: {
  9010. required: true,
  9011. type: "string"
  9012. }
  9013. },
  9014. url: "/orgs/:org/installation"
  9015. },
  9016. findRepoInstallation: {
  9017. deprecated: "octokit.apps.findRepoInstallation() has been renamed to octokit.apps.getRepoInstallation() (2019-04-10)",
  9018. headers: {
  9019. accept: "application/vnd.github.machine-man-preview+json"
  9020. },
  9021. method: "GET",
  9022. params: {
  9023. owner: {
  9024. required: true,
  9025. type: "string"
  9026. },
  9027. repo: {
  9028. required: true,
  9029. type: "string"
  9030. }
  9031. },
  9032. url: "/repos/:owner/:repo/installation"
  9033. },
  9034. findUserInstallation: {
  9035. deprecated: "octokit.apps.findUserInstallation() has been renamed to octokit.apps.getUserInstallation() (2019-04-10)",
  9036. headers: {
  9037. accept: "application/vnd.github.machine-man-preview+json"
  9038. },
  9039. method: "GET",
  9040. params: {
  9041. username: {
  9042. required: true,
  9043. type: "string"
  9044. }
  9045. },
  9046. url: "/users/:username/installation"
  9047. },
  9048. getAuthenticated: {
  9049. headers: {
  9050. accept: "application/vnd.github.machine-man-preview+json"
  9051. },
  9052. method: "GET",
  9053. params: {},
  9054. url: "/app"
  9055. },
  9056. getBySlug: {
  9057. headers: {
  9058. accept: "application/vnd.github.machine-man-preview+json"
  9059. },
  9060. method: "GET",
  9061. params: {
  9062. app_slug: {
  9063. required: true,
  9064. type: "string"
  9065. }
  9066. },
  9067. url: "/apps/:app_slug"
  9068. },
  9069. getInstallation: {
  9070. headers: {
  9071. accept: "application/vnd.github.machine-man-preview+json"
  9072. },
  9073. method: "GET",
  9074. params: {
  9075. installation_id: {
  9076. required: true,
  9077. type: "integer"
  9078. }
  9079. },
  9080. url: "/app/installations/:installation_id"
  9081. },
  9082. getOrgInstallation: {
  9083. headers: {
  9084. accept: "application/vnd.github.machine-man-preview+json"
  9085. },
  9086. method: "GET",
  9087. params: {
  9088. org: {
  9089. required: true,
  9090. type: "string"
  9091. }
  9092. },
  9093. url: "/orgs/:org/installation"
  9094. },
  9095. getRepoInstallation: {
  9096. headers: {
  9097. accept: "application/vnd.github.machine-man-preview+json"
  9098. },
  9099. method: "GET",
  9100. params: {
  9101. owner: {
  9102. required: true,
  9103. type: "string"
  9104. },
  9105. repo: {
  9106. required: true,
  9107. type: "string"
  9108. }
  9109. },
  9110. url: "/repos/:owner/:repo/installation"
  9111. },
  9112. getUserInstallation: {
  9113. headers: {
  9114. accept: "application/vnd.github.machine-man-preview+json"
  9115. },
  9116. method: "GET",
  9117. params: {
  9118. username: {
  9119. required: true,
  9120. type: "string"
  9121. }
  9122. },
  9123. url: "/users/:username/installation"
  9124. },
  9125. listAccountsUserOrOrgOnPlan: {
  9126. method: "GET",
  9127. params: {
  9128. direction: {
  9129. enum: ["asc", "desc"],
  9130. type: "string"
  9131. },
  9132. page: {
  9133. type: "integer"
  9134. },
  9135. per_page: {
  9136. type: "integer"
  9137. },
  9138. plan_id: {
  9139. required: true,
  9140. type: "integer"
  9141. },
  9142. sort: {
  9143. enum: ["created", "updated"],
  9144. type: "string"
  9145. }
  9146. },
  9147. url: "/marketplace_listing/plans/:plan_id/accounts"
  9148. },
  9149. listAccountsUserOrOrgOnPlanStubbed: {
  9150. method: "GET",
  9151. params: {
  9152. direction: {
  9153. enum: ["asc", "desc"],
  9154. type: "string"
  9155. },
  9156. page: {
  9157. type: "integer"
  9158. },
  9159. per_page: {
  9160. type: "integer"
  9161. },
  9162. plan_id: {
  9163. required: true,
  9164. type: "integer"
  9165. },
  9166. sort: {
  9167. enum: ["created", "updated"],
  9168. type: "string"
  9169. }
  9170. },
  9171. url: "/marketplace_listing/stubbed/plans/:plan_id/accounts"
  9172. },
  9173. listInstallationReposForAuthenticatedUser: {
  9174. headers: {
  9175. accept: "application/vnd.github.machine-man-preview+json"
  9176. },
  9177. method: "GET",
  9178. params: {
  9179. installation_id: {
  9180. required: true,
  9181. type: "integer"
  9182. },
  9183. page: {
  9184. type: "integer"
  9185. },
  9186. per_page: {
  9187. type: "integer"
  9188. }
  9189. },
  9190. url: "/user/installations/:installation_id/repositories"
  9191. },
  9192. listInstallations: {
  9193. headers: {
  9194. accept: "application/vnd.github.machine-man-preview+json"
  9195. },
  9196. method: "GET",
  9197. params: {
  9198. page: {
  9199. type: "integer"
  9200. },
  9201. per_page: {
  9202. type: "integer"
  9203. }
  9204. },
  9205. url: "/app/installations"
  9206. },
  9207. listInstallationsForAuthenticatedUser: {
  9208. headers: {
  9209. accept: "application/vnd.github.machine-man-preview+json"
  9210. },
  9211. method: "GET",
  9212. params: {
  9213. page: {
  9214. type: "integer"
  9215. },
  9216. per_page: {
  9217. type: "integer"
  9218. }
  9219. },
  9220. url: "/user/installations"
  9221. },
  9222. listMarketplacePurchasesForAuthenticatedUser: {
  9223. method: "GET",
  9224. params: {
  9225. page: {
  9226. type: "integer"
  9227. },
  9228. per_page: {
  9229. type: "integer"
  9230. }
  9231. },
  9232. url: "/user/marketplace_purchases"
  9233. },
  9234. listMarketplacePurchasesForAuthenticatedUserStubbed: {
  9235. method: "GET",
  9236. params: {
  9237. page: {
  9238. type: "integer"
  9239. },
  9240. per_page: {
  9241. type: "integer"
  9242. }
  9243. },
  9244. url: "/user/marketplace_purchases/stubbed"
  9245. },
  9246. listPlans: {
  9247. method: "GET",
  9248. params: {
  9249. page: {
  9250. type: "integer"
  9251. },
  9252. per_page: {
  9253. type: "integer"
  9254. }
  9255. },
  9256. url: "/marketplace_listing/plans"
  9257. },
  9258. listPlansStubbed: {
  9259. method: "GET",
  9260. params: {
  9261. page: {
  9262. type: "integer"
  9263. },
  9264. per_page: {
  9265. type: "integer"
  9266. }
  9267. },
  9268. url: "/marketplace_listing/stubbed/plans"
  9269. },
  9270. listRepos: {
  9271. headers: {
  9272. accept: "application/vnd.github.machine-man-preview+json"
  9273. },
  9274. method: "GET",
  9275. params: {
  9276. page: {
  9277. type: "integer"
  9278. },
  9279. per_page: {
  9280. type: "integer"
  9281. }
  9282. },
  9283. url: "/installation/repositories"
  9284. },
  9285. removeRepoFromInstallation: {
  9286. headers: {
  9287. accept: "application/vnd.github.machine-man-preview+json"
  9288. },
  9289. method: "DELETE",
  9290. params: {
  9291. installation_id: {
  9292. required: true,
  9293. type: "integer"
  9294. },
  9295. repository_id: {
  9296. required: true,
  9297. type: "integer"
  9298. }
  9299. },
  9300. url: "/user/installations/:installation_id/repositories/:repository_id"
  9301. },
  9302. resetAuthorization: {
  9303. deprecated: "octokit.apps.resetAuthorization() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#reset-an-authorization",
  9304. method: "POST",
  9305. params: {
  9306. access_token: {
  9307. required: true,
  9308. type: "string"
  9309. },
  9310. client_id: {
  9311. required: true,
  9312. type: "string"
  9313. }
  9314. },
  9315. url: "/applications/:client_id/tokens/:access_token"
  9316. },
  9317. resetToken: {
  9318. headers: {
  9319. accept: "application/vnd.github.doctor-strange-preview+json"
  9320. },
  9321. method: "PATCH",
  9322. params: {
  9323. access_token: {
  9324. type: "string"
  9325. },
  9326. client_id: {
  9327. required: true,
  9328. type: "string"
  9329. }
  9330. },
  9331. url: "/applications/:client_id/token"
  9332. },
  9333. revokeAuthorizationForApplication: {
  9334. deprecated: "octokit.apps.revokeAuthorizationForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-an-authorization-for-an-application",
  9335. method: "DELETE",
  9336. params: {
  9337. access_token: {
  9338. required: true,
  9339. type: "string"
  9340. },
  9341. client_id: {
  9342. required: true,
  9343. type: "string"
  9344. }
  9345. },
  9346. url: "/applications/:client_id/tokens/:access_token"
  9347. },
  9348. revokeGrantForApplication: {
  9349. deprecated: "octokit.apps.revokeGrantForApplication() is deprecated, see https://developer.github.com/v3/apps/oauth_applications/#revoke-a-grant-for-an-application",
  9350. method: "DELETE",
  9351. params: {
  9352. access_token: {
  9353. required: true,
  9354. type: "string"
  9355. },
  9356. client_id: {
  9357. required: true,
  9358. type: "string"
  9359. }
  9360. },
  9361. url: "/applications/:client_id/grants/:access_token"
  9362. },
  9363. revokeInstallationToken: {
  9364. headers: {
  9365. accept: "application/vnd.github.gambit-preview+json"
  9366. },
  9367. method: "DELETE",
  9368. params: {},
  9369. url: "/installation/token"
  9370. }
  9371. },
  9372. checks: {
  9373. create: {
  9374. headers: {
  9375. accept: "application/vnd.github.antiope-preview+json"
  9376. },
  9377. method: "POST",
  9378. params: {
  9379. actions: {
  9380. type: "object[]"
  9381. },
  9382. "actions[].description": {
  9383. required: true,
  9384. type: "string"
  9385. },
  9386. "actions[].identifier": {
  9387. required: true,
  9388. type: "string"
  9389. },
  9390. "actions[].label": {
  9391. required: true,
  9392. type: "string"
  9393. },
  9394. completed_at: {
  9395. type: "string"
  9396. },
  9397. conclusion: {
  9398. enum: ["success", "failure", "neutral", "cancelled", "timed_out", "action_required"],
  9399. type: "string"
  9400. },
  9401. details_url: {
  9402. type: "string"
  9403. },
  9404. external_id: {
  9405. type: "string"
  9406. },
  9407. head_sha: {
  9408. required: true,
  9409. type: "string"
  9410. },
  9411. name: {
  9412. required: true,
  9413. type: "string"
  9414. },
  9415. output: {
  9416. type: "object"
  9417. },
  9418. "output.annotations": {
  9419. type: "object[]"
  9420. },
  9421. "output.annotations[].annotation_level": {
  9422. enum: ["notice", "warning", "failure"],
  9423. required: true,
  9424. type: "string"
  9425. },
  9426. "output.annotations[].end_column": {
  9427. type: "integer"
  9428. },
  9429. "output.annotations[].end_line": {
  9430. required: true,
  9431. type: "integer"
  9432. },
  9433. "output.annotations[].message": {
  9434. required: true,
  9435. type: "string"
  9436. },
  9437. "output.annotations[].path": {
  9438. required: true,
  9439. type: "string"
  9440. },
  9441. "output.annotations[].raw_details": {
  9442. type: "string"
  9443. },
  9444. "output.annotations[].start_column": {
  9445. type: "integer"
  9446. },
  9447. "output.annotations[].start_line": {
  9448. required: true,
  9449. type: "integer"
  9450. },
  9451. "output.annotations[].title": {
  9452. type: "string"
  9453. },
  9454. "output.images": {
  9455. type: "object[]"
  9456. },
  9457. "output.images[].alt": {
  9458. required: true,
  9459. type: "string"
  9460. },
  9461. "output.images[].caption": {
  9462. type: "string"
  9463. },
  9464. "output.images[].image_url": {
  9465. required: true,
  9466. type: "string"
  9467. },
  9468. "output.summary": {
  9469. required: true,
  9470. type: "string"
  9471. },
  9472. "output.text": {
  9473. type: "string"
  9474. },
  9475. "output.title": {
  9476. required: true,
  9477. type: "string"
  9478. },
  9479. owner: {
  9480. required: true,
  9481. type: "string"
  9482. },
  9483. repo: {
  9484. required: true,
  9485. type: "string"
  9486. },
  9487. started_at: {
  9488. type: "string"
  9489. },
  9490. status: {
  9491. enum: ["queued", "in_progress", "completed"],
  9492. type: "string"
  9493. }
  9494. },
  9495. url: "/repos/:owner/:repo/check-runs"
  9496. },
  9497. createSuite: {
  9498. headers: {
  9499. accept: "application/vnd.github.antiope-preview+json"
  9500. },
  9501. method: "POST",
  9502. params: {
  9503. head_sha: {
  9504. required: true,
  9505. type: "string"
  9506. },
  9507. owner: {
  9508. required: true,
  9509. type: "string"
  9510. },
  9511. repo: {
  9512. required: true,
  9513. type: "string"
  9514. }
  9515. },
  9516. url: "/repos/:owner/:repo/check-suites"
  9517. },
  9518. get: {
  9519. headers: {
  9520. accept: "application/vnd.github.antiope-preview+json"
  9521. },
  9522. method: "GET",
  9523. params: {
  9524. check_run_id: {
  9525. required: true,
  9526. type: "integer"
  9527. },
  9528. owner: {
  9529. required: true,
  9530. type: "string"
  9531. },
  9532. repo: {
  9533. required: true,
  9534. type: "string"
  9535. }
  9536. },
  9537. url: "/repos/:owner/:repo/check-runs/:check_run_id"
  9538. },
  9539. getSuite: {
  9540. headers: {
  9541. accept: "application/vnd.github.antiope-preview+json"
  9542. },
  9543. method: "GET",
  9544. params: {
  9545. check_suite_id: {
  9546. required: true,
  9547. type: "integer"
  9548. },
  9549. owner: {
  9550. required: true,
  9551. type: "string"
  9552. },
  9553. repo: {
  9554. required: true,
  9555. type: "string"
  9556. }
  9557. },
  9558. url: "/repos/:owner/:repo/check-suites/:check_suite_id"
  9559. },
  9560. listAnnotations: {
  9561. headers: {
  9562. accept: "application/vnd.github.antiope-preview+json"
  9563. },
  9564. method: "GET",
  9565. params: {
  9566. check_run_id: {
  9567. required: true,
  9568. type: "integer"
  9569. },
  9570. owner: {
  9571. required: true,
  9572. type: "string"
  9573. },
  9574. page: {
  9575. type: "integer"
  9576. },
  9577. per_page: {
  9578. type: "integer"
  9579. },
  9580. repo: {
  9581. required: true,
  9582. type: "string"
  9583. }
  9584. },
  9585. url: "/repos/:owner/:repo/check-runs/:check_run_id/annotations"
  9586. },
  9587. listForRef: {
  9588. headers: {
  9589. accept: "application/vnd.github.antiope-preview+json"
  9590. },
  9591. method: "GET",
  9592. params: {
  9593. check_name: {
  9594. type: "string"
  9595. },
  9596. filter: {
  9597. enum: ["latest", "all"],
  9598. type: "string"
  9599. },
  9600. owner: {
  9601. required: true,
  9602. type: "string"
  9603. },
  9604. page: {
  9605. type: "integer"
  9606. },
  9607. per_page: {
  9608. type: "integer"
  9609. },
  9610. ref: {
  9611. required: true,
  9612. type: "string"
  9613. },
  9614. repo: {
  9615. required: true,
  9616. type: "string"
  9617. },
  9618. status: {
  9619. enum: ["queued", "in_progress", "completed"],
  9620. type: "string"
  9621. }
  9622. },
  9623. url: "/repos/:owner/:repo/commits/:ref/check-runs"
  9624. },
  9625. listForSuite: {
  9626. headers: {
  9627. accept: "application/vnd.github.antiope-preview+json"
  9628. },
  9629. method: "GET",
  9630. params: {
  9631. check_name: {
  9632. type: "string"
  9633. },
  9634. check_suite_id: {
  9635. required: true,
  9636. type: "integer"
  9637. },
  9638. filter: {
  9639. enum: ["latest", "all"],
  9640. type: "string"
  9641. },
  9642. owner: {
  9643. required: true,
  9644. type: "string"
  9645. },
  9646. page: {
  9647. type: "integer"
  9648. },
  9649. per_page: {
  9650. type: "integer"
  9651. },
  9652. repo: {
  9653. required: true,
  9654. type: "string"
  9655. },
  9656. status: {
  9657. enum: ["queued", "in_progress", "completed"],
  9658. type: "string"
  9659. }
  9660. },
  9661. url: "/repos/:owner/:repo/check-suites/:check_suite_id/check-runs"
  9662. },
  9663. listSuitesForRef: {
  9664. headers: {
  9665. accept: "application/vnd.github.antiope-preview+json"
  9666. },
  9667. method: "GET",
  9668. params: {
  9669. app_id: {
  9670. type: "integer"
  9671. },
  9672. check_name: {
  9673. type: "string"
  9674. },
  9675. owner: {
  9676. required: true,
  9677. type: "string"
  9678. },
  9679. page: {
  9680. type: "integer"
  9681. },
  9682. per_page: {
  9683. type: "integer"
  9684. },
  9685. ref: {
  9686. required: true,
  9687. type: "string"
  9688. },
  9689. repo: {
  9690. required: true,
  9691. type: "string"
  9692. }
  9693. },
  9694. url: "/repos/:owner/:repo/commits/:ref/check-suites"
  9695. },
  9696. rerequestSuite: {
  9697. headers: {
  9698. accept: "application/vnd.github.antiope-preview+json"
  9699. },
  9700. method: "POST",
  9701. params: {
  9702. check_suite_id: {
  9703. required: true,
  9704. type: "integer"
  9705. },
  9706. owner: {
  9707. required: true,
  9708. type: "string"
  9709. },
  9710. repo: {
  9711. required: true,
  9712. type: "string"
  9713. }
  9714. },
  9715. url: "/repos/:owner/:repo/check-suites/:check_suite_id/rerequest"
  9716. },
  9717. setSuitesPreferences: {
  9718. headers: {
  9719. accept: "application/vnd.github.antiope-preview+json"
  9720. },
  9721. method: "PATCH",
  9722. params: {
  9723. auto_trigger_checks: {
  9724. type: "object[]"
  9725. },
  9726. "auto_trigger_checks[].app_id": {
  9727. required: true,
  9728. type: "integer"
  9729. },
  9730. "auto_trigger_checks[].setting": {
  9731. required: true,
  9732. type: "boolean"
  9733. },
  9734. owner: {
  9735. required: true,
  9736. type: "string"
  9737. },
  9738. repo: {
  9739. required: true,
  9740. type: "string"
  9741. }
  9742. },
  9743. url: "/repos/:owner/:repo/check-suites/preferences"
  9744. },
  9745. update: {
  9746. headers: {
  9747. accept: "application/vnd.github.antiope-preview+json"
  9748. },
  9749. method: "PATCH",
  9750. params: {
  9751. actions: {
  9752. type: "object[]"
  9753. },
  9754. "actions[].description": {
  9755. required: true,
  9756. type: "string"
  9757. },
  9758. "actions[].identifier": {
  9759. required: true,
  9760. type: "string"
  9761. },
  9762. "actions[].label": {
  9763. required: true,
  9764. type: "string"
  9765. },
  9766. check_run_id: {
  9767. required: true,
  9768. type: "integer"
  9769. },
  9770. completed_at: {
  9771. type: "string"
  9772. },
  9773. conclusion: {
  9774. enum: ["success", "failure", "neutral", "cancelled", "timed_out", "action_required"],
  9775. type: "string"
  9776. },
  9777. details_url: {
  9778. type: "string"
  9779. },
  9780. external_id: {
  9781. type: "string"
  9782. },
  9783. name: {
  9784. type: "string"
  9785. },
  9786. output: {
  9787. type: "object"
  9788. },
  9789. "output.annotations": {
  9790. type: "object[]"
  9791. },
  9792. "output.annotations[].annotation_level": {
  9793. enum: ["notice", "warning", "failure"],
  9794. required: true,
  9795. type: "string"
  9796. },
  9797. "output.annotations[].end_column": {
  9798. type: "integer"
  9799. },
  9800. "output.annotations[].end_line": {
  9801. required: true,
  9802. type: "integer"
  9803. },
  9804. "output.annotations[].message": {
  9805. required: true,
  9806. type: "string"
  9807. },
  9808. "output.annotations[].path": {
  9809. required: true,
  9810. type: "string"
  9811. },
  9812. "output.annotations[].raw_details": {
  9813. type: "string"
  9814. },
  9815. "output.annotations[].start_column": {
  9816. type: "integer"
  9817. },
  9818. "output.annotations[].start_line": {
  9819. required: true,
  9820. type: "integer"
  9821. },
  9822. "output.annotations[].title": {
  9823. type: "string"
  9824. },
  9825. "output.images": {
  9826. type: "object[]"
  9827. },
  9828. "output.images[].alt": {
  9829. required: true,
  9830. type: "string"
  9831. },
  9832. "output.images[].caption": {
  9833. type: "string"
  9834. },
  9835. "output.images[].image_url": {
  9836. required: true,
  9837. type: "string"
  9838. },
  9839. "output.summary": {
  9840. required: true,
  9841. type: "string"
  9842. },
  9843. "output.text": {
  9844. type: "string"
  9845. },
  9846. "output.title": {
  9847. type: "string"
  9848. },
  9849. owner: {
  9850. required: true,
  9851. type: "string"
  9852. },
  9853. repo: {
  9854. required: true,
  9855. type: "string"
  9856. },
  9857. started_at: {
  9858. type: "string"
  9859. },
  9860. status: {
  9861. enum: ["queued", "in_progress", "completed"],
  9862. type: "string"
  9863. }
  9864. },
  9865. url: "/repos/:owner/:repo/check-runs/:check_run_id"
  9866. }
  9867. },
  9868. codesOfConduct: {
  9869. getConductCode: {
  9870. headers: {
  9871. accept: "application/vnd.github.scarlet-witch-preview+json"
  9872. },
  9873. method: "GET",
  9874. params: {
  9875. key: {
  9876. required: true,
  9877. type: "string"
  9878. }
  9879. },
  9880. url: "/codes_of_conduct/:key"
  9881. },
  9882. getForRepo: {
  9883. headers: {
  9884. accept: "application/vnd.github.scarlet-witch-preview+json"
  9885. },
  9886. method: "GET",
  9887. params: {
  9888. owner: {
  9889. required: true,
  9890. type: "string"
  9891. },
  9892. repo: {
  9893. required: true,
  9894. type: "string"
  9895. }
  9896. },
  9897. url: "/repos/:owner/:repo/community/code_of_conduct"
  9898. },
  9899. listConductCodes: {
  9900. headers: {
  9901. accept: "application/vnd.github.scarlet-witch-preview+json"
  9902. },
  9903. method: "GET",
  9904. params: {},
  9905. url: "/codes_of_conduct"
  9906. }
  9907. },
  9908. emojis: {
  9909. get: {
  9910. method: "GET",
  9911. params: {},
  9912. url: "/emojis"
  9913. }
  9914. },
  9915. gists: {
  9916. checkIsStarred: {
  9917. method: "GET",
  9918. params: {
  9919. gist_id: {
  9920. required: true,
  9921. type: "string"
  9922. }
  9923. },
  9924. url: "/gists/:gist_id/star"
  9925. },
  9926. create: {
  9927. method: "POST",
  9928. params: {
  9929. description: {
  9930. type: "string"
  9931. },
  9932. files: {
  9933. required: true,
  9934. type: "object"
  9935. },
  9936. "files.content": {
  9937. type: "string"
  9938. },
  9939. public: {
  9940. type: "boolean"
  9941. }
  9942. },
  9943. url: "/gists"
  9944. },
  9945. createComment: {
  9946. method: "POST",
  9947. params: {
  9948. body: {
  9949. required: true,
  9950. type: "string"
  9951. },
  9952. gist_id: {
  9953. required: true,
  9954. type: "string"
  9955. }
  9956. },
  9957. url: "/gists/:gist_id/comments"
  9958. },
  9959. delete: {
  9960. method: "DELETE",
  9961. params: {
  9962. gist_id: {
  9963. required: true,
  9964. type: "string"
  9965. }
  9966. },
  9967. url: "/gists/:gist_id"
  9968. },
  9969. deleteComment: {
  9970. method: "DELETE",
  9971. params: {
  9972. comment_id: {
  9973. required: true,
  9974. type: "integer"
  9975. },
  9976. gist_id: {
  9977. required: true,
  9978. type: "string"
  9979. }
  9980. },
  9981. url: "/gists/:gist_id/comments/:comment_id"
  9982. },
  9983. fork: {
  9984. method: "POST",
  9985. params: {
  9986. gist_id: {
  9987. required: true,
  9988. type: "string"
  9989. }
  9990. },
  9991. url: "/gists/:gist_id/forks"
  9992. },
  9993. get: {
  9994. method: "GET",
  9995. params: {
  9996. gist_id: {
  9997. required: true,
  9998. type: "string"
  9999. }
  10000. },
  10001. url: "/gists/:gist_id"
  10002. },
  10003. getComment: {
  10004. method: "GET",
  10005. params: {
  10006. comment_id: {
  10007. required: true,
  10008. type: "integer"
  10009. },
  10010. gist_id: {
  10011. required: true,
  10012. type: "string"
  10013. }
  10014. },
  10015. url: "/gists/:gist_id/comments/:comment_id"
  10016. },
  10017. getRevision: {
  10018. method: "GET",
  10019. params: {
  10020. gist_id: {
  10021. required: true,
  10022. type: "string"
  10023. },
  10024. sha: {
  10025. required: true,
  10026. type: "string"
  10027. }
  10028. },
  10029. url: "/gists/:gist_id/:sha"
  10030. },
  10031. list: {
  10032. method: "GET",
  10033. params: {
  10034. page: {
  10035. type: "integer"
  10036. },
  10037. per_page: {
  10038. type: "integer"
  10039. },
  10040. since: {
  10041. type: "string"
  10042. }
  10043. },
  10044. url: "/gists"
  10045. },
  10046. listComments: {
  10047. method: "GET",
  10048. params: {
  10049. gist_id: {
  10050. required: true,
  10051. type: "string"
  10052. },
  10053. page: {
  10054. type: "integer"
  10055. },
  10056. per_page: {
  10057. type: "integer"
  10058. }
  10059. },
  10060. url: "/gists/:gist_id/comments"
  10061. },
  10062. listCommits: {
  10063. method: "GET",
  10064. params: {
  10065. gist_id: {
  10066. required: true,
  10067. type: "string"
  10068. },
  10069. page: {
  10070. type: "integer"
  10071. },
  10072. per_page: {
  10073. type: "integer"
  10074. }
  10075. },
  10076. url: "/gists/:gist_id/commits"
  10077. },
  10078. listForks: {
  10079. method: "GET",
  10080. params: {
  10081. gist_id: {
  10082. required: true,
  10083. type: "string"
  10084. },
  10085. page: {
  10086. type: "integer"
  10087. },
  10088. per_page: {
  10089. type: "integer"
  10090. }
  10091. },
  10092. url: "/gists/:gist_id/forks"
  10093. },
  10094. listPublic: {
  10095. method: "GET",
  10096. params: {
  10097. page: {
  10098. type: "integer"
  10099. },
  10100. per_page: {
  10101. type: "integer"
  10102. },
  10103. since: {
  10104. type: "string"
  10105. }
  10106. },
  10107. url: "/gists/public"
  10108. },
  10109. listPublicForUser: {
  10110. method: "GET",
  10111. params: {
  10112. page: {
  10113. type: "integer"
  10114. },
  10115. per_page: {
  10116. type: "integer"
  10117. },
  10118. since: {
  10119. type: "string"
  10120. },
  10121. username: {
  10122. required: true,
  10123. type: "string"
  10124. }
  10125. },
  10126. url: "/users/:username/gists"
  10127. },
  10128. listStarred: {
  10129. method: "GET",
  10130. params: {
  10131. page: {
  10132. type: "integer"
  10133. },
  10134. per_page: {
  10135. type: "integer"
  10136. },
  10137. since: {
  10138. type: "string"
  10139. }
  10140. },
  10141. url: "/gists/starred"
  10142. },
  10143. star: {
  10144. method: "PUT",
  10145. params: {
  10146. gist_id: {
  10147. required: true,
  10148. type: "string"
  10149. }
  10150. },
  10151. url: "/gists/:gist_id/star"
  10152. },
  10153. unstar: {
  10154. method: "DELETE",
  10155. params: {
  10156. gist_id: {
  10157. required: true,
  10158. type: "string"
  10159. }
  10160. },
  10161. url: "/gists/:gist_id/star"
  10162. },
  10163. update: {
  10164. method: "PATCH",
  10165. params: {
  10166. description: {
  10167. type: "string"
  10168. },
  10169. files: {
  10170. type: "object"
  10171. },
  10172. "files.content": {
  10173. type: "string"
  10174. },
  10175. "files.filename": {
  10176. type: "string"
  10177. },
  10178. gist_id: {
  10179. required: true,
  10180. type: "string"
  10181. }
  10182. },
  10183. url: "/gists/:gist_id"
  10184. },
  10185. updateComment: {
  10186. method: "PATCH",
  10187. params: {
  10188. body: {
  10189. required: true,
  10190. type: "string"
  10191. },
  10192. comment_id: {
  10193. required: true,
  10194. type: "integer"
  10195. },
  10196. gist_id: {
  10197. required: true,
  10198. type: "string"
  10199. }
  10200. },
  10201. url: "/gists/:gist_id/comments/:comment_id"
  10202. }
  10203. },
  10204. git: {
  10205. createBlob: {
  10206. method: "POST",
  10207. params: {
  10208. content: {
  10209. required: true,
  10210. type: "string"
  10211. },
  10212. encoding: {
  10213. type: "string"
  10214. },
  10215. owner: {
  10216. required: true,
  10217. type: "string"
  10218. },
  10219. repo: {
  10220. required: true,
  10221. type: "string"
  10222. }
  10223. },
  10224. url: "/repos/:owner/:repo/git/blobs"
  10225. },
  10226. createCommit: {
  10227. method: "POST",
  10228. params: {
  10229. author: {
  10230. type: "object"
  10231. },
  10232. "author.date": {
  10233. type: "string"
  10234. },
  10235. "author.email": {
  10236. type: "string"
  10237. },
  10238. "author.name": {
  10239. type: "string"
  10240. },
  10241. committer: {
  10242. type: "object"
  10243. },
  10244. "committer.date": {
  10245. type: "string"
  10246. },
  10247. "committer.email": {
  10248. type: "string"
  10249. },
  10250. "committer.name": {
  10251. type: "string"
  10252. },
  10253. message: {
  10254. required: true,
  10255. type: "string"
  10256. },
  10257. owner: {
  10258. required: true,
  10259. type: "string"
  10260. },
  10261. parents: {
  10262. required: true,
  10263. type: "string[]"
  10264. },
  10265. repo: {
  10266. required: true,
  10267. type: "string"
  10268. },
  10269. signature: {
  10270. type: "string"
  10271. },
  10272. tree: {
  10273. required: true,
  10274. type: "string"
  10275. }
  10276. },
  10277. url: "/repos/:owner/:repo/git/commits"
  10278. },
  10279. createRef: {
  10280. method: "POST",
  10281. params: {
  10282. owner: {
  10283. required: true,
  10284. type: "string"
  10285. },
  10286. ref: {
  10287. required: true,
  10288. type: "string"
  10289. },
  10290. repo: {
  10291. required: true,
  10292. type: "string"
  10293. },
  10294. sha: {
  10295. required: true,
  10296. type: "string"
  10297. }
  10298. },
  10299. url: "/repos/:owner/:repo/git/refs"
  10300. },
  10301. createTag: {
  10302. method: "POST",
  10303. params: {
  10304. message: {
  10305. required: true,
  10306. type: "string"
  10307. },
  10308. object: {
  10309. required: true,
  10310. type: "string"
  10311. },
  10312. owner: {
  10313. required: true,
  10314. type: "string"
  10315. },
  10316. repo: {
  10317. required: true,
  10318. type: "string"
  10319. },
  10320. tag: {
  10321. required: true,
  10322. type: "string"
  10323. },
  10324. tagger: {
  10325. type: "object"
  10326. },
  10327. "tagger.date": {
  10328. type: "string"
  10329. },
  10330. "tagger.email": {
  10331. type: "string"
  10332. },
  10333. "tagger.name": {
  10334. type: "string"
  10335. },
  10336. type: {
  10337. enum: ["commit", "tree", "blob"],
  10338. required: true,
  10339. type: "string"
  10340. }
  10341. },
  10342. url: "/repos/:owner/:repo/git/tags"
  10343. },
  10344. createTree: {
  10345. method: "POST",
  10346. params: {
  10347. base_tree: {
  10348. type: "string"
  10349. },
  10350. owner: {
  10351. required: true,
  10352. type: "string"
  10353. },
  10354. repo: {
  10355. required: true,
  10356. type: "string"
  10357. },
  10358. tree: {
  10359. required: true,
  10360. type: "object[]"
  10361. },
  10362. "tree[].content": {
  10363. type: "string"
  10364. },
  10365. "tree[].mode": {
  10366. enum: ["100644", "100755", "040000", "160000", "120000"],
  10367. type: "string"
  10368. },
  10369. "tree[].path": {
  10370. type: "string"
  10371. },
  10372. "tree[].sha": {
  10373. allowNull: true,
  10374. type: "string"
  10375. },
  10376. "tree[].type": {
  10377. enum: ["blob", "tree", "commit"],
  10378. type: "string"
  10379. }
  10380. },
  10381. url: "/repos/:owner/:repo/git/trees"
  10382. },
  10383. deleteRef: {
  10384. method: "DELETE",
  10385. params: {
  10386. owner: {
  10387. required: true,
  10388. type: "string"
  10389. },
  10390. ref: {
  10391. required: true,
  10392. type: "string"
  10393. },
  10394. repo: {
  10395. required: true,
  10396. type: "string"
  10397. }
  10398. },
  10399. url: "/repos/:owner/:repo/git/refs/:ref"
  10400. },
  10401. getBlob: {
  10402. method: "GET",
  10403. params: {
  10404. file_sha: {
  10405. required: true,
  10406. type: "string"
  10407. },
  10408. owner: {
  10409. required: true,
  10410. type: "string"
  10411. },
  10412. repo: {
  10413. required: true,
  10414. type: "string"
  10415. }
  10416. },
  10417. url: "/repos/:owner/:repo/git/blobs/:file_sha"
  10418. },
  10419. getCommit: {
  10420. method: "GET",
  10421. params: {
  10422. commit_sha: {
  10423. required: true,
  10424. type: "string"
  10425. },
  10426. owner: {
  10427. required: true,
  10428. type: "string"
  10429. },
  10430. repo: {
  10431. required: true,
  10432. type: "string"
  10433. }
  10434. },
  10435. url: "/repos/:owner/:repo/git/commits/:commit_sha"
  10436. },
  10437. getRef: {
  10438. method: "GET",
  10439. params: {
  10440. owner: {
  10441. required: true,
  10442. type: "string"
  10443. },
  10444. ref: {
  10445. required: true,
  10446. type: "string"
  10447. },
  10448. repo: {
  10449. required: true,
  10450. type: "string"
  10451. }
  10452. },
  10453. url: "/repos/:owner/:repo/git/ref/:ref"
  10454. },
  10455. getTag: {
  10456. method: "GET",
  10457. params: {
  10458. owner: {
  10459. required: true,
  10460. type: "string"
  10461. },
  10462. repo: {
  10463. required: true,
  10464. type: "string"
  10465. },
  10466. tag_sha: {
  10467. required: true,
  10468. type: "string"
  10469. }
  10470. },
  10471. url: "/repos/:owner/:repo/git/tags/:tag_sha"
  10472. },
  10473. getTree: {
  10474. method: "GET",
  10475. params: {
  10476. owner: {
  10477. required: true,
  10478. type: "string"
  10479. },
  10480. recursive: {
  10481. enum: ["1"],
  10482. type: "integer"
  10483. },
  10484. repo: {
  10485. required: true,
  10486. type: "string"
  10487. },
  10488. tree_sha: {
  10489. required: true,
  10490. type: "string"
  10491. }
  10492. },
  10493. url: "/repos/:owner/:repo/git/trees/:tree_sha"
  10494. },
  10495. listMatchingRefs: {
  10496. method: "GET",
  10497. params: {
  10498. owner: {
  10499. required: true,
  10500. type: "string"
  10501. },
  10502. page: {
  10503. type: "integer"
  10504. },
  10505. per_page: {
  10506. type: "integer"
  10507. },
  10508. ref: {
  10509. required: true,
  10510. type: "string"
  10511. },
  10512. repo: {
  10513. required: true,
  10514. type: "string"
  10515. }
  10516. },
  10517. url: "/repos/:owner/:repo/git/matching-refs/:ref"
  10518. },
  10519. listRefs: {
  10520. method: "GET",
  10521. params: {
  10522. namespace: {
  10523. type: "string"
  10524. },
  10525. owner: {
  10526. required: true,
  10527. type: "string"
  10528. },
  10529. page: {
  10530. type: "integer"
  10531. },
  10532. per_page: {
  10533. type: "integer"
  10534. },
  10535. repo: {
  10536. required: true,
  10537. type: "string"
  10538. }
  10539. },
  10540. url: "/repos/:owner/:repo/git/refs/:namespace"
  10541. },
  10542. updateRef: {
  10543. method: "PATCH",
  10544. params: {
  10545. force: {
  10546. type: "boolean"
  10547. },
  10548. owner: {
  10549. required: true,
  10550. type: "string"
  10551. },
  10552. ref: {
  10553. required: true,
  10554. type: "string"
  10555. },
  10556. repo: {
  10557. required: true,
  10558. type: "string"
  10559. },
  10560. sha: {
  10561. required: true,
  10562. type: "string"
  10563. }
  10564. },
  10565. url: "/repos/:owner/:repo/git/refs/:ref"
  10566. }
  10567. },
  10568. gitignore: {
  10569. getTemplate: {
  10570. method: "GET",
  10571. params: {
  10572. name: {
  10573. required: true,
  10574. type: "string"
  10575. }
  10576. },
  10577. url: "/gitignore/templates/:name"
  10578. },
  10579. listTemplates: {
  10580. method: "GET",
  10581. params: {},
  10582. url: "/gitignore/templates"
  10583. }
  10584. },
  10585. interactions: {
  10586. addOrUpdateRestrictionsForOrg: {
  10587. headers: {
  10588. accept: "application/vnd.github.sombra-preview+json"
  10589. },
  10590. method: "PUT",
  10591. params: {
  10592. limit: {
  10593. enum: ["existing_users", "contributors_only", "collaborators_only"],
  10594. required: true,
  10595. type: "string"
  10596. },
  10597. org: {
  10598. required: true,
  10599. type: "string"
  10600. }
  10601. },
  10602. url: "/orgs/:org/interaction-limits"
  10603. },
  10604. addOrUpdateRestrictionsForRepo: {
  10605. headers: {
  10606. accept: "application/vnd.github.sombra-preview+json"
  10607. },
  10608. method: "PUT",
  10609. params: {
  10610. limit: {
  10611. enum: ["existing_users", "contributors_only", "collaborators_only"],
  10612. required: true,
  10613. type: "string"
  10614. },
  10615. owner: {
  10616. required: true,
  10617. type: "string"
  10618. },
  10619. repo: {
  10620. required: true,
  10621. type: "string"
  10622. }
  10623. },
  10624. url: "/repos/:owner/:repo/interaction-limits"
  10625. },
  10626. getRestrictionsForOrg: {
  10627. headers: {
  10628. accept: "application/vnd.github.sombra-preview+json"
  10629. },
  10630. method: "GET",
  10631. params: {
  10632. org: {
  10633. required: true,
  10634. type: "string"
  10635. }
  10636. },
  10637. url: "/orgs/:org/interaction-limits"
  10638. },
  10639. getRestrictionsForRepo: {
  10640. headers: {
  10641. accept: "application/vnd.github.sombra-preview+json"
  10642. },
  10643. method: "GET",
  10644. params: {
  10645. owner: {
  10646. required: true,
  10647. type: "string"
  10648. },
  10649. repo: {
  10650. required: true,
  10651. type: "string"
  10652. }
  10653. },
  10654. url: "/repos/:owner/:repo/interaction-limits"
  10655. },
  10656. removeRestrictionsForOrg: {
  10657. headers: {
  10658. accept: "application/vnd.github.sombra-preview+json"
  10659. },
  10660. method: "DELETE",
  10661. params: {
  10662. org: {
  10663. required: true,
  10664. type: "string"
  10665. }
  10666. },
  10667. url: "/orgs/:org/interaction-limits"
  10668. },
  10669. removeRestrictionsForRepo: {
  10670. headers: {
  10671. accept: "application/vnd.github.sombra-preview+json"
  10672. },
  10673. method: "DELETE",
  10674. params: {
  10675. owner: {
  10676. required: true,
  10677. type: "string"
  10678. },
  10679. repo: {
  10680. required: true,
  10681. type: "string"
  10682. }
  10683. },
  10684. url: "/repos/:owner/:repo/interaction-limits"
  10685. }
  10686. },
  10687. issues: {
  10688. addAssignees: {
  10689. method: "POST",
  10690. params: {
  10691. assignees: {
  10692. type: "string[]"
  10693. },
  10694. issue_number: {
  10695. required: true,
  10696. type: "integer"
  10697. },
  10698. number: {
  10699. alias: "issue_number",
  10700. deprecated: true,
  10701. type: "integer"
  10702. },
  10703. owner: {
  10704. required: true,
  10705. type: "string"
  10706. },
  10707. repo: {
  10708. required: true,
  10709. type: "string"
  10710. }
  10711. },
  10712. url: "/repos/:owner/:repo/issues/:issue_number/assignees"
  10713. },
  10714. addLabels: {
  10715. method: "POST",
  10716. params: {
  10717. issue_number: {
  10718. required: true,
  10719. type: "integer"
  10720. },
  10721. labels: {
  10722. required: true,
  10723. type: "string[]"
  10724. },
  10725. number: {
  10726. alias: "issue_number",
  10727. deprecated: true,
  10728. type: "integer"
  10729. },
  10730. owner: {
  10731. required: true,
  10732. type: "string"
  10733. },
  10734. repo: {
  10735. required: true,
  10736. type: "string"
  10737. }
  10738. },
  10739. url: "/repos/:owner/:repo/issues/:issue_number/labels"
  10740. },
  10741. checkAssignee: {
  10742. method: "GET",
  10743. params: {
  10744. assignee: {
  10745. required: true,
  10746. type: "string"
  10747. },
  10748. owner: {
  10749. required: true,
  10750. type: "string"
  10751. },
  10752. repo: {
  10753. required: true,
  10754. type: "string"
  10755. }
  10756. },
  10757. url: "/repos/:owner/:repo/assignees/:assignee"
  10758. },
  10759. create: {
  10760. method: "POST",
  10761. params: {
  10762. assignee: {
  10763. type: "string"
  10764. },
  10765. assignees: {
  10766. type: "string[]"
  10767. },
  10768. body: {
  10769. type: "string"
  10770. },
  10771. labels: {
  10772. type: "string[]"
  10773. },
  10774. milestone: {
  10775. type: "integer"
  10776. },
  10777. owner: {
  10778. required: true,
  10779. type: "string"
  10780. },
  10781. repo: {
  10782. required: true,
  10783. type: "string"
  10784. },
  10785. title: {
  10786. required: true,
  10787. type: "string"
  10788. }
  10789. },
  10790. url: "/repos/:owner/:repo/issues"
  10791. },
  10792. createComment: {
  10793. method: "POST",
  10794. params: {
  10795. body: {
  10796. required: true,
  10797. type: "string"
  10798. },
  10799. issue_number: {
  10800. required: true,
  10801. type: "integer"
  10802. },
  10803. number: {
  10804. alias: "issue_number",
  10805. deprecated: true,
  10806. type: "integer"
  10807. },
  10808. owner: {
  10809. required: true,
  10810. type: "string"
  10811. },
  10812. repo: {
  10813. required: true,
  10814. type: "string"
  10815. }
  10816. },
  10817. url: "/repos/:owner/:repo/issues/:issue_number/comments"
  10818. },
  10819. createLabel: {
  10820. method: "POST",
  10821. params: {
  10822. color: {
  10823. required: true,
  10824. type: "string"
  10825. },
  10826. description: {
  10827. type: "string"
  10828. },
  10829. name: {
  10830. required: true,
  10831. type: "string"
  10832. },
  10833. owner: {
  10834. required: true,
  10835. type: "string"
  10836. },
  10837. repo: {
  10838. required: true,
  10839. type: "string"
  10840. }
  10841. },
  10842. url: "/repos/:owner/:repo/labels"
  10843. },
  10844. createMilestone: {
  10845. method: "POST",
  10846. params: {
  10847. description: {
  10848. type: "string"
  10849. },
  10850. due_on: {
  10851. type: "string"
  10852. },
  10853. owner: {
  10854. required: true,
  10855. type: "string"
  10856. },
  10857. repo: {
  10858. required: true,
  10859. type: "string"
  10860. },
  10861. state: {
  10862. enum: ["open", "closed"],
  10863. type: "string"
  10864. },
  10865. title: {
  10866. required: true,
  10867. type: "string"
  10868. }
  10869. },
  10870. url: "/repos/:owner/:repo/milestones"
  10871. },
  10872. deleteComment: {
  10873. method: "DELETE",
  10874. params: {
  10875. comment_id: {
  10876. required: true,
  10877. type: "integer"
  10878. },
  10879. owner: {
  10880. required: true,
  10881. type: "string"
  10882. },
  10883. repo: {
  10884. required: true,
  10885. type: "string"
  10886. }
  10887. },
  10888. url: "/repos/:owner/:repo/issues/comments/:comment_id"
  10889. },
  10890. deleteLabel: {
  10891. method: "DELETE",
  10892. params: {
  10893. name: {
  10894. required: true,
  10895. type: "string"
  10896. },
  10897. owner: {
  10898. required: true,
  10899. type: "string"
  10900. },
  10901. repo: {
  10902. required: true,
  10903. type: "string"
  10904. }
  10905. },
  10906. url: "/repos/:owner/:repo/labels/:name"
  10907. },
  10908. deleteMilestone: {
  10909. method: "DELETE",
  10910. params: {
  10911. milestone_number: {
  10912. required: true,
  10913. type: "integer"
  10914. },
  10915. number: {
  10916. alias: "milestone_number",
  10917. deprecated: true,
  10918. type: "integer"
  10919. },
  10920. owner: {
  10921. required: true,
  10922. type: "string"
  10923. },
  10924. repo: {
  10925. required: true,
  10926. type: "string"
  10927. }
  10928. },
  10929. url: "/repos/:owner/:repo/milestones/:milestone_number"
  10930. },
  10931. get: {
  10932. method: "GET",
  10933. params: {
  10934. issue_number: {
  10935. required: true,
  10936. type: "integer"
  10937. },
  10938. number: {
  10939. alias: "issue_number",
  10940. deprecated: true,
  10941. type: "integer"
  10942. },
  10943. owner: {
  10944. required: true,
  10945. type: "string"
  10946. },
  10947. repo: {
  10948. required: true,
  10949. type: "string"
  10950. }
  10951. },
  10952. url: "/repos/:owner/:repo/issues/:issue_number"
  10953. },
  10954. getComment: {
  10955. method: "GET",
  10956. params: {
  10957. comment_id: {
  10958. required: true,
  10959. type: "integer"
  10960. },
  10961. owner: {
  10962. required: true,
  10963. type: "string"
  10964. },
  10965. repo: {
  10966. required: true,
  10967. type: "string"
  10968. }
  10969. },
  10970. url: "/repos/:owner/:repo/issues/comments/:comment_id"
  10971. },
  10972. getEvent: {
  10973. method: "GET",
  10974. params: {
  10975. event_id: {
  10976. required: true,
  10977. type: "integer"
  10978. },
  10979. owner: {
  10980. required: true,
  10981. type: "string"
  10982. },
  10983. repo: {
  10984. required: true,
  10985. type: "string"
  10986. }
  10987. },
  10988. url: "/repos/:owner/:repo/issues/events/:event_id"
  10989. },
  10990. getLabel: {
  10991. method: "GET",
  10992. params: {
  10993. name: {
  10994. required: true,
  10995. type: "string"
  10996. },
  10997. owner: {
  10998. required: true,
  10999. type: "string"
  11000. },
  11001. repo: {
  11002. required: true,
  11003. type: "string"
  11004. }
  11005. },
  11006. url: "/repos/:owner/:repo/labels/:name"
  11007. },
  11008. getMilestone: {
  11009. method: "GET",
  11010. params: {
  11011. milestone_number: {
  11012. required: true,
  11013. type: "integer"
  11014. },
  11015. number: {
  11016. alias: "milestone_number",
  11017. deprecated: true,
  11018. type: "integer"
  11019. },
  11020. owner: {
  11021. required: true,
  11022. type: "string"
  11023. },
  11024. repo: {
  11025. required: true,
  11026. type: "string"
  11027. }
  11028. },
  11029. url: "/repos/:owner/:repo/milestones/:milestone_number"
  11030. },
  11031. list: {
  11032. method: "GET",
  11033. params: {
  11034. direction: {
  11035. enum: ["asc", "desc"],
  11036. type: "string"
  11037. },
  11038. filter: {
  11039. enum: ["assigned", "created", "mentioned", "subscribed", "all"],
  11040. type: "string"
  11041. },
  11042. labels: {
  11043. type: "string"
  11044. },
  11045. page: {
  11046. type: "integer"
  11047. },
  11048. per_page: {
  11049. type: "integer"
  11050. },
  11051. since: {
  11052. type: "string"
  11053. },
  11054. sort: {
  11055. enum: ["created", "updated", "comments"],
  11056. type: "string"
  11057. },
  11058. state: {
  11059. enum: ["open", "closed", "all"],
  11060. type: "string"
  11061. }
  11062. },
  11063. url: "/issues"
  11064. },
  11065. listAssignees: {
  11066. method: "GET",
  11067. params: {
  11068. owner: {
  11069. required: true,
  11070. type: "string"
  11071. },
  11072. page: {
  11073. type: "integer"
  11074. },
  11075. per_page: {
  11076. type: "integer"
  11077. },
  11078. repo: {
  11079. required: true,
  11080. type: "string"
  11081. }
  11082. },
  11083. url: "/repos/:owner/:repo/assignees"
  11084. },
  11085. listComments: {
  11086. method: "GET",
  11087. params: {
  11088. issue_number: {
  11089. required: true,
  11090. type: "integer"
  11091. },
  11092. number: {
  11093. alias: "issue_number",
  11094. deprecated: true,
  11095. type: "integer"
  11096. },
  11097. owner: {
  11098. required: true,
  11099. type: "string"
  11100. },
  11101. page: {
  11102. type: "integer"
  11103. },
  11104. per_page: {
  11105. type: "integer"
  11106. },
  11107. repo: {
  11108. required: true,
  11109. type: "string"
  11110. },
  11111. since: {
  11112. type: "string"
  11113. }
  11114. },
  11115. url: "/repos/:owner/:repo/issues/:issue_number/comments"
  11116. },
  11117. listCommentsForRepo: {
  11118. method: "GET",
  11119. params: {
  11120. direction: {
  11121. enum: ["asc", "desc"],
  11122. type: "string"
  11123. },
  11124. owner: {
  11125. required: true,
  11126. type: "string"
  11127. },
  11128. repo: {
  11129. required: true,
  11130. type: "string"
  11131. },
  11132. since: {
  11133. type: "string"
  11134. },
  11135. sort: {
  11136. enum: ["created", "updated"],
  11137. type: "string"
  11138. }
  11139. },
  11140. url: "/repos/:owner/:repo/issues/comments"
  11141. },
  11142. listEvents: {
  11143. method: "GET",
  11144. params: {
  11145. issue_number: {
  11146. required: true,
  11147. type: "integer"
  11148. },
  11149. number: {
  11150. alias: "issue_number",
  11151. deprecated: true,
  11152. type: "integer"
  11153. },
  11154. owner: {
  11155. required: true,
  11156. type: "string"
  11157. },
  11158. page: {
  11159. type: "integer"
  11160. },
  11161. per_page: {
  11162. type: "integer"
  11163. },
  11164. repo: {
  11165. required: true,
  11166. type: "string"
  11167. }
  11168. },
  11169. url: "/repos/:owner/:repo/issues/:issue_number/events"
  11170. },
  11171. listEventsForRepo: {
  11172. method: "GET",
  11173. params: {
  11174. owner: {
  11175. required: true,
  11176. type: "string"
  11177. },
  11178. page: {
  11179. type: "integer"
  11180. },
  11181. per_page: {
  11182. type: "integer"
  11183. },
  11184. repo: {
  11185. required: true,
  11186. type: "string"
  11187. }
  11188. },
  11189. url: "/repos/:owner/:repo/issues/events"
  11190. },
  11191. listEventsForTimeline: {
  11192. headers: {
  11193. accept: "application/vnd.github.mockingbird-preview+json"
  11194. },
  11195. method: "GET",
  11196. params: {
  11197. issue_number: {
  11198. required: true,
  11199. type: "integer"
  11200. },
  11201. number: {
  11202. alias: "issue_number",
  11203. deprecated: true,
  11204. type: "integer"
  11205. },
  11206. owner: {
  11207. required: true,
  11208. type: "string"
  11209. },
  11210. page: {
  11211. type: "integer"
  11212. },
  11213. per_page: {
  11214. type: "integer"
  11215. },
  11216. repo: {
  11217. required: true,
  11218. type: "string"
  11219. }
  11220. },
  11221. url: "/repos/:owner/:repo/issues/:issue_number/timeline"
  11222. },
  11223. listForAuthenticatedUser: {
  11224. method: "GET",
  11225. params: {
  11226. direction: {
  11227. enum: ["asc", "desc"],
  11228. type: "string"
  11229. },
  11230. filter: {
  11231. enum: ["assigned", "created", "mentioned", "subscribed", "all"],
  11232. type: "string"
  11233. },
  11234. labels: {
  11235. type: "string"
  11236. },
  11237. page: {
  11238. type: "integer"
  11239. },
  11240. per_page: {
  11241. type: "integer"
  11242. },
  11243. since: {
  11244. type: "string"
  11245. },
  11246. sort: {
  11247. enum: ["created", "updated", "comments"],
  11248. type: "string"
  11249. },
  11250. state: {
  11251. enum: ["open", "closed", "all"],
  11252. type: "string"
  11253. }
  11254. },
  11255. url: "/user/issues"
  11256. },
  11257. listForOrg: {
  11258. method: "GET",
  11259. params: {
  11260. direction: {
  11261. enum: ["asc", "desc"],
  11262. type: "string"
  11263. },
  11264. filter: {
  11265. enum: ["assigned", "created", "mentioned", "subscribed", "all"],
  11266. type: "string"
  11267. },
  11268. labels: {
  11269. type: "string"
  11270. },
  11271. org: {
  11272. required: true,
  11273. type: "string"
  11274. },
  11275. page: {
  11276. type: "integer"
  11277. },
  11278. per_page: {
  11279. type: "integer"
  11280. },
  11281. since: {
  11282. type: "string"
  11283. },
  11284. sort: {
  11285. enum: ["created", "updated", "comments"],
  11286. type: "string"
  11287. },
  11288. state: {
  11289. enum: ["open", "closed", "all"],
  11290. type: "string"
  11291. }
  11292. },
  11293. url: "/orgs/:org/issues"
  11294. },
  11295. listForRepo: {
  11296. method: "GET",
  11297. params: {
  11298. assignee: {
  11299. type: "string"
  11300. },
  11301. creator: {
  11302. type: "string"
  11303. },
  11304. direction: {
  11305. enum: ["asc", "desc"],
  11306. type: "string"
  11307. },
  11308. labels: {
  11309. type: "string"
  11310. },
  11311. mentioned: {
  11312. type: "string"
  11313. },
  11314. milestone: {
  11315. type: "string"
  11316. },
  11317. owner: {
  11318. required: true,
  11319. type: "string"
  11320. },
  11321. page: {
  11322. type: "integer"
  11323. },
  11324. per_page: {
  11325. type: "integer"
  11326. },
  11327. repo: {
  11328. required: true,
  11329. type: "string"
  11330. },
  11331. since: {
  11332. type: "string"
  11333. },
  11334. sort: {
  11335. enum: ["created", "updated", "comments"],
  11336. type: "string"
  11337. },
  11338. state: {
  11339. enum: ["open", "closed", "all"],
  11340. type: "string"
  11341. }
  11342. },
  11343. url: "/repos/:owner/:repo/issues"
  11344. },
  11345. listLabelsForMilestone: {
  11346. method: "GET",
  11347. params: {
  11348. milestone_number: {
  11349. required: true,
  11350. type: "integer"
  11351. },
  11352. number: {
  11353. alias: "milestone_number",
  11354. deprecated: true,
  11355. type: "integer"
  11356. },
  11357. owner: {
  11358. required: true,
  11359. type: "string"
  11360. },
  11361. page: {
  11362. type: "integer"
  11363. },
  11364. per_page: {
  11365. type: "integer"
  11366. },
  11367. repo: {
  11368. required: true,
  11369. type: "string"
  11370. }
  11371. },
  11372. url: "/repos/:owner/:repo/milestones/:milestone_number/labels"
  11373. },
  11374. listLabelsForRepo: {
  11375. method: "GET",
  11376. params: {
  11377. owner: {
  11378. required: true,
  11379. type: "string"
  11380. },
  11381. page: {
  11382. type: "integer"
  11383. },
  11384. per_page: {
  11385. type: "integer"
  11386. },
  11387. repo: {
  11388. required: true,
  11389. type: "string"
  11390. }
  11391. },
  11392. url: "/repos/:owner/:repo/labels"
  11393. },
  11394. listLabelsOnIssue: {
  11395. method: "GET",
  11396. params: {
  11397. issue_number: {
  11398. required: true,
  11399. type: "integer"
  11400. },
  11401. number: {
  11402. alias: "issue_number",
  11403. deprecated: true,
  11404. type: "integer"
  11405. },
  11406. owner: {
  11407. required: true,
  11408. type: "string"
  11409. },
  11410. page: {
  11411. type: "integer"
  11412. },
  11413. per_page: {
  11414. type: "integer"
  11415. },
  11416. repo: {
  11417. required: true,
  11418. type: "string"
  11419. }
  11420. },
  11421. url: "/repos/:owner/:repo/issues/:issue_number/labels"
  11422. },
  11423. listMilestonesForRepo: {
  11424. method: "GET",
  11425. params: {
  11426. direction: {
  11427. enum: ["asc", "desc"],
  11428. type: "string"
  11429. },
  11430. owner: {
  11431. required: true,
  11432. type: "string"
  11433. },
  11434. page: {
  11435. type: "integer"
  11436. },
  11437. per_page: {
  11438. type: "integer"
  11439. },
  11440. repo: {
  11441. required: true,
  11442. type: "string"
  11443. },
  11444. sort: {
  11445. enum: ["due_on", "completeness"],
  11446. type: "string"
  11447. },
  11448. state: {
  11449. enum: ["open", "closed", "all"],
  11450. type: "string"
  11451. }
  11452. },
  11453. url: "/repos/:owner/:repo/milestones"
  11454. },
  11455. lock: {
  11456. method: "PUT",
  11457. params: {
  11458. issue_number: {
  11459. required: true,
  11460. type: "integer"
  11461. },
  11462. lock_reason: {
  11463. enum: ["off-topic", "too heated", "resolved", "spam"],
  11464. type: "string"
  11465. },
  11466. number: {
  11467. alias: "issue_number",
  11468. deprecated: true,
  11469. type: "integer"
  11470. },
  11471. owner: {
  11472. required: true,
  11473. type: "string"
  11474. },
  11475. repo: {
  11476. required: true,
  11477. type: "string"
  11478. }
  11479. },
  11480. url: "/repos/:owner/:repo/issues/:issue_number/lock"
  11481. },
  11482. removeAssignees: {
  11483. method: "DELETE",
  11484. params: {
  11485. assignees: {
  11486. type: "string[]"
  11487. },
  11488. issue_number: {
  11489. required: true,
  11490. type: "integer"
  11491. },
  11492. number: {
  11493. alias: "issue_number",
  11494. deprecated: true,
  11495. type: "integer"
  11496. },
  11497. owner: {
  11498. required: true,
  11499. type: "string"
  11500. },
  11501. repo: {
  11502. required: true,
  11503. type: "string"
  11504. }
  11505. },
  11506. url: "/repos/:owner/:repo/issues/:issue_number/assignees"
  11507. },
  11508. removeLabel: {
  11509. method: "DELETE",
  11510. params: {
  11511. issue_number: {
  11512. required: true,
  11513. type: "integer"
  11514. },
  11515. name: {
  11516. required: true,
  11517. type: "string"
  11518. },
  11519. number: {
  11520. alias: "issue_number",
  11521. deprecated: true,
  11522. type: "integer"
  11523. },
  11524. owner: {
  11525. required: true,
  11526. type: "string"
  11527. },
  11528. repo: {
  11529. required: true,
  11530. type: "string"
  11531. }
  11532. },
  11533. url: "/repos/:owner/:repo/issues/:issue_number/labels/:name"
  11534. },
  11535. removeLabels: {
  11536. method: "DELETE",
  11537. params: {
  11538. issue_number: {
  11539. required: true,
  11540. type: "integer"
  11541. },
  11542. number: {
  11543. alias: "issue_number",
  11544. deprecated: true,
  11545. type: "integer"
  11546. },
  11547. owner: {
  11548. required: true,
  11549. type: "string"
  11550. },
  11551. repo: {
  11552. required: true,
  11553. type: "string"
  11554. }
  11555. },
  11556. url: "/repos/:owner/:repo/issues/:issue_number/labels"
  11557. },
  11558. replaceLabels: {
  11559. method: "PUT",
  11560. params: {
  11561. issue_number: {
  11562. required: true,
  11563. type: "integer"
  11564. },
  11565. labels: {
  11566. type: "string[]"
  11567. },
  11568. number: {
  11569. alias: "issue_number",
  11570. deprecated: true,
  11571. type: "integer"
  11572. },
  11573. owner: {
  11574. required: true,
  11575. type: "string"
  11576. },
  11577. repo: {
  11578. required: true,
  11579. type: "string"
  11580. }
  11581. },
  11582. url: "/repos/:owner/:repo/issues/:issue_number/labels"
  11583. },
  11584. unlock: {
  11585. method: "DELETE",
  11586. params: {
  11587. issue_number: {
  11588. required: true,
  11589. type: "integer"
  11590. },
  11591. number: {
  11592. alias: "issue_number",
  11593. deprecated: true,
  11594. type: "integer"
  11595. },
  11596. owner: {
  11597. required: true,
  11598. type: "string"
  11599. },
  11600. repo: {
  11601. required: true,
  11602. type: "string"
  11603. }
  11604. },
  11605. url: "/repos/:owner/:repo/issues/:issue_number/lock"
  11606. },
  11607. update: {
  11608. method: "PATCH",
  11609. params: {
  11610. assignee: {
  11611. type: "string"
  11612. },
  11613. assignees: {
  11614. type: "string[]"
  11615. },
  11616. body: {
  11617. type: "string"
  11618. },
  11619. issue_number: {
  11620. required: true,
  11621. type: "integer"
  11622. },
  11623. labels: {
  11624. type: "string[]"
  11625. },
  11626. milestone: {
  11627. allowNull: true,
  11628. type: "integer"
  11629. },
  11630. number: {
  11631. alias: "issue_number",
  11632. deprecated: true,
  11633. type: "integer"
  11634. },
  11635. owner: {
  11636. required: true,
  11637. type: "string"
  11638. },
  11639. repo: {
  11640. required: true,
  11641. type: "string"
  11642. },
  11643. state: {
  11644. enum: ["open", "closed"],
  11645. type: "string"
  11646. },
  11647. title: {
  11648. type: "string"
  11649. }
  11650. },
  11651. url: "/repos/:owner/:repo/issues/:issue_number"
  11652. },
  11653. updateComment: {
  11654. method: "PATCH",
  11655. params: {
  11656. body: {
  11657. required: true,
  11658. type: "string"
  11659. },
  11660. comment_id: {
  11661. required: true,
  11662. type: "integer"
  11663. },
  11664. owner: {
  11665. required: true,
  11666. type: "string"
  11667. },
  11668. repo: {
  11669. required: true,
  11670. type: "string"
  11671. }
  11672. },
  11673. url: "/repos/:owner/:repo/issues/comments/:comment_id"
  11674. },
  11675. updateLabel: {
  11676. method: "PATCH",
  11677. params: {
  11678. color: {
  11679. type: "string"
  11680. },
  11681. current_name: {
  11682. required: true,
  11683. type: "string"
  11684. },
  11685. description: {
  11686. type: "string"
  11687. },
  11688. name: {
  11689. type: "string"
  11690. },
  11691. owner: {
  11692. required: true,
  11693. type: "string"
  11694. },
  11695. repo: {
  11696. required: true,
  11697. type: "string"
  11698. }
  11699. },
  11700. url: "/repos/:owner/:repo/labels/:current_name"
  11701. },
  11702. updateMilestone: {
  11703. method: "PATCH",
  11704. params: {
  11705. description: {
  11706. type: "string"
  11707. },
  11708. due_on: {
  11709. type: "string"
  11710. },
  11711. milestone_number: {
  11712. required: true,
  11713. type: "integer"
  11714. },
  11715. number: {
  11716. alias: "milestone_number",
  11717. deprecated: true,
  11718. type: "integer"
  11719. },
  11720. owner: {
  11721. required: true,
  11722. type: "string"
  11723. },
  11724. repo: {
  11725. required: true,
  11726. type: "string"
  11727. },
  11728. state: {
  11729. enum: ["open", "closed"],
  11730. type: "string"
  11731. },
  11732. title: {
  11733. type: "string"
  11734. }
  11735. },
  11736. url: "/repos/:owner/:repo/milestones/:milestone_number"
  11737. }
  11738. },
  11739. licenses: {
  11740. get: {
  11741. method: "GET",
  11742. params: {
  11743. license: {
  11744. required: true,
  11745. type: "string"
  11746. }
  11747. },
  11748. url: "/licenses/:license"
  11749. },
  11750. getForRepo: {
  11751. method: "GET",
  11752. params: {
  11753. owner: {
  11754. required: true,
  11755. type: "string"
  11756. },
  11757. repo: {
  11758. required: true,
  11759. type: "string"
  11760. }
  11761. },
  11762. url: "/repos/:owner/:repo/license"
  11763. },
  11764. list: {
  11765. deprecated: "octokit.licenses.list() has been renamed to octokit.licenses.listCommonlyUsed() (2019-03-05)",
  11766. method: "GET",
  11767. params: {},
  11768. url: "/licenses"
  11769. },
  11770. listCommonlyUsed: {
  11771. method: "GET",
  11772. params: {},
  11773. url: "/licenses"
  11774. }
  11775. },
  11776. markdown: {
  11777. render: {
  11778. method: "POST",
  11779. params: {
  11780. context: {
  11781. type: "string"
  11782. },
  11783. mode: {
  11784. enum: ["markdown", "gfm"],
  11785. type: "string"
  11786. },
  11787. text: {
  11788. required: true,
  11789. type: "string"
  11790. }
  11791. },
  11792. url: "/markdown"
  11793. },
  11794. renderRaw: {
  11795. headers: {
  11796. "content-type": "text/plain; charset=utf-8"
  11797. },
  11798. method: "POST",
  11799. params: {
  11800. data: {
  11801. mapTo: "data",
  11802. required: true,
  11803. type: "string"
  11804. }
  11805. },
  11806. url: "/markdown/raw"
  11807. }
  11808. },
  11809. meta: {
  11810. get: {
  11811. method: "GET",
  11812. params: {},
  11813. url: "/meta"
  11814. }
  11815. },
  11816. migrations: {
  11817. cancelImport: {
  11818. method: "DELETE",
  11819. params: {
  11820. owner: {
  11821. required: true,
  11822. type: "string"
  11823. },
  11824. repo: {
  11825. required: true,
  11826. type: "string"
  11827. }
  11828. },
  11829. url: "/repos/:owner/:repo/import"
  11830. },
  11831. deleteArchiveForAuthenticatedUser: {
  11832. headers: {
  11833. accept: "application/vnd.github.wyandotte-preview+json"
  11834. },
  11835. method: "DELETE",
  11836. params: {
  11837. migration_id: {
  11838. required: true,
  11839. type: "integer"
  11840. }
  11841. },
  11842. url: "/user/migrations/:migration_id/archive"
  11843. },
  11844. deleteArchiveForOrg: {
  11845. headers: {
  11846. accept: "application/vnd.github.wyandotte-preview+json"
  11847. },
  11848. method: "DELETE",
  11849. params: {
  11850. migration_id: {
  11851. required: true,
  11852. type: "integer"
  11853. },
  11854. org: {
  11855. required: true,
  11856. type: "string"
  11857. }
  11858. },
  11859. url: "/orgs/:org/migrations/:migration_id/archive"
  11860. },
  11861. downloadArchiveForOrg: {
  11862. headers: {
  11863. accept: "application/vnd.github.wyandotte-preview+json"
  11864. },
  11865. method: "GET",
  11866. params: {
  11867. migration_id: {
  11868. required: true,
  11869. type: "integer"
  11870. },
  11871. org: {
  11872. required: true,
  11873. type: "string"
  11874. }
  11875. },
  11876. url: "/orgs/:org/migrations/:migration_id/archive"
  11877. },
  11878. getArchiveForAuthenticatedUser: {
  11879. headers: {
  11880. accept: "application/vnd.github.wyandotte-preview+json"
  11881. },
  11882. method: "GET",
  11883. params: {
  11884. migration_id: {
  11885. required: true,
  11886. type: "integer"
  11887. }
  11888. },
  11889. url: "/user/migrations/:migration_id/archive"
  11890. },
  11891. getArchiveForOrg: {
  11892. deprecated: "octokit.migrations.getArchiveForOrg() has been renamed to octokit.migrations.downloadArchiveForOrg() (2020-01-27)",
  11893. headers: {
  11894. accept: "application/vnd.github.wyandotte-preview+json"
  11895. },
  11896. method: "GET",
  11897. params: {
  11898. migration_id: {
  11899. required: true,
  11900. type: "integer"
  11901. },
  11902. org: {
  11903. required: true,
  11904. type: "string"
  11905. }
  11906. },
  11907. url: "/orgs/:org/migrations/:migration_id/archive"
  11908. },
  11909. getCommitAuthors: {
  11910. method: "GET",
  11911. params: {
  11912. owner: {
  11913. required: true,
  11914. type: "string"
  11915. },
  11916. repo: {
  11917. required: true,
  11918. type: "string"
  11919. },
  11920. since: {
  11921. type: "string"
  11922. }
  11923. },
  11924. url: "/repos/:owner/:repo/import/authors"
  11925. },
  11926. getImportProgress: {
  11927. method: "GET",
  11928. params: {
  11929. owner: {
  11930. required: true,
  11931. type: "string"
  11932. },
  11933. repo: {
  11934. required: true,
  11935. type: "string"
  11936. }
  11937. },
  11938. url: "/repos/:owner/:repo/import"
  11939. },
  11940. getLargeFiles: {
  11941. method: "GET",
  11942. params: {
  11943. owner: {
  11944. required: true,
  11945. type: "string"
  11946. },
  11947. repo: {
  11948. required: true,
  11949. type: "string"
  11950. }
  11951. },
  11952. url: "/repos/:owner/:repo/import/large_files"
  11953. },
  11954. getStatusForAuthenticatedUser: {
  11955. headers: {
  11956. accept: "application/vnd.github.wyandotte-preview+json"
  11957. },
  11958. method: "GET",
  11959. params: {
  11960. migration_id: {
  11961. required: true,
  11962. type: "integer"
  11963. }
  11964. },
  11965. url: "/user/migrations/:migration_id"
  11966. },
  11967. getStatusForOrg: {
  11968. headers: {
  11969. accept: "application/vnd.github.wyandotte-preview+json"
  11970. },
  11971. method: "GET",
  11972. params: {
  11973. migration_id: {
  11974. required: true,
  11975. type: "integer"
  11976. },
  11977. org: {
  11978. required: true,
  11979. type: "string"
  11980. }
  11981. },
  11982. url: "/orgs/:org/migrations/:migration_id"
  11983. },
  11984. listForAuthenticatedUser: {
  11985. headers: {
  11986. accept: "application/vnd.github.wyandotte-preview+json"
  11987. },
  11988. method: "GET",
  11989. params: {
  11990. page: {
  11991. type: "integer"
  11992. },
  11993. per_page: {
  11994. type: "integer"
  11995. }
  11996. },
  11997. url: "/user/migrations"
  11998. },
  11999. listForOrg: {
  12000. headers: {
  12001. accept: "application/vnd.github.wyandotte-preview+json"
  12002. },
  12003. method: "GET",
  12004. params: {
  12005. org: {
  12006. required: true,
  12007. type: "string"
  12008. },
  12009. page: {
  12010. type: "integer"
  12011. },
  12012. per_page: {
  12013. type: "integer"
  12014. }
  12015. },
  12016. url: "/orgs/:org/migrations"
  12017. },
  12018. listReposForOrg: {
  12019. headers: {
  12020. accept: "application/vnd.github.wyandotte-preview+json"
  12021. },
  12022. method: "GET",
  12023. params: {
  12024. migration_id: {
  12025. required: true,
  12026. type: "integer"
  12027. },
  12028. org: {
  12029. required: true,
  12030. type: "string"
  12031. },
  12032. page: {
  12033. type: "integer"
  12034. },
  12035. per_page: {
  12036. type: "integer"
  12037. }
  12038. },
  12039. url: "/orgs/:org/migrations/:migration_id/repositories"
  12040. },
  12041. listReposForUser: {
  12042. headers: {
  12043. accept: "application/vnd.github.wyandotte-preview+json"
  12044. },
  12045. method: "GET",
  12046. params: {
  12047. migration_id: {
  12048. required: true,
  12049. type: "integer"
  12050. },
  12051. page: {
  12052. type: "integer"
  12053. },
  12054. per_page: {
  12055. type: "integer"
  12056. }
  12057. },
  12058. url: "/user/:migration_id/repositories"
  12059. },
  12060. mapCommitAuthor: {
  12061. method: "PATCH",
  12062. params: {
  12063. author_id: {
  12064. required: true,
  12065. type: "integer"
  12066. },
  12067. email: {
  12068. type: "string"
  12069. },
  12070. name: {
  12071. type: "string"
  12072. },
  12073. owner: {
  12074. required: true,
  12075. type: "string"
  12076. },
  12077. repo: {
  12078. required: true,
  12079. type: "string"
  12080. }
  12081. },
  12082. url: "/repos/:owner/:repo/import/authors/:author_id"
  12083. },
  12084. setLfsPreference: {
  12085. method: "PATCH",
  12086. params: {
  12087. owner: {
  12088. required: true,
  12089. type: "string"
  12090. },
  12091. repo: {
  12092. required: true,
  12093. type: "string"
  12094. },
  12095. use_lfs: {
  12096. enum: ["opt_in", "opt_out"],
  12097. required: true,
  12098. type: "string"
  12099. }
  12100. },
  12101. url: "/repos/:owner/:repo/import/lfs"
  12102. },
  12103. startForAuthenticatedUser: {
  12104. method: "POST",
  12105. params: {
  12106. exclude_attachments: {
  12107. type: "boolean"
  12108. },
  12109. lock_repositories: {
  12110. type: "boolean"
  12111. },
  12112. repositories: {
  12113. required: true,
  12114. type: "string[]"
  12115. }
  12116. },
  12117. url: "/user/migrations"
  12118. },
  12119. startForOrg: {
  12120. method: "POST",
  12121. params: {
  12122. exclude_attachments: {
  12123. type: "boolean"
  12124. },
  12125. lock_repositories: {
  12126. type: "boolean"
  12127. },
  12128. org: {
  12129. required: true,
  12130. type: "string"
  12131. },
  12132. repositories: {
  12133. required: true,
  12134. type: "string[]"
  12135. }
  12136. },
  12137. url: "/orgs/:org/migrations"
  12138. },
  12139. startImport: {
  12140. method: "PUT",
  12141. params: {
  12142. owner: {
  12143. required: true,
  12144. type: "string"
  12145. },
  12146. repo: {
  12147. required: true,
  12148. type: "string"
  12149. },
  12150. tfvc_project: {
  12151. type: "string"
  12152. },
  12153. vcs: {
  12154. enum: ["subversion", "git", "mercurial", "tfvc"],
  12155. type: "string"
  12156. },
  12157. vcs_password: {
  12158. type: "string"
  12159. },
  12160. vcs_url: {
  12161. required: true,
  12162. type: "string"
  12163. },
  12164. vcs_username: {
  12165. type: "string"
  12166. }
  12167. },
  12168. url: "/repos/:owner/:repo/import"
  12169. },
  12170. unlockRepoForAuthenticatedUser: {
  12171. headers: {
  12172. accept: "application/vnd.github.wyandotte-preview+json"
  12173. },
  12174. method: "DELETE",
  12175. params: {
  12176. migration_id: {
  12177. required: true,
  12178. type: "integer"
  12179. },
  12180. repo_name: {
  12181. required: true,
  12182. type: "string"
  12183. }
  12184. },
  12185. url: "/user/migrations/:migration_id/repos/:repo_name/lock"
  12186. },
  12187. unlockRepoForOrg: {
  12188. headers: {
  12189. accept: "application/vnd.github.wyandotte-preview+json"
  12190. },
  12191. method: "DELETE",
  12192. params: {
  12193. migration_id: {
  12194. required: true,
  12195. type: "integer"
  12196. },
  12197. org: {
  12198. required: true,
  12199. type: "string"
  12200. },
  12201. repo_name: {
  12202. required: true,
  12203. type: "string"
  12204. }
  12205. },
  12206. url: "/orgs/:org/migrations/:migration_id/repos/:repo_name/lock"
  12207. },
  12208. updateImport: {
  12209. method: "PATCH",
  12210. params: {
  12211. owner: {
  12212. required: true,
  12213. type: "string"
  12214. },
  12215. repo: {
  12216. required: true,
  12217. type: "string"
  12218. },
  12219. vcs_password: {
  12220. type: "string"
  12221. },
  12222. vcs_username: {
  12223. type: "string"
  12224. }
  12225. },
  12226. url: "/repos/:owner/:repo/import"
  12227. }
  12228. },
  12229. oauthAuthorizations: {
  12230. checkAuthorization: {
  12231. deprecated: "octokit.oauthAuthorizations.checkAuthorization() has been renamed to octokit.apps.checkAuthorization() (2019-11-05)",
  12232. method: "GET",
  12233. params: {
  12234. access_token: {
  12235. required: true,
  12236. type: "string"
  12237. },
  12238. client_id: {
  12239. required: true,
  12240. type: "string"
  12241. }
  12242. },
  12243. url: "/applications/:client_id/tokens/:access_token"
  12244. },
  12245. createAuthorization: {
  12246. deprecated: "octokit.oauthAuthorizations.createAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#create-a-new-authorization",
  12247. method: "POST",
  12248. params: {
  12249. client_id: {
  12250. type: "string"
  12251. },
  12252. client_secret: {
  12253. type: "string"
  12254. },
  12255. fingerprint: {
  12256. type: "string"
  12257. },
  12258. note: {
  12259. required: true,
  12260. type: "string"
  12261. },
  12262. note_url: {
  12263. type: "string"
  12264. },
  12265. scopes: {
  12266. type: "string[]"
  12267. }
  12268. },
  12269. url: "/authorizations"
  12270. },
  12271. deleteAuthorization: {
  12272. deprecated: "octokit.oauthAuthorizations.deleteAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-an-authorization",
  12273. method: "DELETE",
  12274. params: {
  12275. authorization_id: {
  12276. required: true,
  12277. type: "integer"
  12278. }
  12279. },
  12280. url: "/authorizations/:authorization_id"
  12281. },
  12282. deleteGrant: {
  12283. deprecated: "octokit.oauthAuthorizations.deleteGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#delete-a-grant",
  12284. method: "DELETE",
  12285. params: {
  12286. grant_id: {
  12287. required: true,
  12288. type: "integer"
  12289. }
  12290. },
  12291. url: "/applications/grants/:grant_id"
  12292. },
  12293. getAuthorization: {
  12294. deprecated: "octokit.oauthAuthorizations.getAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-authorization",
  12295. method: "GET",
  12296. params: {
  12297. authorization_id: {
  12298. required: true,
  12299. type: "integer"
  12300. }
  12301. },
  12302. url: "/authorizations/:authorization_id"
  12303. },
  12304. getGrant: {
  12305. deprecated: "octokit.oauthAuthorizations.getGrant() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-a-single-grant",
  12306. method: "GET",
  12307. params: {
  12308. grant_id: {
  12309. required: true,
  12310. type: "integer"
  12311. }
  12312. },
  12313. url: "/applications/grants/:grant_id"
  12314. },
  12315. getOrCreateAuthorizationForApp: {
  12316. deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForApp() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app",
  12317. method: "PUT",
  12318. params: {
  12319. client_id: {
  12320. required: true,
  12321. type: "string"
  12322. },
  12323. client_secret: {
  12324. required: true,
  12325. type: "string"
  12326. },
  12327. fingerprint: {
  12328. type: "string"
  12329. },
  12330. note: {
  12331. type: "string"
  12332. },
  12333. note_url: {
  12334. type: "string"
  12335. },
  12336. scopes: {
  12337. type: "string[]"
  12338. }
  12339. },
  12340. url: "/authorizations/clients/:client_id"
  12341. },
  12342. getOrCreateAuthorizationForAppAndFingerprint: {
  12343. deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app-and-fingerprint",
  12344. method: "PUT",
  12345. params: {
  12346. client_id: {
  12347. required: true,
  12348. type: "string"
  12349. },
  12350. client_secret: {
  12351. required: true,
  12352. type: "string"
  12353. },
  12354. fingerprint: {
  12355. required: true,
  12356. type: "string"
  12357. },
  12358. note: {
  12359. type: "string"
  12360. },
  12361. note_url: {
  12362. type: "string"
  12363. },
  12364. scopes: {
  12365. type: "string[]"
  12366. }
  12367. },
  12368. url: "/authorizations/clients/:client_id/:fingerprint"
  12369. },
  12370. getOrCreateAuthorizationForAppFingerprint: {
  12371. deprecated: "octokit.oauthAuthorizations.getOrCreateAuthorizationForAppFingerprint() has been renamed to octokit.oauthAuthorizations.getOrCreateAuthorizationForAppAndFingerprint() (2018-12-27)",
  12372. method: "PUT",
  12373. params: {
  12374. client_id: {
  12375. required: true,
  12376. type: "string"
  12377. },
  12378. client_secret: {
  12379. required: true,
  12380. type: "string"
  12381. },
  12382. fingerprint: {
  12383. required: true,
  12384. type: "string"
  12385. },
  12386. note: {
  12387. type: "string"
  12388. },
  12389. note_url: {
  12390. type: "string"
  12391. },
  12392. scopes: {
  12393. type: "string[]"
  12394. }
  12395. },
  12396. url: "/authorizations/clients/:client_id/:fingerprint"
  12397. },
  12398. listAuthorizations: {
  12399. deprecated: "octokit.oauthAuthorizations.listAuthorizations() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-authorizations",
  12400. method: "GET",
  12401. params: {
  12402. page: {
  12403. type: "integer"
  12404. },
  12405. per_page: {
  12406. type: "integer"
  12407. }
  12408. },
  12409. url: "/authorizations"
  12410. },
  12411. listGrants: {
  12412. deprecated: "octokit.oauthAuthorizations.listGrants() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#list-your-grants",
  12413. method: "GET",
  12414. params: {
  12415. page: {
  12416. type: "integer"
  12417. },
  12418. per_page: {
  12419. type: "integer"
  12420. }
  12421. },
  12422. url: "/applications/grants"
  12423. },
  12424. resetAuthorization: {
  12425. deprecated: "octokit.oauthAuthorizations.resetAuthorization() has been renamed to octokit.apps.resetAuthorization() (2019-11-05)",
  12426. method: "POST",
  12427. params: {
  12428. access_token: {
  12429. required: true,
  12430. type: "string"
  12431. },
  12432. client_id: {
  12433. required: true,
  12434. type: "string"
  12435. }
  12436. },
  12437. url: "/applications/:client_id/tokens/:access_token"
  12438. },
  12439. revokeAuthorizationForApplication: {
  12440. deprecated: "octokit.oauthAuthorizations.revokeAuthorizationForApplication() has been renamed to octokit.apps.revokeAuthorizationForApplication() (2019-11-05)",
  12441. method: "DELETE",
  12442. params: {
  12443. access_token: {
  12444. required: true,
  12445. type: "string"
  12446. },
  12447. client_id: {
  12448. required: true,
  12449. type: "string"
  12450. }
  12451. },
  12452. url: "/applications/:client_id/tokens/:access_token"
  12453. },
  12454. revokeGrantForApplication: {
  12455. deprecated: "octokit.oauthAuthorizations.revokeGrantForApplication() has been renamed to octokit.apps.revokeGrantForApplication() (2019-11-05)",
  12456. method: "DELETE",
  12457. params: {
  12458. access_token: {
  12459. required: true,
  12460. type: "string"
  12461. },
  12462. client_id: {
  12463. required: true,
  12464. type: "string"
  12465. }
  12466. },
  12467. url: "/applications/:client_id/grants/:access_token"
  12468. },
  12469. updateAuthorization: {
  12470. deprecated: "octokit.oauthAuthorizations.updateAuthorization() is deprecated, see https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization",
  12471. method: "PATCH",
  12472. params: {
  12473. add_scopes: {
  12474. type: "string[]"
  12475. },
  12476. authorization_id: {
  12477. required: true,
  12478. type: "integer"
  12479. },
  12480. fingerprint: {
  12481. type: "string"
  12482. },
  12483. note: {
  12484. type: "string"
  12485. },
  12486. note_url: {
  12487. type: "string"
  12488. },
  12489. remove_scopes: {
  12490. type: "string[]"
  12491. },
  12492. scopes: {
  12493. type: "string[]"
  12494. }
  12495. },
  12496. url: "/authorizations/:authorization_id"
  12497. }
  12498. },
  12499. orgs: {
  12500. addOrUpdateMembership: {
  12501. method: "PUT",
  12502. params: {
  12503. org: {
  12504. required: true,
  12505. type: "string"
  12506. },
  12507. role: {
  12508. enum: ["admin", "member"],
  12509. type: "string"
  12510. },
  12511. username: {
  12512. required: true,
  12513. type: "string"
  12514. }
  12515. },
  12516. url: "/orgs/:org/memberships/:username"
  12517. },
  12518. blockUser: {
  12519. method: "PUT",
  12520. params: {
  12521. org: {
  12522. required: true,
  12523. type: "string"
  12524. },
  12525. username: {
  12526. required: true,
  12527. type: "string"
  12528. }
  12529. },
  12530. url: "/orgs/:org/blocks/:username"
  12531. },
  12532. checkBlockedUser: {
  12533. method: "GET",
  12534. params: {
  12535. org: {
  12536. required: true,
  12537. type: "string"
  12538. },
  12539. username: {
  12540. required: true,
  12541. type: "string"
  12542. }
  12543. },
  12544. url: "/orgs/:org/blocks/:username"
  12545. },
  12546. checkMembership: {
  12547. method: "GET",
  12548. params: {
  12549. org: {
  12550. required: true,
  12551. type: "string"
  12552. },
  12553. username: {
  12554. required: true,
  12555. type: "string"
  12556. }
  12557. },
  12558. url: "/orgs/:org/members/:username"
  12559. },
  12560. checkPublicMembership: {
  12561. method: "GET",
  12562. params: {
  12563. org: {
  12564. required: true,
  12565. type: "string"
  12566. },
  12567. username: {
  12568. required: true,
  12569. type: "string"
  12570. }
  12571. },
  12572. url: "/orgs/:org/public_members/:username"
  12573. },
  12574. concealMembership: {
  12575. method: "DELETE",
  12576. params: {
  12577. org: {
  12578. required: true,
  12579. type: "string"
  12580. },
  12581. username: {
  12582. required: true,
  12583. type: "string"
  12584. }
  12585. },
  12586. url: "/orgs/:org/public_members/:username"
  12587. },
  12588. convertMemberToOutsideCollaborator: {
  12589. method: "PUT",
  12590. params: {
  12591. org: {
  12592. required: true,
  12593. type: "string"
  12594. },
  12595. username: {
  12596. required: true,
  12597. type: "string"
  12598. }
  12599. },
  12600. url: "/orgs/:org/outside_collaborators/:username"
  12601. },
  12602. createHook: {
  12603. method: "POST",
  12604. params: {
  12605. active: {
  12606. type: "boolean"
  12607. },
  12608. config: {
  12609. required: true,
  12610. type: "object"
  12611. },
  12612. "config.content_type": {
  12613. type: "string"
  12614. },
  12615. "config.insecure_ssl": {
  12616. type: "string"
  12617. },
  12618. "config.secret": {
  12619. type: "string"
  12620. },
  12621. "config.url": {
  12622. required: true,
  12623. type: "string"
  12624. },
  12625. events: {
  12626. type: "string[]"
  12627. },
  12628. name: {
  12629. required: true,
  12630. type: "string"
  12631. },
  12632. org: {
  12633. required: true,
  12634. type: "string"
  12635. }
  12636. },
  12637. url: "/orgs/:org/hooks"
  12638. },
  12639. createInvitation: {
  12640. method: "POST",
  12641. params: {
  12642. email: {
  12643. type: "string"
  12644. },
  12645. invitee_id: {
  12646. type: "integer"
  12647. },
  12648. org: {
  12649. required: true,
  12650. type: "string"
  12651. },
  12652. role: {
  12653. enum: ["admin", "direct_member", "billing_manager"],
  12654. type: "string"
  12655. },
  12656. team_ids: {
  12657. type: "integer[]"
  12658. }
  12659. },
  12660. url: "/orgs/:org/invitations"
  12661. },
  12662. deleteHook: {
  12663. method: "DELETE",
  12664. params: {
  12665. hook_id: {
  12666. required: true,
  12667. type: "integer"
  12668. },
  12669. org: {
  12670. required: true,
  12671. type: "string"
  12672. }
  12673. },
  12674. url: "/orgs/:org/hooks/:hook_id"
  12675. },
  12676. get: {
  12677. method: "GET",
  12678. params: {
  12679. org: {
  12680. required: true,
  12681. type: "string"
  12682. }
  12683. },
  12684. url: "/orgs/:org"
  12685. },
  12686. getHook: {
  12687. method: "GET",
  12688. params: {
  12689. hook_id: {
  12690. required: true,
  12691. type: "integer"
  12692. },
  12693. org: {
  12694. required: true,
  12695. type: "string"
  12696. }
  12697. },
  12698. url: "/orgs/:org/hooks/:hook_id"
  12699. },
  12700. getMembership: {
  12701. method: "GET",
  12702. params: {
  12703. org: {
  12704. required: true,
  12705. type: "string"
  12706. },
  12707. username: {
  12708. required: true,
  12709. type: "string"
  12710. }
  12711. },
  12712. url: "/orgs/:org/memberships/:username"
  12713. },
  12714. getMembershipForAuthenticatedUser: {
  12715. method: "GET",
  12716. params: {
  12717. org: {
  12718. required: true,
  12719. type: "string"
  12720. }
  12721. },
  12722. url: "/user/memberships/orgs/:org"
  12723. },
  12724. list: {
  12725. method: "GET",
  12726. params: {
  12727. page: {
  12728. type: "integer"
  12729. },
  12730. per_page: {
  12731. type: "integer"
  12732. },
  12733. since: {
  12734. type: "integer"
  12735. }
  12736. },
  12737. url: "/organizations"
  12738. },
  12739. listBlockedUsers: {
  12740. method: "GET",
  12741. params: {
  12742. org: {
  12743. required: true,
  12744. type: "string"
  12745. }
  12746. },
  12747. url: "/orgs/:org/blocks"
  12748. },
  12749. listForAuthenticatedUser: {
  12750. method: "GET",
  12751. params: {
  12752. page: {
  12753. type: "integer"
  12754. },
  12755. per_page: {
  12756. type: "integer"
  12757. }
  12758. },
  12759. url: "/user/orgs"
  12760. },
  12761. listForUser: {
  12762. method: "GET",
  12763. params: {
  12764. page: {
  12765. type: "integer"
  12766. },
  12767. per_page: {
  12768. type: "integer"
  12769. },
  12770. username: {
  12771. required: true,
  12772. type: "string"
  12773. }
  12774. },
  12775. url: "/users/:username/orgs"
  12776. },
  12777. listHooks: {
  12778. method: "GET",
  12779. params: {
  12780. org: {
  12781. required: true,
  12782. type: "string"
  12783. },
  12784. page: {
  12785. type: "integer"
  12786. },
  12787. per_page: {
  12788. type: "integer"
  12789. }
  12790. },
  12791. url: "/orgs/:org/hooks"
  12792. },
  12793. listInstallations: {
  12794. headers: {
  12795. accept: "application/vnd.github.machine-man-preview+json"
  12796. },
  12797. method: "GET",
  12798. params: {
  12799. org: {
  12800. required: true,
  12801. type: "string"
  12802. },
  12803. page: {
  12804. type: "integer"
  12805. },
  12806. per_page: {
  12807. type: "integer"
  12808. }
  12809. },
  12810. url: "/orgs/:org/installations"
  12811. },
  12812. listInvitationTeams: {
  12813. method: "GET",
  12814. params: {
  12815. invitation_id: {
  12816. required: true,
  12817. type: "integer"
  12818. },
  12819. org: {
  12820. required: true,
  12821. type: "string"
  12822. },
  12823. page: {
  12824. type: "integer"
  12825. },
  12826. per_page: {
  12827. type: "integer"
  12828. }
  12829. },
  12830. url: "/orgs/:org/invitations/:invitation_id/teams"
  12831. },
  12832. listMembers: {
  12833. method: "GET",
  12834. params: {
  12835. filter: {
  12836. enum: ["2fa_disabled", "all"],
  12837. type: "string"
  12838. },
  12839. org: {
  12840. required: true,
  12841. type: "string"
  12842. },
  12843. page: {
  12844. type: "integer"
  12845. },
  12846. per_page: {
  12847. type: "integer"
  12848. },
  12849. role: {
  12850. enum: ["all", "admin", "member"],
  12851. type: "string"
  12852. }
  12853. },
  12854. url: "/orgs/:org/members"
  12855. },
  12856. listMemberships: {
  12857. method: "GET",
  12858. params: {
  12859. page: {
  12860. type: "integer"
  12861. },
  12862. per_page: {
  12863. type: "integer"
  12864. },
  12865. state: {
  12866. enum: ["active", "pending"],
  12867. type: "string"
  12868. }
  12869. },
  12870. url: "/user/memberships/orgs"
  12871. },
  12872. listOutsideCollaborators: {
  12873. method: "GET",
  12874. params: {
  12875. filter: {
  12876. enum: ["2fa_disabled", "all"],
  12877. type: "string"
  12878. },
  12879. org: {
  12880. required: true,
  12881. type: "string"
  12882. },
  12883. page: {
  12884. type: "integer"
  12885. },
  12886. per_page: {
  12887. type: "integer"
  12888. }
  12889. },
  12890. url: "/orgs/:org/outside_collaborators"
  12891. },
  12892. listPendingInvitations: {
  12893. method: "GET",
  12894. params: {
  12895. org: {
  12896. required: true,
  12897. type: "string"
  12898. },
  12899. page: {
  12900. type: "integer"
  12901. },
  12902. per_page: {
  12903. type: "integer"
  12904. }
  12905. },
  12906. url: "/orgs/:org/invitations"
  12907. },
  12908. listPublicMembers: {
  12909. method: "GET",
  12910. params: {
  12911. org: {
  12912. required: true,
  12913. type: "string"
  12914. },
  12915. page: {
  12916. type: "integer"
  12917. },
  12918. per_page: {
  12919. type: "integer"
  12920. }
  12921. },
  12922. url: "/orgs/:org/public_members"
  12923. },
  12924. pingHook: {
  12925. method: "POST",
  12926. params: {
  12927. hook_id: {
  12928. required: true,
  12929. type: "integer"
  12930. },
  12931. org: {
  12932. required: true,
  12933. type: "string"
  12934. }
  12935. },
  12936. url: "/orgs/:org/hooks/:hook_id/pings"
  12937. },
  12938. publicizeMembership: {
  12939. method: "PUT",
  12940. params: {
  12941. org: {
  12942. required: true,
  12943. type: "string"
  12944. },
  12945. username: {
  12946. required: true,
  12947. type: "string"
  12948. }
  12949. },
  12950. url: "/orgs/:org/public_members/:username"
  12951. },
  12952. removeMember: {
  12953. method: "DELETE",
  12954. params: {
  12955. org: {
  12956. required: true,
  12957. type: "string"
  12958. },
  12959. username: {
  12960. required: true,
  12961. type: "string"
  12962. }
  12963. },
  12964. url: "/orgs/:org/members/:username"
  12965. },
  12966. removeMembership: {
  12967. method: "DELETE",
  12968. params: {
  12969. org: {
  12970. required: true,
  12971. type: "string"
  12972. },
  12973. username: {
  12974. required: true,
  12975. type: "string"
  12976. }
  12977. },
  12978. url: "/orgs/:org/memberships/:username"
  12979. },
  12980. removeOutsideCollaborator: {
  12981. method: "DELETE",
  12982. params: {
  12983. org: {
  12984. required: true,
  12985. type: "string"
  12986. },
  12987. username: {
  12988. required: true,
  12989. type: "string"
  12990. }
  12991. },
  12992. url: "/orgs/:org/outside_collaborators/:username"
  12993. },
  12994. unblockUser: {
  12995. method: "DELETE",
  12996. params: {
  12997. org: {
  12998. required: true,
  12999. type: "string"
  13000. },
  13001. username: {
  13002. required: true,
  13003. type: "string"
  13004. }
  13005. },
  13006. url: "/orgs/:org/blocks/:username"
  13007. },
  13008. update: {
  13009. method: "PATCH",
  13010. params: {
  13011. billing_email: {
  13012. type: "string"
  13013. },
  13014. company: {
  13015. type: "string"
  13016. },
  13017. default_repository_permission: {
  13018. enum: ["read", "write", "admin", "none"],
  13019. type: "string"
  13020. },
  13021. description: {
  13022. type: "string"
  13023. },
  13024. email: {
  13025. type: "string"
  13026. },
  13027. has_organization_projects: {
  13028. type: "boolean"
  13029. },
  13030. has_repository_projects: {
  13031. type: "boolean"
  13032. },
  13033. location: {
  13034. type: "string"
  13035. },
  13036. members_allowed_repository_creation_type: {
  13037. enum: ["all", "private", "none"],
  13038. type: "string"
  13039. },
  13040. members_can_create_internal_repositories: {
  13041. type: "boolean"
  13042. },
  13043. members_can_create_private_repositories: {
  13044. type: "boolean"
  13045. },
  13046. members_can_create_public_repositories: {
  13047. type: "boolean"
  13048. },
  13049. members_can_create_repositories: {
  13050. type: "boolean"
  13051. },
  13052. name: {
  13053. type: "string"
  13054. },
  13055. org: {
  13056. required: true,
  13057. type: "string"
  13058. }
  13059. },
  13060. url: "/orgs/:org"
  13061. },
  13062. updateHook: {
  13063. method: "PATCH",
  13064. params: {
  13065. active: {
  13066. type: "boolean"
  13067. },
  13068. config: {
  13069. type: "object"
  13070. },
  13071. "config.content_type": {
  13072. type: "string"
  13073. },
  13074. "config.insecure_ssl": {
  13075. type: "string"
  13076. },
  13077. "config.secret": {
  13078. type: "string"
  13079. },
  13080. "config.url": {
  13081. required: true,
  13082. type: "string"
  13083. },
  13084. events: {
  13085. type: "string[]"
  13086. },
  13087. hook_id: {
  13088. required: true,
  13089. type: "integer"
  13090. },
  13091. org: {
  13092. required: true,
  13093. type: "string"
  13094. }
  13095. },
  13096. url: "/orgs/:org/hooks/:hook_id"
  13097. },
  13098. updateMembership: {
  13099. method: "PATCH",
  13100. params: {
  13101. org: {
  13102. required: true,
  13103. type: "string"
  13104. },
  13105. state: {
  13106. enum: ["active"],
  13107. required: true,
  13108. type: "string"
  13109. }
  13110. },
  13111. url: "/user/memberships/orgs/:org"
  13112. }
  13113. },
  13114. projects: {
  13115. addCollaborator: {
  13116. headers: {
  13117. accept: "application/vnd.github.inertia-preview+json"
  13118. },
  13119. method: "PUT",
  13120. params: {
  13121. permission: {
  13122. enum: ["read", "write", "admin"],
  13123. type: "string"
  13124. },
  13125. project_id: {
  13126. required: true,
  13127. type: "integer"
  13128. },
  13129. username: {
  13130. required: true,
  13131. type: "string"
  13132. }
  13133. },
  13134. url: "/projects/:project_id/collaborators/:username"
  13135. },
  13136. createCard: {
  13137. headers: {
  13138. accept: "application/vnd.github.inertia-preview+json"
  13139. },
  13140. method: "POST",
  13141. params: {
  13142. column_id: {
  13143. required: true,
  13144. type: "integer"
  13145. },
  13146. content_id: {
  13147. type: "integer"
  13148. },
  13149. content_type: {
  13150. type: "string"
  13151. },
  13152. note: {
  13153. type: "string"
  13154. }
  13155. },
  13156. url: "/projects/columns/:column_id/cards"
  13157. },
  13158. createColumn: {
  13159. headers: {
  13160. accept: "application/vnd.github.inertia-preview+json"
  13161. },
  13162. method: "POST",
  13163. params: {
  13164. name: {
  13165. required: true,
  13166. type: "string"
  13167. },
  13168. project_id: {
  13169. required: true,
  13170. type: "integer"
  13171. }
  13172. },
  13173. url: "/projects/:project_id/columns"
  13174. },
  13175. createForAuthenticatedUser: {
  13176. headers: {
  13177. accept: "application/vnd.github.inertia-preview+json"
  13178. },
  13179. method: "POST",
  13180. params: {
  13181. body: {
  13182. type: "string"
  13183. },
  13184. name: {
  13185. required: true,
  13186. type: "string"
  13187. }
  13188. },
  13189. url: "/user/projects"
  13190. },
  13191. createForOrg: {
  13192. headers: {
  13193. accept: "application/vnd.github.inertia-preview+json"
  13194. },
  13195. method: "POST",
  13196. params: {
  13197. body: {
  13198. type: "string"
  13199. },
  13200. name: {
  13201. required: true,
  13202. type: "string"
  13203. },
  13204. org: {
  13205. required: true,
  13206. type: "string"
  13207. }
  13208. },
  13209. url: "/orgs/:org/projects"
  13210. },
  13211. createForRepo: {
  13212. headers: {
  13213. accept: "application/vnd.github.inertia-preview+json"
  13214. },
  13215. method: "POST",
  13216. params: {
  13217. body: {
  13218. type: "string"
  13219. },
  13220. name: {
  13221. required: true,
  13222. type: "string"
  13223. },
  13224. owner: {
  13225. required: true,
  13226. type: "string"
  13227. },
  13228. repo: {
  13229. required: true,
  13230. type: "string"
  13231. }
  13232. },
  13233. url: "/repos/:owner/:repo/projects"
  13234. },
  13235. delete: {
  13236. headers: {
  13237. accept: "application/vnd.github.inertia-preview+json"
  13238. },
  13239. method: "DELETE",
  13240. params: {
  13241. project_id: {
  13242. required: true,
  13243. type: "integer"
  13244. }
  13245. },
  13246. url: "/projects/:project_id"
  13247. },
  13248. deleteCard: {
  13249. headers: {
  13250. accept: "application/vnd.github.inertia-preview+json"
  13251. },
  13252. method: "DELETE",
  13253. params: {
  13254. card_id: {
  13255. required: true,
  13256. type: "integer"
  13257. }
  13258. },
  13259. url: "/projects/columns/cards/:card_id"
  13260. },
  13261. deleteColumn: {
  13262. headers: {
  13263. accept: "application/vnd.github.inertia-preview+json"
  13264. },
  13265. method: "DELETE",
  13266. params: {
  13267. column_id: {
  13268. required: true,
  13269. type: "integer"
  13270. }
  13271. },
  13272. url: "/projects/columns/:column_id"
  13273. },
  13274. get: {
  13275. headers: {
  13276. accept: "application/vnd.github.inertia-preview+json"
  13277. },
  13278. method: "GET",
  13279. params: {
  13280. project_id: {
  13281. required: true,
  13282. type: "integer"
  13283. }
  13284. },
  13285. url: "/projects/:project_id"
  13286. },
  13287. getCard: {
  13288. headers: {
  13289. accept: "application/vnd.github.inertia-preview+json"
  13290. },
  13291. method: "GET",
  13292. params: {
  13293. card_id: {
  13294. required: true,
  13295. type: "integer"
  13296. }
  13297. },
  13298. url: "/projects/columns/cards/:card_id"
  13299. },
  13300. getColumn: {
  13301. headers: {
  13302. accept: "application/vnd.github.inertia-preview+json"
  13303. },
  13304. method: "GET",
  13305. params: {
  13306. column_id: {
  13307. required: true,
  13308. type: "integer"
  13309. }
  13310. },
  13311. url: "/projects/columns/:column_id"
  13312. },
  13313. listCards: {
  13314. headers: {
  13315. accept: "application/vnd.github.inertia-preview+json"
  13316. },
  13317. method: "GET",
  13318. params: {
  13319. archived_state: {
  13320. enum: ["all", "archived", "not_archived"],
  13321. type: "string"
  13322. },
  13323. column_id: {
  13324. required: true,
  13325. type: "integer"
  13326. },
  13327. page: {
  13328. type: "integer"
  13329. },
  13330. per_page: {
  13331. type: "integer"
  13332. }
  13333. },
  13334. url: "/projects/columns/:column_id/cards"
  13335. },
  13336. listCollaborators: {
  13337. headers: {
  13338. accept: "application/vnd.github.inertia-preview+json"
  13339. },
  13340. method: "GET",
  13341. params: {
  13342. affiliation: {
  13343. enum: ["outside", "direct", "all"],
  13344. type: "string"
  13345. },
  13346. page: {
  13347. type: "integer"
  13348. },
  13349. per_page: {
  13350. type: "integer"
  13351. },
  13352. project_id: {
  13353. required: true,
  13354. type: "integer"
  13355. }
  13356. },
  13357. url: "/projects/:project_id/collaborators"
  13358. },
  13359. listColumns: {
  13360. headers: {
  13361. accept: "application/vnd.github.inertia-preview+json"
  13362. },
  13363. method: "GET",
  13364. params: {
  13365. page: {
  13366. type: "integer"
  13367. },
  13368. per_page: {
  13369. type: "integer"
  13370. },
  13371. project_id: {
  13372. required: true,
  13373. type: "integer"
  13374. }
  13375. },
  13376. url: "/projects/:project_id/columns"
  13377. },
  13378. listForOrg: {
  13379. headers: {
  13380. accept: "application/vnd.github.inertia-preview+json"
  13381. },
  13382. method: "GET",
  13383. params: {
  13384. org: {
  13385. required: true,
  13386. type: "string"
  13387. },
  13388. page: {
  13389. type: "integer"
  13390. },
  13391. per_page: {
  13392. type: "integer"
  13393. },
  13394. state: {
  13395. enum: ["open", "closed", "all"],
  13396. type: "string"
  13397. }
  13398. },
  13399. url: "/orgs/:org/projects"
  13400. },
  13401. listForRepo: {
  13402. headers: {
  13403. accept: "application/vnd.github.inertia-preview+json"
  13404. },
  13405. method: "GET",
  13406. params: {
  13407. owner: {
  13408. required: true,
  13409. type: "string"
  13410. },
  13411. page: {
  13412. type: "integer"
  13413. },
  13414. per_page: {
  13415. type: "integer"
  13416. },
  13417. repo: {
  13418. required: true,
  13419. type: "string"
  13420. },
  13421. state: {
  13422. enum: ["open", "closed", "all"],
  13423. type: "string"
  13424. }
  13425. },
  13426. url: "/repos/:owner/:repo/projects"
  13427. },
  13428. listForUser: {
  13429. headers: {
  13430. accept: "application/vnd.github.inertia-preview+json"
  13431. },
  13432. method: "GET",
  13433. params: {
  13434. page: {
  13435. type: "integer"
  13436. },
  13437. per_page: {
  13438. type: "integer"
  13439. },
  13440. state: {
  13441. enum: ["open", "closed", "all"],
  13442. type: "string"
  13443. },
  13444. username: {
  13445. required: true,
  13446. type: "string"
  13447. }
  13448. },
  13449. url: "/users/:username/projects"
  13450. },
  13451. moveCard: {
  13452. headers: {
  13453. accept: "application/vnd.github.inertia-preview+json"
  13454. },
  13455. method: "POST",
  13456. params: {
  13457. card_id: {
  13458. required: true,
  13459. type: "integer"
  13460. },
  13461. column_id: {
  13462. type: "integer"
  13463. },
  13464. position: {
  13465. required: true,
  13466. type: "string",
  13467. validation: "^(top|bottom|after:\\d+)$"
  13468. }
  13469. },
  13470. url: "/projects/columns/cards/:card_id/moves"
  13471. },
  13472. moveColumn: {
  13473. headers: {
  13474. accept: "application/vnd.github.inertia-preview+json"
  13475. },
  13476. method: "POST",
  13477. params: {
  13478. column_id: {
  13479. required: true,
  13480. type: "integer"
  13481. },
  13482. position: {
  13483. required: true,
  13484. type: "string",
  13485. validation: "^(first|last|after:\\d+)$"
  13486. }
  13487. },
  13488. url: "/projects/columns/:column_id/moves"
  13489. },
  13490. removeCollaborator: {
  13491. headers: {
  13492. accept: "application/vnd.github.inertia-preview+json"
  13493. },
  13494. method: "DELETE",
  13495. params: {
  13496. project_id: {
  13497. required: true,
  13498. type: "integer"
  13499. },
  13500. username: {
  13501. required: true,
  13502. type: "string"
  13503. }
  13504. },
  13505. url: "/projects/:project_id/collaborators/:username"
  13506. },
  13507. reviewUserPermissionLevel: {
  13508. headers: {
  13509. accept: "application/vnd.github.inertia-preview+json"
  13510. },
  13511. method: "GET",
  13512. params: {
  13513. project_id: {
  13514. required: true,
  13515. type: "integer"
  13516. },
  13517. username: {
  13518. required: true,
  13519. type: "string"
  13520. }
  13521. },
  13522. url: "/projects/:project_id/collaborators/:username/permission"
  13523. },
  13524. update: {
  13525. headers: {
  13526. accept: "application/vnd.github.inertia-preview+json"
  13527. },
  13528. method: "PATCH",
  13529. params: {
  13530. body: {
  13531. type: "string"
  13532. },
  13533. name: {
  13534. type: "string"
  13535. },
  13536. organization_permission: {
  13537. type: "string"
  13538. },
  13539. private: {
  13540. type: "boolean"
  13541. },
  13542. project_id: {
  13543. required: true,
  13544. type: "integer"
  13545. },
  13546. state: {
  13547. enum: ["open", "closed"],
  13548. type: "string"
  13549. }
  13550. },
  13551. url: "/projects/:project_id"
  13552. },
  13553. updateCard: {
  13554. headers: {
  13555. accept: "application/vnd.github.inertia-preview+json"
  13556. },
  13557. method: "PATCH",
  13558. params: {
  13559. archived: {
  13560. type: "boolean"
  13561. },
  13562. card_id: {
  13563. required: true,
  13564. type: "integer"
  13565. },
  13566. note: {
  13567. type: "string"
  13568. }
  13569. },
  13570. url: "/projects/columns/cards/:card_id"
  13571. },
  13572. updateColumn: {
  13573. headers: {
  13574. accept: "application/vnd.github.inertia-preview+json"
  13575. },
  13576. method: "PATCH",
  13577. params: {
  13578. column_id: {
  13579. required: true,
  13580. type: "integer"
  13581. },
  13582. name: {
  13583. required: true,
  13584. type: "string"
  13585. }
  13586. },
  13587. url: "/projects/columns/:column_id"
  13588. }
  13589. },
  13590. pulls: {
  13591. checkIfMerged: {
  13592. method: "GET",
  13593. params: {
  13594. number: {
  13595. alias: "pull_number",
  13596. deprecated: true,
  13597. type: "integer"
  13598. },
  13599. owner: {
  13600. required: true,
  13601. type: "string"
  13602. },
  13603. pull_number: {
  13604. required: true,
  13605. type: "integer"
  13606. },
  13607. repo: {
  13608. required: true,
  13609. type: "string"
  13610. }
  13611. },
  13612. url: "/repos/:owner/:repo/pulls/:pull_number/merge"
  13613. },
  13614. create: {
  13615. method: "POST",
  13616. params: {
  13617. base: {
  13618. required: true,
  13619. type: "string"
  13620. },
  13621. body: {
  13622. type: "string"
  13623. },
  13624. draft: {
  13625. type: "boolean"
  13626. },
  13627. head: {
  13628. required: true,
  13629. type: "string"
  13630. },
  13631. maintainer_can_modify: {
  13632. type: "boolean"
  13633. },
  13634. owner: {
  13635. required: true,
  13636. type: "string"
  13637. },
  13638. repo: {
  13639. required: true,
  13640. type: "string"
  13641. },
  13642. title: {
  13643. required: true,
  13644. type: "string"
  13645. }
  13646. },
  13647. url: "/repos/:owner/:repo/pulls"
  13648. },
  13649. createComment: {
  13650. method: "POST",
  13651. params: {
  13652. body: {
  13653. required: true,
  13654. type: "string"
  13655. },
  13656. commit_id: {
  13657. required: true,
  13658. type: "string"
  13659. },
  13660. in_reply_to: {
  13661. deprecated: true,
  13662. description: "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.",
  13663. type: "integer"
  13664. },
  13665. line: {
  13666. type: "integer"
  13667. },
  13668. number: {
  13669. alias: "pull_number",
  13670. deprecated: true,
  13671. type: "integer"
  13672. },
  13673. owner: {
  13674. required: true,
  13675. type: "string"
  13676. },
  13677. path: {
  13678. required: true,
  13679. type: "string"
  13680. },
  13681. position: {
  13682. type: "integer"
  13683. },
  13684. pull_number: {
  13685. required: true,
  13686. type: "integer"
  13687. },
  13688. repo: {
  13689. required: true,
  13690. type: "string"
  13691. },
  13692. side: {
  13693. enum: ["LEFT", "RIGHT"],
  13694. type: "string"
  13695. },
  13696. start_line: {
  13697. type: "integer"
  13698. },
  13699. start_side: {
  13700. enum: ["LEFT", "RIGHT", "side"],
  13701. type: "string"
  13702. }
  13703. },
  13704. url: "/repos/:owner/:repo/pulls/:pull_number/comments"
  13705. },
  13706. createCommentReply: {
  13707. deprecated: "octokit.pulls.createCommentReply() has been renamed to octokit.pulls.createComment() (2019-09-09)",
  13708. method: "POST",
  13709. params: {
  13710. body: {
  13711. required: true,
  13712. type: "string"
  13713. },
  13714. commit_id: {
  13715. required: true,
  13716. type: "string"
  13717. },
  13718. in_reply_to: {
  13719. deprecated: true,
  13720. description: "The comment ID to reply to. **Note**: This must be the ID of a top-level comment, not a reply to that comment. Replies to replies are not supported.",
  13721. type: "integer"
  13722. },
  13723. line: {
  13724. type: "integer"
  13725. },
  13726. number: {
  13727. alias: "pull_number",
  13728. deprecated: true,
  13729. type: "integer"
  13730. },
  13731. owner: {
  13732. required: true,
  13733. type: "string"
  13734. },
  13735. path: {
  13736. required: true,
  13737. type: "string"
  13738. },
  13739. position: {
  13740. type: "integer"
  13741. },
  13742. pull_number: {
  13743. required: true,
  13744. type: "integer"
  13745. },
  13746. repo: {
  13747. required: true,
  13748. type: "string"
  13749. },
  13750. side: {
  13751. enum: ["LEFT", "RIGHT"],
  13752. type: "string"
  13753. },
  13754. start_line: {
  13755. type: "integer"
  13756. },
  13757. start_side: {
  13758. enum: ["LEFT", "RIGHT", "side"],
  13759. type: "string"
  13760. }
  13761. },
  13762. url: "/repos/:owner/:repo/pulls/:pull_number/comments"
  13763. },
  13764. createFromIssue: {
  13765. deprecated: "octokit.pulls.createFromIssue() is deprecated, see https://developer.github.com/v3/pulls/#create-a-pull-request",
  13766. method: "POST",
  13767. params: {
  13768. base: {
  13769. required: true,
  13770. type: "string"
  13771. },
  13772. draft: {
  13773. type: "boolean"
  13774. },
  13775. head: {
  13776. required: true,
  13777. type: "string"
  13778. },
  13779. issue: {
  13780. required: true,
  13781. type: "integer"
  13782. },
  13783. maintainer_can_modify: {
  13784. type: "boolean"
  13785. },
  13786. owner: {
  13787. required: true,
  13788. type: "string"
  13789. },
  13790. repo: {
  13791. required: true,
  13792. type: "string"
  13793. }
  13794. },
  13795. url: "/repos/:owner/:repo/pulls"
  13796. },
  13797. createReview: {
  13798. method: "POST",
  13799. params: {
  13800. body: {
  13801. type: "string"
  13802. },
  13803. comments: {
  13804. type: "object[]"
  13805. },
  13806. "comments[].body": {
  13807. required: true,
  13808. type: "string"
  13809. },
  13810. "comments[].path": {
  13811. required: true,
  13812. type: "string"
  13813. },
  13814. "comments[].position": {
  13815. required: true,
  13816. type: "integer"
  13817. },
  13818. commit_id: {
  13819. type: "string"
  13820. },
  13821. event: {
  13822. enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"],
  13823. type: "string"
  13824. },
  13825. number: {
  13826. alias: "pull_number",
  13827. deprecated: true,
  13828. type: "integer"
  13829. },
  13830. owner: {
  13831. required: true,
  13832. type: "string"
  13833. },
  13834. pull_number: {
  13835. required: true,
  13836. type: "integer"
  13837. },
  13838. repo: {
  13839. required: true,
  13840. type: "string"
  13841. }
  13842. },
  13843. url: "/repos/:owner/:repo/pulls/:pull_number/reviews"
  13844. },
  13845. createReviewCommentReply: {
  13846. method: "POST",
  13847. params: {
  13848. body: {
  13849. required: true,
  13850. type: "string"
  13851. },
  13852. comment_id: {
  13853. required: true,
  13854. type: "integer"
  13855. },
  13856. owner: {
  13857. required: true,
  13858. type: "string"
  13859. },
  13860. pull_number: {
  13861. required: true,
  13862. type: "integer"
  13863. },
  13864. repo: {
  13865. required: true,
  13866. type: "string"
  13867. }
  13868. },
  13869. url: "/repos/:owner/:repo/pulls/:pull_number/comments/:comment_id/replies"
  13870. },
  13871. createReviewRequest: {
  13872. method: "POST",
  13873. params: {
  13874. number: {
  13875. alias: "pull_number",
  13876. deprecated: true,
  13877. type: "integer"
  13878. },
  13879. owner: {
  13880. required: true,
  13881. type: "string"
  13882. },
  13883. pull_number: {
  13884. required: true,
  13885. type: "integer"
  13886. },
  13887. repo: {
  13888. required: true,
  13889. type: "string"
  13890. },
  13891. reviewers: {
  13892. type: "string[]"
  13893. },
  13894. team_reviewers: {
  13895. type: "string[]"
  13896. }
  13897. },
  13898. url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers"
  13899. },
  13900. deleteComment: {
  13901. method: "DELETE",
  13902. params: {
  13903. comment_id: {
  13904. required: true,
  13905. type: "integer"
  13906. },
  13907. owner: {
  13908. required: true,
  13909. type: "string"
  13910. },
  13911. repo: {
  13912. required: true,
  13913. type: "string"
  13914. }
  13915. },
  13916. url: "/repos/:owner/:repo/pulls/comments/:comment_id"
  13917. },
  13918. deletePendingReview: {
  13919. method: "DELETE",
  13920. params: {
  13921. number: {
  13922. alias: "pull_number",
  13923. deprecated: true,
  13924. type: "integer"
  13925. },
  13926. owner: {
  13927. required: true,
  13928. type: "string"
  13929. },
  13930. pull_number: {
  13931. required: true,
  13932. type: "integer"
  13933. },
  13934. repo: {
  13935. required: true,
  13936. type: "string"
  13937. },
  13938. review_id: {
  13939. required: true,
  13940. type: "integer"
  13941. }
  13942. },
  13943. url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id"
  13944. },
  13945. deleteReviewRequest: {
  13946. method: "DELETE",
  13947. params: {
  13948. number: {
  13949. alias: "pull_number",
  13950. deprecated: true,
  13951. type: "integer"
  13952. },
  13953. owner: {
  13954. required: true,
  13955. type: "string"
  13956. },
  13957. pull_number: {
  13958. required: true,
  13959. type: "integer"
  13960. },
  13961. repo: {
  13962. required: true,
  13963. type: "string"
  13964. },
  13965. reviewers: {
  13966. type: "string[]"
  13967. },
  13968. team_reviewers: {
  13969. type: "string[]"
  13970. }
  13971. },
  13972. url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers"
  13973. },
  13974. dismissReview: {
  13975. method: "PUT",
  13976. params: {
  13977. message: {
  13978. required: true,
  13979. type: "string"
  13980. },
  13981. number: {
  13982. alias: "pull_number",
  13983. deprecated: true,
  13984. type: "integer"
  13985. },
  13986. owner: {
  13987. required: true,
  13988. type: "string"
  13989. },
  13990. pull_number: {
  13991. required: true,
  13992. type: "integer"
  13993. },
  13994. repo: {
  13995. required: true,
  13996. type: "string"
  13997. },
  13998. review_id: {
  13999. required: true,
  14000. type: "integer"
  14001. }
  14002. },
  14003. url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/dismissals"
  14004. },
  14005. get: {
  14006. method: "GET",
  14007. params: {
  14008. number: {
  14009. alias: "pull_number",
  14010. deprecated: true,
  14011. type: "integer"
  14012. },
  14013. owner: {
  14014. required: true,
  14015. type: "string"
  14016. },
  14017. pull_number: {
  14018. required: true,
  14019. type: "integer"
  14020. },
  14021. repo: {
  14022. required: true,
  14023. type: "string"
  14024. }
  14025. },
  14026. url: "/repos/:owner/:repo/pulls/:pull_number"
  14027. },
  14028. getComment: {
  14029. method: "GET",
  14030. params: {
  14031. comment_id: {
  14032. required: true,
  14033. type: "integer"
  14034. },
  14035. owner: {
  14036. required: true,
  14037. type: "string"
  14038. },
  14039. repo: {
  14040. required: true,
  14041. type: "string"
  14042. }
  14043. },
  14044. url: "/repos/:owner/:repo/pulls/comments/:comment_id"
  14045. },
  14046. getCommentsForReview: {
  14047. method: "GET",
  14048. params: {
  14049. number: {
  14050. alias: "pull_number",
  14051. deprecated: true,
  14052. type: "integer"
  14053. },
  14054. owner: {
  14055. required: true,
  14056. type: "string"
  14057. },
  14058. page: {
  14059. type: "integer"
  14060. },
  14061. per_page: {
  14062. type: "integer"
  14063. },
  14064. pull_number: {
  14065. required: true,
  14066. type: "integer"
  14067. },
  14068. repo: {
  14069. required: true,
  14070. type: "string"
  14071. },
  14072. review_id: {
  14073. required: true,
  14074. type: "integer"
  14075. }
  14076. },
  14077. url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/comments"
  14078. },
  14079. getReview: {
  14080. method: "GET",
  14081. params: {
  14082. number: {
  14083. alias: "pull_number",
  14084. deprecated: true,
  14085. type: "integer"
  14086. },
  14087. owner: {
  14088. required: true,
  14089. type: "string"
  14090. },
  14091. pull_number: {
  14092. required: true,
  14093. type: "integer"
  14094. },
  14095. repo: {
  14096. required: true,
  14097. type: "string"
  14098. },
  14099. review_id: {
  14100. required: true,
  14101. type: "integer"
  14102. }
  14103. },
  14104. url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id"
  14105. },
  14106. list: {
  14107. method: "GET",
  14108. params: {
  14109. base: {
  14110. type: "string"
  14111. },
  14112. direction: {
  14113. enum: ["asc", "desc"],
  14114. type: "string"
  14115. },
  14116. head: {
  14117. type: "string"
  14118. },
  14119. owner: {
  14120. required: true,
  14121. type: "string"
  14122. },
  14123. page: {
  14124. type: "integer"
  14125. },
  14126. per_page: {
  14127. type: "integer"
  14128. },
  14129. repo: {
  14130. required: true,
  14131. type: "string"
  14132. },
  14133. sort: {
  14134. enum: ["created", "updated", "popularity", "long-running"],
  14135. type: "string"
  14136. },
  14137. state: {
  14138. enum: ["open", "closed", "all"],
  14139. type: "string"
  14140. }
  14141. },
  14142. url: "/repos/:owner/:repo/pulls"
  14143. },
  14144. listComments: {
  14145. method: "GET",
  14146. params: {
  14147. direction: {
  14148. enum: ["asc", "desc"],
  14149. type: "string"
  14150. },
  14151. number: {
  14152. alias: "pull_number",
  14153. deprecated: true,
  14154. type: "integer"
  14155. },
  14156. owner: {
  14157. required: true,
  14158. type: "string"
  14159. },
  14160. page: {
  14161. type: "integer"
  14162. },
  14163. per_page: {
  14164. type: "integer"
  14165. },
  14166. pull_number: {
  14167. required: true,
  14168. type: "integer"
  14169. },
  14170. repo: {
  14171. required: true,
  14172. type: "string"
  14173. },
  14174. since: {
  14175. type: "string"
  14176. },
  14177. sort: {
  14178. enum: ["created", "updated"],
  14179. type: "string"
  14180. }
  14181. },
  14182. url: "/repos/:owner/:repo/pulls/:pull_number/comments"
  14183. },
  14184. listCommentsForRepo: {
  14185. method: "GET",
  14186. params: {
  14187. direction: {
  14188. enum: ["asc", "desc"],
  14189. type: "string"
  14190. },
  14191. owner: {
  14192. required: true,
  14193. type: "string"
  14194. },
  14195. page: {
  14196. type: "integer"
  14197. },
  14198. per_page: {
  14199. type: "integer"
  14200. },
  14201. repo: {
  14202. required: true,
  14203. type: "string"
  14204. },
  14205. since: {
  14206. type: "string"
  14207. },
  14208. sort: {
  14209. enum: ["created", "updated"],
  14210. type: "string"
  14211. }
  14212. },
  14213. url: "/repos/:owner/:repo/pulls/comments"
  14214. },
  14215. listCommits: {
  14216. method: "GET",
  14217. params: {
  14218. number: {
  14219. alias: "pull_number",
  14220. deprecated: true,
  14221. type: "integer"
  14222. },
  14223. owner: {
  14224. required: true,
  14225. type: "string"
  14226. },
  14227. page: {
  14228. type: "integer"
  14229. },
  14230. per_page: {
  14231. type: "integer"
  14232. },
  14233. pull_number: {
  14234. required: true,
  14235. type: "integer"
  14236. },
  14237. repo: {
  14238. required: true,
  14239. type: "string"
  14240. }
  14241. },
  14242. url: "/repos/:owner/:repo/pulls/:pull_number/commits"
  14243. },
  14244. listFiles: {
  14245. method: "GET",
  14246. params: {
  14247. number: {
  14248. alias: "pull_number",
  14249. deprecated: true,
  14250. type: "integer"
  14251. },
  14252. owner: {
  14253. required: true,
  14254. type: "string"
  14255. },
  14256. page: {
  14257. type: "integer"
  14258. },
  14259. per_page: {
  14260. type: "integer"
  14261. },
  14262. pull_number: {
  14263. required: true,
  14264. type: "integer"
  14265. },
  14266. repo: {
  14267. required: true,
  14268. type: "string"
  14269. }
  14270. },
  14271. url: "/repos/:owner/:repo/pulls/:pull_number/files"
  14272. },
  14273. listReviewRequests: {
  14274. method: "GET",
  14275. params: {
  14276. number: {
  14277. alias: "pull_number",
  14278. deprecated: true,
  14279. type: "integer"
  14280. },
  14281. owner: {
  14282. required: true,
  14283. type: "string"
  14284. },
  14285. page: {
  14286. type: "integer"
  14287. },
  14288. per_page: {
  14289. type: "integer"
  14290. },
  14291. pull_number: {
  14292. required: true,
  14293. type: "integer"
  14294. },
  14295. repo: {
  14296. required: true,
  14297. type: "string"
  14298. }
  14299. },
  14300. url: "/repos/:owner/:repo/pulls/:pull_number/requested_reviewers"
  14301. },
  14302. listReviews: {
  14303. method: "GET",
  14304. params: {
  14305. number: {
  14306. alias: "pull_number",
  14307. deprecated: true,
  14308. type: "integer"
  14309. },
  14310. owner: {
  14311. required: true,
  14312. type: "string"
  14313. },
  14314. page: {
  14315. type: "integer"
  14316. },
  14317. per_page: {
  14318. type: "integer"
  14319. },
  14320. pull_number: {
  14321. required: true,
  14322. type: "integer"
  14323. },
  14324. repo: {
  14325. required: true,
  14326. type: "string"
  14327. }
  14328. },
  14329. url: "/repos/:owner/:repo/pulls/:pull_number/reviews"
  14330. },
  14331. merge: {
  14332. method: "PUT",
  14333. params: {
  14334. commit_message: {
  14335. type: "string"
  14336. },
  14337. commit_title: {
  14338. type: "string"
  14339. },
  14340. merge_method: {
  14341. enum: ["merge", "squash", "rebase"],
  14342. type: "string"
  14343. },
  14344. number: {
  14345. alias: "pull_number",
  14346. deprecated: true,
  14347. type: "integer"
  14348. },
  14349. owner: {
  14350. required: true,
  14351. type: "string"
  14352. },
  14353. pull_number: {
  14354. required: true,
  14355. type: "integer"
  14356. },
  14357. repo: {
  14358. required: true,
  14359. type: "string"
  14360. },
  14361. sha: {
  14362. type: "string"
  14363. }
  14364. },
  14365. url: "/repos/:owner/:repo/pulls/:pull_number/merge"
  14366. },
  14367. submitReview: {
  14368. method: "POST",
  14369. params: {
  14370. body: {
  14371. type: "string"
  14372. },
  14373. event: {
  14374. enum: ["APPROVE", "REQUEST_CHANGES", "COMMENT"],
  14375. required: true,
  14376. type: "string"
  14377. },
  14378. number: {
  14379. alias: "pull_number",
  14380. deprecated: true,
  14381. type: "integer"
  14382. },
  14383. owner: {
  14384. required: true,
  14385. type: "string"
  14386. },
  14387. pull_number: {
  14388. required: true,
  14389. type: "integer"
  14390. },
  14391. repo: {
  14392. required: true,
  14393. type: "string"
  14394. },
  14395. review_id: {
  14396. required: true,
  14397. type: "integer"
  14398. }
  14399. },
  14400. url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id/events"
  14401. },
  14402. update: {
  14403. method: "PATCH",
  14404. params: {
  14405. base: {
  14406. type: "string"
  14407. },
  14408. body: {
  14409. type: "string"
  14410. },
  14411. maintainer_can_modify: {
  14412. type: "boolean"
  14413. },
  14414. number: {
  14415. alias: "pull_number",
  14416. deprecated: true,
  14417. type: "integer"
  14418. },
  14419. owner: {
  14420. required: true,
  14421. type: "string"
  14422. },
  14423. pull_number: {
  14424. required: true,
  14425. type: "integer"
  14426. },
  14427. repo: {
  14428. required: true,
  14429. type: "string"
  14430. },
  14431. state: {
  14432. enum: ["open", "closed"],
  14433. type: "string"
  14434. },
  14435. title: {
  14436. type: "string"
  14437. }
  14438. },
  14439. url: "/repos/:owner/:repo/pulls/:pull_number"
  14440. },
  14441. updateBranch: {
  14442. headers: {
  14443. accept: "application/vnd.github.lydian-preview+json"
  14444. },
  14445. method: "PUT",
  14446. params: {
  14447. expected_head_sha: {
  14448. type: "string"
  14449. },
  14450. owner: {
  14451. required: true,
  14452. type: "string"
  14453. },
  14454. pull_number: {
  14455. required: true,
  14456. type: "integer"
  14457. },
  14458. repo: {
  14459. required: true,
  14460. type: "string"
  14461. }
  14462. },
  14463. url: "/repos/:owner/:repo/pulls/:pull_number/update-branch"
  14464. },
  14465. updateComment: {
  14466. method: "PATCH",
  14467. params: {
  14468. body: {
  14469. required: true,
  14470. type: "string"
  14471. },
  14472. comment_id: {
  14473. required: true,
  14474. type: "integer"
  14475. },
  14476. owner: {
  14477. required: true,
  14478. type: "string"
  14479. },
  14480. repo: {
  14481. required: true,
  14482. type: "string"
  14483. }
  14484. },
  14485. url: "/repos/:owner/:repo/pulls/comments/:comment_id"
  14486. },
  14487. updateReview: {
  14488. method: "PUT",
  14489. params: {
  14490. body: {
  14491. required: true,
  14492. type: "string"
  14493. },
  14494. number: {
  14495. alias: "pull_number",
  14496. deprecated: true,
  14497. type: "integer"
  14498. },
  14499. owner: {
  14500. required: true,
  14501. type: "string"
  14502. },
  14503. pull_number: {
  14504. required: true,
  14505. type: "integer"
  14506. },
  14507. repo: {
  14508. required: true,
  14509. type: "string"
  14510. },
  14511. review_id: {
  14512. required: true,
  14513. type: "integer"
  14514. }
  14515. },
  14516. url: "/repos/:owner/:repo/pulls/:pull_number/reviews/:review_id"
  14517. }
  14518. },
  14519. rateLimit: {
  14520. get: {
  14521. method: "GET",
  14522. params: {},
  14523. url: "/rate_limit"
  14524. }
  14525. },
  14526. reactions: {
  14527. createForCommitComment: {
  14528. headers: {
  14529. accept: "application/vnd.github.squirrel-girl-preview+json"
  14530. },
  14531. method: "POST",
  14532. params: {
  14533. comment_id: {
  14534. required: true,
  14535. type: "integer"
  14536. },
  14537. content: {
  14538. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14539. required: true,
  14540. type: "string"
  14541. },
  14542. owner: {
  14543. required: true,
  14544. type: "string"
  14545. },
  14546. repo: {
  14547. required: true,
  14548. type: "string"
  14549. }
  14550. },
  14551. url: "/repos/:owner/:repo/comments/:comment_id/reactions"
  14552. },
  14553. createForIssue: {
  14554. headers: {
  14555. accept: "application/vnd.github.squirrel-girl-preview+json"
  14556. },
  14557. method: "POST",
  14558. params: {
  14559. content: {
  14560. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14561. required: true,
  14562. type: "string"
  14563. },
  14564. issue_number: {
  14565. required: true,
  14566. type: "integer"
  14567. },
  14568. number: {
  14569. alias: "issue_number",
  14570. deprecated: true,
  14571. type: "integer"
  14572. },
  14573. owner: {
  14574. required: true,
  14575. type: "string"
  14576. },
  14577. repo: {
  14578. required: true,
  14579. type: "string"
  14580. }
  14581. },
  14582. url: "/repos/:owner/:repo/issues/:issue_number/reactions"
  14583. },
  14584. createForIssueComment: {
  14585. headers: {
  14586. accept: "application/vnd.github.squirrel-girl-preview+json"
  14587. },
  14588. method: "POST",
  14589. params: {
  14590. comment_id: {
  14591. required: true,
  14592. type: "integer"
  14593. },
  14594. content: {
  14595. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14596. required: true,
  14597. type: "string"
  14598. },
  14599. owner: {
  14600. required: true,
  14601. type: "string"
  14602. },
  14603. repo: {
  14604. required: true,
  14605. type: "string"
  14606. }
  14607. },
  14608. url: "/repos/:owner/:repo/issues/comments/:comment_id/reactions"
  14609. },
  14610. createForPullRequestReviewComment: {
  14611. headers: {
  14612. accept: "application/vnd.github.squirrel-girl-preview+json"
  14613. },
  14614. method: "POST",
  14615. params: {
  14616. comment_id: {
  14617. required: true,
  14618. type: "integer"
  14619. },
  14620. content: {
  14621. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14622. required: true,
  14623. type: "string"
  14624. },
  14625. owner: {
  14626. required: true,
  14627. type: "string"
  14628. },
  14629. repo: {
  14630. required: true,
  14631. type: "string"
  14632. }
  14633. },
  14634. url: "/repos/:owner/:repo/pulls/comments/:comment_id/reactions"
  14635. },
  14636. createForTeamDiscussion: {
  14637. deprecated: "octokit.reactions.createForTeamDiscussion() has been renamed to octokit.reactions.createForTeamDiscussionLegacy() (2020-01-16)",
  14638. headers: {
  14639. accept: "application/vnd.github.squirrel-girl-preview+json"
  14640. },
  14641. method: "POST",
  14642. params: {
  14643. content: {
  14644. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14645. required: true,
  14646. type: "string"
  14647. },
  14648. discussion_number: {
  14649. required: true,
  14650. type: "integer"
  14651. },
  14652. team_id: {
  14653. required: true,
  14654. type: "integer"
  14655. }
  14656. },
  14657. url: "/teams/:team_id/discussions/:discussion_number/reactions"
  14658. },
  14659. createForTeamDiscussionComment: {
  14660. deprecated: "octokit.reactions.createForTeamDiscussionComment() has been renamed to octokit.reactions.createForTeamDiscussionCommentLegacy() (2020-01-16)",
  14661. headers: {
  14662. accept: "application/vnd.github.squirrel-girl-preview+json"
  14663. },
  14664. method: "POST",
  14665. params: {
  14666. comment_number: {
  14667. required: true,
  14668. type: "integer"
  14669. },
  14670. content: {
  14671. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14672. required: true,
  14673. type: "string"
  14674. },
  14675. discussion_number: {
  14676. required: true,
  14677. type: "integer"
  14678. },
  14679. team_id: {
  14680. required: true,
  14681. type: "integer"
  14682. }
  14683. },
  14684. url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions"
  14685. },
  14686. createForTeamDiscussionCommentInOrg: {
  14687. headers: {
  14688. accept: "application/vnd.github.squirrel-girl-preview+json"
  14689. },
  14690. method: "POST",
  14691. params: {
  14692. comment_number: {
  14693. required: true,
  14694. type: "integer"
  14695. },
  14696. content: {
  14697. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14698. required: true,
  14699. type: "string"
  14700. },
  14701. discussion_number: {
  14702. required: true,
  14703. type: "integer"
  14704. },
  14705. org: {
  14706. required: true,
  14707. type: "string"
  14708. },
  14709. team_slug: {
  14710. required: true,
  14711. type: "string"
  14712. }
  14713. },
  14714. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions"
  14715. },
  14716. createForTeamDiscussionCommentLegacy: {
  14717. deprecated: "octokit.reactions.createForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-comment-legacy",
  14718. headers: {
  14719. accept: "application/vnd.github.squirrel-girl-preview+json"
  14720. },
  14721. method: "POST",
  14722. params: {
  14723. comment_number: {
  14724. required: true,
  14725. type: "integer"
  14726. },
  14727. content: {
  14728. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14729. required: true,
  14730. type: "string"
  14731. },
  14732. discussion_number: {
  14733. required: true,
  14734. type: "integer"
  14735. },
  14736. team_id: {
  14737. required: true,
  14738. type: "integer"
  14739. }
  14740. },
  14741. url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions"
  14742. },
  14743. createForTeamDiscussionInOrg: {
  14744. headers: {
  14745. accept: "application/vnd.github.squirrel-girl-preview+json"
  14746. },
  14747. method: "POST",
  14748. params: {
  14749. content: {
  14750. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14751. required: true,
  14752. type: "string"
  14753. },
  14754. discussion_number: {
  14755. required: true,
  14756. type: "integer"
  14757. },
  14758. org: {
  14759. required: true,
  14760. type: "string"
  14761. },
  14762. team_slug: {
  14763. required: true,
  14764. type: "string"
  14765. }
  14766. },
  14767. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions"
  14768. },
  14769. createForTeamDiscussionLegacy: {
  14770. deprecated: "octokit.reactions.createForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#create-reaction-for-a-team-discussion-legacy",
  14771. headers: {
  14772. accept: "application/vnd.github.squirrel-girl-preview+json"
  14773. },
  14774. method: "POST",
  14775. params: {
  14776. content: {
  14777. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14778. required: true,
  14779. type: "string"
  14780. },
  14781. discussion_number: {
  14782. required: true,
  14783. type: "integer"
  14784. },
  14785. team_id: {
  14786. required: true,
  14787. type: "integer"
  14788. }
  14789. },
  14790. url: "/teams/:team_id/discussions/:discussion_number/reactions"
  14791. },
  14792. delete: {
  14793. headers: {
  14794. accept: "application/vnd.github.squirrel-girl-preview+json"
  14795. },
  14796. method: "DELETE",
  14797. params: {
  14798. reaction_id: {
  14799. required: true,
  14800. type: "integer"
  14801. }
  14802. },
  14803. url: "/reactions/:reaction_id"
  14804. },
  14805. listForCommitComment: {
  14806. headers: {
  14807. accept: "application/vnd.github.squirrel-girl-preview+json"
  14808. },
  14809. method: "GET",
  14810. params: {
  14811. comment_id: {
  14812. required: true,
  14813. type: "integer"
  14814. },
  14815. content: {
  14816. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14817. type: "string"
  14818. },
  14819. owner: {
  14820. required: true,
  14821. type: "string"
  14822. },
  14823. page: {
  14824. type: "integer"
  14825. },
  14826. per_page: {
  14827. type: "integer"
  14828. },
  14829. repo: {
  14830. required: true,
  14831. type: "string"
  14832. }
  14833. },
  14834. url: "/repos/:owner/:repo/comments/:comment_id/reactions"
  14835. },
  14836. listForIssue: {
  14837. headers: {
  14838. accept: "application/vnd.github.squirrel-girl-preview+json"
  14839. },
  14840. method: "GET",
  14841. params: {
  14842. content: {
  14843. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14844. type: "string"
  14845. },
  14846. issue_number: {
  14847. required: true,
  14848. type: "integer"
  14849. },
  14850. number: {
  14851. alias: "issue_number",
  14852. deprecated: true,
  14853. type: "integer"
  14854. },
  14855. owner: {
  14856. required: true,
  14857. type: "string"
  14858. },
  14859. page: {
  14860. type: "integer"
  14861. },
  14862. per_page: {
  14863. type: "integer"
  14864. },
  14865. repo: {
  14866. required: true,
  14867. type: "string"
  14868. }
  14869. },
  14870. url: "/repos/:owner/:repo/issues/:issue_number/reactions"
  14871. },
  14872. listForIssueComment: {
  14873. headers: {
  14874. accept: "application/vnd.github.squirrel-girl-preview+json"
  14875. },
  14876. method: "GET",
  14877. params: {
  14878. comment_id: {
  14879. required: true,
  14880. type: "integer"
  14881. },
  14882. content: {
  14883. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14884. type: "string"
  14885. },
  14886. owner: {
  14887. required: true,
  14888. type: "string"
  14889. },
  14890. page: {
  14891. type: "integer"
  14892. },
  14893. per_page: {
  14894. type: "integer"
  14895. },
  14896. repo: {
  14897. required: true,
  14898. type: "string"
  14899. }
  14900. },
  14901. url: "/repos/:owner/:repo/issues/comments/:comment_id/reactions"
  14902. },
  14903. listForPullRequestReviewComment: {
  14904. headers: {
  14905. accept: "application/vnd.github.squirrel-girl-preview+json"
  14906. },
  14907. method: "GET",
  14908. params: {
  14909. comment_id: {
  14910. required: true,
  14911. type: "integer"
  14912. },
  14913. content: {
  14914. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14915. type: "string"
  14916. },
  14917. owner: {
  14918. required: true,
  14919. type: "string"
  14920. },
  14921. page: {
  14922. type: "integer"
  14923. },
  14924. per_page: {
  14925. type: "integer"
  14926. },
  14927. repo: {
  14928. required: true,
  14929. type: "string"
  14930. }
  14931. },
  14932. url: "/repos/:owner/:repo/pulls/comments/:comment_id/reactions"
  14933. },
  14934. listForTeamDiscussion: {
  14935. deprecated: "octokit.reactions.listForTeamDiscussion() has been renamed to octokit.reactions.listForTeamDiscussionLegacy() (2020-01-16)",
  14936. headers: {
  14937. accept: "application/vnd.github.squirrel-girl-preview+json"
  14938. },
  14939. method: "GET",
  14940. params: {
  14941. content: {
  14942. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14943. type: "string"
  14944. },
  14945. discussion_number: {
  14946. required: true,
  14947. type: "integer"
  14948. },
  14949. page: {
  14950. type: "integer"
  14951. },
  14952. per_page: {
  14953. type: "integer"
  14954. },
  14955. team_id: {
  14956. required: true,
  14957. type: "integer"
  14958. }
  14959. },
  14960. url: "/teams/:team_id/discussions/:discussion_number/reactions"
  14961. },
  14962. listForTeamDiscussionComment: {
  14963. deprecated: "octokit.reactions.listForTeamDiscussionComment() has been renamed to octokit.reactions.listForTeamDiscussionCommentLegacy() (2020-01-16)",
  14964. headers: {
  14965. accept: "application/vnd.github.squirrel-girl-preview+json"
  14966. },
  14967. method: "GET",
  14968. params: {
  14969. comment_number: {
  14970. required: true,
  14971. type: "integer"
  14972. },
  14973. content: {
  14974. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  14975. type: "string"
  14976. },
  14977. discussion_number: {
  14978. required: true,
  14979. type: "integer"
  14980. },
  14981. page: {
  14982. type: "integer"
  14983. },
  14984. per_page: {
  14985. type: "integer"
  14986. },
  14987. team_id: {
  14988. required: true,
  14989. type: "integer"
  14990. }
  14991. },
  14992. url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions"
  14993. },
  14994. listForTeamDiscussionCommentInOrg: {
  14995. headers: {
  14996. accept: "application/vnd.github.squirrel-girl-preview+json"
  14997. },
  14998. method: "GET",
  14999. params: {
  15000. comment_number: {
  15001. required: true,
  15002. type: "integer"
  15003. },
  15004. content: {
  15005. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  15006. type: "string"
  15007. },
  15008. discussion_number: {
  15009. required: true,
  15010. type: "integer"
  15011. },
  15012. org: {
  15013. required: true,
  15014. type: "string"
  15015. },
  15016. page: {
  15017. type: "integer"
  15018. },
  15019. per_page: {
  15020. type: "integer"
  15021. },
  15022. team_slug: {
  15023. required: true,
  15024. type: "string"
  15025. }
  15026. },
  15027. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number/reactions"
  15028. },
  15029. listForTeamDiscussionCommentLegacy: {
  15030. deprecated: "octokit.reactions.listForTeamDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-comment-legacy",
  15031. headers: {
  15032. accept: "application/vnd.github.squirrel-girl-preview+json"
  15033. },
  15034. method: "GET",
  15035. params: {
  15036. comment_number: {
  15037. required: true,
  15038. type: "integer"
  15039. },
  15040. content: {
  15041. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  15042. type: "string"
  15043. },
  15044. discussion_number: {
  15045. required: true,
  15046. type: "integer"
  15047. },
  15048. page: {
  15049. type: "integer"
  15050. },
  15051. per_page: {
  15052. type: "integer"
  15053. },
  15054. team_id: {
  15055. required: true,
  15056. type: "integer"
  15057. }
  15058. },
  15059. url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number/reactions"
  15060. },
  15061. listForTeamDiscussionInOrg: {
  15062. headers: {
  15063. accept: "application/vnd.github.squirrel-girl-preview+json"
  15064. },
  15065. method: "GET",
  15066. params: {
  15067. content: {
  15068. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  15069. type: "string"
  15070. },
  15071. discussion_number: {
  15072. required: true,
  15073. type: "integer"
  15074. },
  15075. org: {
  15076. required: true,
  15077. type: "string"
  15078. },
  15079. page: {
  15080. type: "integer"
  15081. },
  15082. per_page: {
  15083. type: "integer"
  15084. },
  15085. team_slug: {
  15086. required: true,
  15087. type: "string"
  15088. }
  15089. },
  15090. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/reactions"
  15091. },
  15092. listForTeamDiscussionLegacy: {
  15093. deprecated: "octokit.reactions.listForTeamDiscussionLegacy() is deprecated, see https://developer.github.com/v3/reactions/#list-reactions-for-a-team-discussion-legacy",
  15094. headers: {
  15095. accept: "application/vnd.github.squirrel-girl-preview+json"
  15096. },
  15097. method: "GET",
  15098. params: {
  15099. content: {
  15100. enum: ["+1", "-1", "laugh", "confused", "heart", "hooray", "rocket", "eyes"],
  15101. type: "string"
  15102. },
  15103. discussion_number: {
  15104. required: true,
  15105. type: "integer"
  15106. },
  15107. page: {
  15108. type: "integer"
  15109. },
  15110. per_page: {
  15111. type: "integer"
  15112. },
  15113. team_id: {
  15114. required: true,
  15115. type: "integer"
  15116. }
  15117. },
  15118. url: "/teams/:team_id/discussions/:discussion_number/reactions"
  15119. }
  15120. },
  15121. repos: {
  15122. acceptInvitation: {
  15123. method: "PATCH",
  15124. params: {
  15125. invitation_id: {
  15126. required: true,
  15127. type: "integer"
  15128. }
  15129. },
  15130. url: "/user/repository_invitations/:invitation_id"
  15131. },
  15132. addCollaborator: {
  15133. method: "PUT",
  15134. params: {
  15135. owner: {
  15136. required: true,
  15137. type: "string"
  15138. },
  15139. permission: {
  15140. enum: ["pull", "push", "admin"],
  15141. type: "string"
  15142. },
  15143. repo: {
  15144. required: true,
  15145. type: "string"
  15146. },
  15147. username: {
  15148. required: true,
  15149. type: "string"
  15150. }
  15151. },
  15152. url: "/repos/:owner/:repo/collaborators/:username"
  15153. },
  15154. addDeployKey: {
  15155. method: "POST",
  15156. params: {
  15157. key: {
  15158. required: true,
  15159. type: "string"
  15160. },
  15161. owner: {
  15162. required: true,
  15163. type: "string"
  15164. },
  15165. read_only: {
  15166. type: "boolean"
  15167. },
  15168. repo: {
  15169. required: true,
  15170. type: "string"
  15171. },
  15172. title: {
  15173. type: "string"
  15174. }
  15175. },
  15176. url: "/repos/:owner/:repo/keys"
  15177. },
  15178. addProtectedBranchAdminEnforcement: {
  15179. method: "POST",
  15180. params: {
  15181. branch: {
  15182. required: true,
  15183. type: "string"
  15184. },
  15185. owner: {
  15186. required: true,
  15187. type: "string"
  15188. },
  15189. repo: {
  15190. required: true,
  15191. type: "string"
  15192. }
  15193. },
  15194. url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins"
  15195. },
  15196. addProtectedBranchAppRestrictions: {
  15197. method: "POST",
  15198. params: {
  15199. apps: {
  15200. mapTo: "data",
  15201. required: true,
  15202. type: "string[]"
  15203. },
  15204. branch: {
  15205. required: true,
  15206. type: "string"
  15207. },
  15208. owner: {
  15209. required: true,
  15210. type: "string"
  15211. },
  15212. repo: {
  15213. required: true,
  15214. type: "string"
  15215. }
  15216. },
  15217. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"
  15218. },
  15219. addProtectedBranchRequiredSignatures: {
  15220. headers: {
  15221. accept: "application/vnd.github.zzzax-preview+json"
  15222. },
  15223. method: "POST",
  15224. params: {
  15225. branch: {
  15226. required: true,
  15227. type: "string"
  15228. },
  15229. owner: {
  15230. required: true,
  15231. type: "string"
  15232. },
  15233. repo: {
  15234. required: true,
  15235. type: "string"
  15236. }
  15237. },
  15238. url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures"
  15239. },
  15240. addProtectedBranchRequiredStatusChecksContexts: {
  15241. method: "POST",
  15242. params: {
  15243. branch: {
  15244. required: true,
  15245. type: "string"
  15246. },
  15247. contexts: {
  15248. mapTo: "data",
  15249. required: true,
  15250. type: "string[]"
  15251. },
  15252. owner: {
  15253. required: true,
  15254. type: "string"
  15255. },
  15256. repo: {
  15257. required: true,
  15258. type: "string"
  15259. }
  15260. },
  15261. url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"
  15262. },
  15263. addProtectedBranchTeamRestrictions: {
  15264. method: "POST",
  15265. params: {
  15266. branch: {
  15267. required: true,
  15268. type: "string"
  15269. },
  15270. owner: {
  15271. required: true,
  15272. type: "string"
  15273. },
  15274. repo: {
  15275. required: true,
  15276. type: "string"
  15277. },
  15278. teams: {
  15279. mapTo: "data",
  15280. required: true,
  15281. type: "string[]"
  15282. }
  15283. },
  15284. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
  15285. },
  15286. addProtectedBranchUserRestrictions: {
  15287. method: "POST",
  15288. params: {
  15289. branch: {
  15290. required: true,
  15291. type: "string"
  15292. },
  15293. owner: {
  15294. required: true,
  15295. type: "string"
  15296. },
  15297. repo: {
  15298. required: true,
  15299. type: "string"
  15300. },
  15301. users: {
  15302. mapTo: "data",
  15303. required: true,
  15304. type: "string[]"
  15305. }
  15306. },
  15307. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
  15308. },
  15309. checkCollaborator: {
  15310. method: "GET",
  15311. params: {
  15312. owner: {
  15313. required: true,
  15314. type: "string"
  15315. },
  15316. repo: {
  15317. required: true,
  15318. type: "string"
  15319. },
  15320. username: {
  15321. required: true,
  15322. type: "string"
  15323. }
  15324. },
  15325. url: "/repos/:owner/:repo/collaborators/:username"
  15326. },
  15327. checkVulnerabilityAlerts: {
  15328. headers: {
  15329. accept: "application/vnd.github.dorian-preview+json"
  15330. },
  15331. method: "GET",
  15332. params: {
  15333. owner: {
  15334. required: true,
  15335. type: "string"
  15336. },
  15337. repo: {
  15338. required: true,
  15339. type: "string"
  15340. }
  15341. },
  15342. url: "/repos/:owner/:repo/vulnerability-alerts"
  15343. },
  15344. compareCommits: {
  15345. method: "GET",
  15346. params: {
  15347. base: {
  15348. required: true,
  15349. type: "string"
  15350. },
  15351. head: {
  15352. required: true,
  15353. type: "string"
  15354. },
  15355. owner: {
  15356. required: true,
  15357. type: "string"
  15358. },
  15359. repo: {
  15360. required: true,
  15361. type: "string"
  15362. }
  15363. },
  15364. url: "/repos/:owner/:repo/compare/:base...:head"
  15365. },
  15366. createCommitComment: {
  15367. method: "POST",
  15368. params: {
  15369. body: {
  15370. required: true,
  15371. type: "string"
  15372. },
  15373. commit_sha: {
  15374. required: true,
  15375. type: "string"
  15376. },
  15377. line: {
  15378. type: "integer"
  15379. },
  15380. owner: {
  15381. required: true,
  15382. type: "string"
  15383. },
  15384. path: {
  15385. type: "string"
  15386. },
  15387. position: {
  15388. type: "integer"
  15389. },
  15390. repo: {
  15391. required: true,
  15392. type: "string"
  15393. },
  15394. sha: {
  15395. alias: "commit_sha",
  15396. deprecated: true,
  15397. type: "string"
  15398. }
  15399. },
  15400. url: "/repos/:owner/:repo/commits/:commit_sha/comments"
  15401. },
  15402. createDeployment: {
  15403. method: "POST",
  15404. params: {
  15405. auto_merge: {
  15406. type: "boolean"
  15407. },
  15408. description: {
  15409. type: "string"
  15410. },
  15411. environment: {
  15412. type: "string"
  15413. },
  15414. owner: {
  15415. required: true,
  15416. type: "string"
  15417. },
  15418. payload: {
  15419. type: "string"
  15420. },
  15421. production_environment: {
  15422. type: "boolean"
  15423. },
  15424. ref: {
  15425. required: true,
  15426. type: "string"
  15427. },
  15428. repo: {
  15429. required: true,
  15430. type: "string"
  15431. },
  15432. required_contexts: {
  15433. type: "string[]"
  15434. },
  15435. task: {
  15436. type: "string"
  15437. },
  15438. transient_environment: {
  15439. type: "boolean"
  15440. }
  15441. },
  15442. url: "/repos/:owner/:repo/deployments"
  15443. },
  15444. createDeploymentStatus: {
  15445. method: "POST",
  15446. params: {
  15447. auto_inactive: {
  15448. type: "boolean"
  15449. },
  15450. deployment_id: {
  15451. required: true,
  15452. type: "integer"
  15453. },
  15454. description: {
  15455. type: "string"
  15456. },
  15457. environment: {
  15458. enum: ["production", "staging", "qa"],
  15459. type: "string"
  15460. },
  15461. environment_url: {
  15462. type: "string"
  15463. },
  15464. log_url: {
  15465. type: "string"
  15466. },
  15467. owner: {
  15468. required: true,
  15469. type: "string"
  15470. },
  15471. repo: {
  15472. required: true,
  15473. type: "string"
  15474. },
  15475. state: {
  15476. enum: ["error", "failure", "inactive", "in_progress", "queued", "pending", "success"],
  15477. required: true,
  15478. type: "string"
  15479. },
  15480. target_url: {
  15481. type: "string"
  15482. }
  15483. },
  15484. url: "/repos/:owner/:repo/deployments/:deployment_id/statuses"
  15485. },
  15486. createDispatchEvent: {
  15487. method: "POST",
  15488. params: {
  15489. client_payload: {
  15490. type: "object"
  15491. },
  15492. event_type: {
  15493. type: "string"
  15494. },
  15495. owner: {
  15496. required: true,
  15497. type: "string"
  15498. },
  15499. repo: {
  15500. required: true,
  15501. type: "string"
  15502. }
  15503. },
  15504. url: "/repos/:owner/:repo/dispatches"
  15505. },
  15506. createFile: {
  15507. deprecated: "octokit.repos.createFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)",
  15508. method: "PUT",
  15509. params: {
  15510. author: {
  15511. type: "object"
  15512. },
  15513. "author.email": {
  15514. required: true,
  15515. type: "string"
  15516. },
  15517. "author.name": {
  15518. required: true,
  15519. type: "string"
  15520. },
  15521. branch: {
  15522. type: "string"
  15523. },
  15524. committer: {
  15525. type: "object"
  15526. },
  15527. "committer.email": {
  15528. required: true,
  15529. type: "string"
  15530. },
  15531. "committer.name": {
  15532. required: true,
  15533. type: "string"
  15534. },
  15535. content: {
  15536. required: true,
  15537. type: "string"
  15538. },
  15539. message: {
  15540. required: true,
  15541. type: "string"
  15542. },
  15543. owner: {
  15544. required: true,
  15545. type: "string"
  15546. },
  15547. path: {
  15548. required: true,
  15549. type: "string"
  15550. },
  15551. repo: {
  15552. required: true,
  15553. type: "string"
  15554. },
  15555. sha: {
  15556. type: "string"
  15557. }
  15558. },
  15559. url: "/repos/:owner/:repo/contents/:path"
  15560. },
  15561. createForAuthenticatedUser: {
  15562. method: "POST",
  15563. params: {
  15564. allow_merge_commit: {
  15565. type: "boolean"
  15566. },
  15567. allow_rebase_merge: {
  15568. type: "boolean"
  15569. },
  15570. allow_squash_merge: {
  15571. type: "boolean"
  15572. },
  15573. auto_init: {
  15574. type: "boolean"
  15575. },
  15576. delete_branch_on_merge: {
  15577. type: "boolean"
  15578. },
  15579. description: {
  15580. type: "string"
  15581. },
  15582. gitignore_template: {
  15583. type: "string"
  15584. },
  15585. has_issues: {
  15586. type: "boolean"
  15587. },
  15588. has_projects: {
  15589. type: "boolean"
  15590. },
  15591. has_wiki: {
  15592. type: "boolean"
  15593. },
  15594. homepage: {
  15595. type: "string"
  15596. },
  15597. is_template: {
  15598. type: "boolean"
  15599. },
  15600. license_template: {
  15601. type: "string"
  15602. },
  15603. name: {
  15604. required: true,
  15605. type: "string"
  15606. },
  15607. private: {
  15608. type: "boolean"
  15609. },
  15610. team_id: {
  15611. type: "integer"
  15612. },
  15613. visibility: {
  15614. enum: ["public", "private", "visibility", "internal"],
  15615. type: "string"
  15616. }
  15617. },
  15618. url: "/user/repos"
  15619. },
  15620. createFork: {
  15621. method: "POST",
  15622. params: {
  15623. organization: {
  15624. type: "string"
  15625. },
  15626. owner: {
  15627. required: true,
  15628. type: "string"
  15629. },
  15630. repo: {
  15631. required: true,
  15632. type: "string"
  15633. }
  15634. },
  15635. url: "/repos/:owner/:repo/forks"
  15636. },
  15637. createHook: {
  15638. method: "POST",
  15639. params: {
  15640. active: {
  15641. type: "boolean"
  15642. },
  15643. config: {
  15644. required: true,
  15645. type: "object"
  15646. },
  15647. "config.content_type": {
  15648. type: "string"
  15649. },
  15650. "config.insecure_ssl": {
  15651. type: "string"
  15652. },
  15653. "config.secret": {
  15654. type: "string"
  15655. },
  15656. "config.url": {
  15657. required: true,
  15658. type: "string"
  15659. },
  15660. events: {
  15661. type: "string[]"
  15662. },
  15663. name: {
  15664. type: "string"
  15665. },
  15666. owner: {
  15667. required: true,
  15668. type: "string"
  15669. },
  15670. repo: {
  15671. required: true,
  15672. type: "string"
  15673. }
  15674. },
  15675. url: "/repos/:owner/:repo/hooks"
  15676. },
  15677. createInOrg: {
  15678. method: "POST",
  15679. params: {
  15680. allow_merge_commit: {
  15681. type: "boolean"
  15682. },
  15683. allow_rebase_merge: {
  15684. type: "boolean"
  15685. },
  15686. allow_squash_merge: {
  15687. type: "boolean"
  15688. },
  15689. auto_init: {
  15690. type: "boolean"
  15691. },
  15692. delete_branch_on_merge: {
  15693. type: "boolean"
  15694. },
  15695. description: {
  15696. type: "string"
  15697. },
  15698. gitignore_template: {
  15699. type: "string"
  15700. },
  15701. has_issues: {
  15702. type: "boolean"
  15703. },
  15704. has_projects: {
  15705. type: "boolean"
  15706. },
  15707. has_wiki: {
  15708. type: "boolean"
  15709. },
  15710. homepage: {
  15711. type: "string"
  15712. },
  15713. is_template: {
  15714. type: "boolean"
  15715. },
  15716. license_template: {
  15717. type: "string"
  15718. },
  15719. name: {
  15720. required: true,
  15721. type: "string"
  15722. },
  15723. org: {
  15724. required: true,
  15725. type: "string"
  15726. },
  15727. private: {
  15728. type: "boolean"
  15729. },
  15730. team_id: {
  15731. type: "integer"
  15732. },
  15733. visibility: {
  15734. enum: ["public", "private", "visibility", "internal"],
  15735. type: "string"
  15736. }
  15737. },
  15738. url: "/orgs/:org/repos"
  15739. },
  15740. createOrUpdateFile: {
  15741. method: "PUT",
  15742. params: {
  15743. author: {
  15744. type: "object"
  15745. },
  15746. "author.email": {
  15747. required: true,
  15748. type: "string"
  15749. },
  15750. "author.name": {
  15751. required: true,
  15752. type: "string"
  15753. },
  15754. branch: {
  15755. type: "string"
  15756. },
  15757. committer: {
  15758. type: "object"
  15759. },
  15760. "committer.email": {
  15761. required: true,
  15762. type: "string"
  15763. },
  15764. "committer.name": {
  15765. required: true,
  15766. type: "string"
  15767. },
  15768. content: {
  15769. required: true,
  15770. type: "string"
  15771. },
  15772. message: {
  15773. required: true,
  15774. type: "string"
  15775. },
  15776. owner: {
  15777. required: true,
  15778. type: "string"
  15779. },
  15780. path: {
  15781. required: true,
  15782. type: "string"
  15783. },
  15784. repo: {
  15785. required: true,
  15786. type: "string"
  15787. },
  15788. sha: {
  15789. type: "string"
  15790. }
  15791. },
  15792. url: "/repos/:owner/:repo/contents/:path"
  15793. },
  15794. createRelease: {
  15795. method: "POST",
  15796. params: {
  15797. body: {
  15798. type: "string"
  15799. },
  15800. draft: {
  15801. type: "boolean"
  15802. },
  15803. name: {
  15804. type: "string"
  15805. },
  15806. owner: {
  15807. required: true,
  15808. type: "string"
  15809. },
  15810. prerelease: {
  15811. type: "boolean"
  15812. },
  15813. repo: {
  15814. required: true,
  15815. type: "string"
  15816. },
  15817. tag_name: {
  15818. required: true,
  15819. type: "string"
  15820. },
  15821. target_commitish: {
  15822. type: "string"
  15823. }
  15824. },
  15825. url: "/repos/:owner/:repo/releases"
  15826. },
  15827. createStatus: {
  15828. method: "POST",
  15829. params: {
  15830. context: {
  15831. type: "string"
  15832. },
  15833. description: {
  15834. type: "string"
  15835. },
  15836. owner: {
  15837. required: true,
  15838. type: "string"
  15839. },
  15840. repo: {
  15841. required: true,
  15842. type: "string"
  15843. },
  15844. sha: {
  15845. required: true,
  15846. type: "string"
  15847. },
  15848. state: {
  15849. enum: ["error", "failure", "pending", "success"],
  15850. required: true,
  15851. type: "string"
  15852. },
  15853. target_url: {
  15854. type: "string"
  15855. }
  15856. },
  15857. url: "/repos/:owner/:repo/statuses/:sha"
  15858. },
  15859. createUsingTemplate: {
  15860. headers: {
  15861. accept: "application/vnd.github.baptiste-preview+json"
  15862. },
  15863. method: "POST",
  15864. params: {
  15865. description: {
  15866. type: "string"
  15867. },
  15868. name: {
  15869. required: true,
  15870. type: "string"
  15871. },
  15872. owner: {
  15873. type: "string"
  15874. },
  15875. private: {
  15876. type: "boolean"
  15877. },
  15878. template_owner: {
  15879. required: true,
  15880. type: "string"
  15881. },
  15882. template_repo: {
  15883. required: true,
  15884. type: "string"
  15885. }
  15886. },
  15887. url: "/repos/:template_owner/:template_repo/generate"
  15888. },
  15889. declineInvitation: {
  15890. method: "DELETE",
  15891. params: {
  15892. invitation_id: {
  15893. required: true,
  15894. type: "integer"
  15895. }
  15896. },
  15897. url: "/user/repository_invitations/:invitation_id"
  15898. },
  15899. delete: {
  15900. method: "DELETE",
  15901. params: {
  15902. owner: {
  15903. required: true,
  15904. type: "string"
  15905. },
  15906. repo: {
  15907. required: true,
  15908. type: "string"
  15909. }
  15910. },
  15911. url: "/repos/:owner/:repo"
  15912. },
  15913. deleteCommitComment: {
  15914. method: "DELETE",
  15915. params: {
  15916. comment_id: {
  15917. required: true,
  15918. type: "integer"
  15919. },
  15920. owner: {
  15921. required: true,
  15922. type: "string"
  15923. },
  15924. repo: {
  15925. required: true,
  15926. type: "string"
  15927. }
  15928. },
  15929. url: "/repos/:owner/:repo/comments/:comment_id"
  15930. },
  15931. deleteDownload: {
  15932. method: "DELETE",
  15933. params: {
  15934. download_id: {
  15935. required: true,
  15936. type: "integer"
  15937. },
  15938. owner: {
  15939. required: true,
  15940. type: "string"
  15941. },
  15942. repo: {
  15943. required: true,
  15944. type: "string"
  15945. }
  15946. },
  15947. url: "/repos/:owner/:repo/downloads/:download_id"
  15948. },
  15949. deleteFile: {
  15950. method: "DELETE",
  15951. params: {
  15952. author: {
  15953. type: "object"
  15954. },
  15955. "author.email": {
  15956. type: "string"
  15957. },
  15958. "author.name": {
  15959. type: "string"
  15960. },
  15961. branch: {
  15962. type: "string"
  15963. },
  15964. committer: {
  15965. type: "object"
  15966. },
  15967. "committer.email": {
  15968. type: "string"
  15969. },
  15970. "committer.name": {
  15971. type: "string"
  15972. },
  15973. message: {
  15974. required: true,
  15975. type: "string"
  15976. },
  15977. owner: {
  15978. required: true,
  15979. type: "string"
  15980. },
  15981. path: {
  15982. required: true,
  15983. type: "string"
  15984. },
  15985. repo: {
  15986. required: true,
  15987. type: "string"
  15988. },
  15989. sha: {
  15990. required: true,
  15991. type: "string"
  15992. }
  15993. },
  15994. url: "/repos/:owner/:repo/contents/:path"
  15995. },
  15996. deleteHook: {
  15997. method: "DELETE",
  15998. params: {
  15999. hook_id: {
  16000. required: true,
  16001. type: "integer"
  16002. },
  16003. owner: {
  16004. required: true,
  16005. type: "string"
  16006. },
  16007. repo: {
  16008. required: true,
  16009. type: "string"
  16010. }
  16011. },
  16012. url: "/repos/:owner/:repo/hooks/:hook_id"
  16013. },
  16014. deleteInvitation: {
  16015. method: "DELETE",
  16016. params: {
  16017. invitation_id: {
  16018. required: true,
  16019. type: "integer"
  16020. },
  16021. owner: {
  16022. required: true,
  16023. type: "string"
  16024. },
  16025. repo: {
  16026. required: true,
  16027. type: "string"
  16028. }
  16029. },
  16030. url: "/repos/:owner/:repo/invitations/:invitation_id"
  16031. },
  16032. deleteRelease: {
  16033. method: "DELETE",
  16034. params: {
  16035. owner: {
  16036. required: true,
  16037. type: "string"
  16038. },
  16039. release_id: {
  16040. required: true,
  16041. type: "integer"
  16042. },
  16043. repo: {
  16044. required: true,
  16045. type: "string"
  16046. }
  16047. },
  16048. url: "/repos/:owner/:repo/releases/:release_id"
  16049. },
  16050. deleteReleaseAsset: {
  16051. method: "DELETE",
  16052. params: {
  16053. asset_id: {
  16054. required: true,
  16055. type: "integer"
  16056. },
  16057. owner: {
  16058. required: true,
  16059. type: "string"
  16060. },
  16061. repo: {
  16062. required: true,
  16063. type: "string"
  16064. }
  16065. },
  16066. url: "/repos/:owner/:repo/releases/assets/:asset_id"
  16067. },
  16068. disableAutomatedSecurityFixes: {
  16069. headers: {
  16070. accept: "application/vnd.github.london-preview+json"
  16071. },
  16072. method: "DELETE",
  16073. params: {
  16074. owner: {
  16075. required: true,
  16076. type: "string"
  16077. },
  16078. repo: {
  16079. required: true,
  16080. type: "string"
  16081. }
  16082. },
  16083. url: "/repos/:owner/:repo/automated-security-fixes"
  16084. },
  16085. disablePagesSite: {
  16086. headers: {
  16087. accept: "application/vnd.github.switcheroo-preview+json"
  16088. },
  16089. method: "DELETE",
  16090. params: {
  16091. owner: {
  16092. required: true,
  16093. type: "string"
  16094. },
  16095. repo: {
  16096. required: true,
  16097. type: "string"
  16098. }
  16099. },
  16100. url: "/repos/:owner/:repo/pages"
  16101. },
  16102. disableVulnerabilityAlerts: {
  16103. headers: {
  16104. accept: "application/vnd.github.dorian-preview+json"
  16105. },
  16106. method: "DELETE",
  16107. params: {
  16108. owner: {
  16109. required: true,
  16110. type: "string"
  16111. },
  16112. repo: {
  16113. required: true,
  16114. type: "string"
  16115. }
  16116. },
  16117. url: "/repos/:owner/:repo/vulnerability-alerts"
  16118. },
  16119. enableAutomatedSecurityFixes: {
  16120. headers: {
  16121. accept: "application/vnd.github.london-preview+json"
  16122. },
  16123. method: "PUT",
  16124. params: {
  16125. owner: {
  16126. required: true,
  16127. type: "string"
  16128. },
  16129. repo: {
  16130. required: true,
  16131. type: "string"
  16132. }
  16133. },
  16134. url: "/repos/:owner/:repo/automated-security-fixes"
  16135. },
  16136. enablePagesSite: {
  16137. headers: {
  16138. accept: "application/vnd.github.switcheroo-preview+json"
  16139. },
  16140. method: "POST",
  16141. params: {
  16142. owner: {
  16143. required: true,
  16144. type: "string"
  16145. },
  16146. repo: {
  16147. required: true,
  16148. type: "string"
  16149. },
  16150. source: {
  16151. type: "object"
  16152. },
  16153. "source.branch": {
  16154. enum: ["master", "gh-pages"],
  16155. type: "string"
  16156. },
  16157. "source.path": {
  16158. type: "string"
  16159. }
  16160. },
  16161. url: "/repos/:owner/:repo/pages"
  16162. },
  16163. enableVulnerabilityAlerts: {
  16164. headers: {
  16165. accept: "application/vnd.github.dorian-preview+json"
  16166. },
  16167. method: "PUT",
  16168. params: {
  16169. owner: {
  16170. required: true,
  16171. type: "string"
  16172. },
  16173. repo: {
  16174. required: true,
  16175. type: "string"
  16176. }
  16177. },
  16178. url: "/repos/:owner/:repo/vulnerability-alerts"
  16179. },
  16180. get: {
  16181. method: "GET",
  16182. params: {
  16183. owner: {
  16184. required: true,
  16185. type: "string"
  16186. },
  16187. repo: {
  16188. required: true,
  16189. type: "string"
  16190. }
  16191. },
  16192. url: "/repos/:owner/:repo"
  16193. },
  16194. getAppsWithAccessToProtectedBranch: {
  16195. method: "GET",
  16196. params: {
  16197. branch: {
  16198. required: true,
  16199. type: "string"
  16200. },
  16201. owner: {
  16202. required: true,
  16203. type: "string"
  16204. },
  16205. repo: {
  16206. required: true,
  16207. type: "string"
  16208. }
  16209. },
  16210. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"
  16211. },
  16212. getArchiveLink: {
  16213. method: "GET",
  16214. params: {
  16215. archive_format: {
  16216. required: true,
  16217. type: "string"
  16218. },
  16219. owner: {
  16220. required: true,
  16221. type: "string"
  16222. },
  16223. ref: {
  16224. required: true,
  16225. type: "string"
  16226. },
  16227. repo: {
  16228. required: true,
  16229. type: "string"
  16230. }
  16231. },
  16232. url: "/repos/:owner/:repo/:archive_format/:ref"
  16233. },
  16234. getBranch: {
  16235. method: "GET",
  16236. params: {
  16237. branch: {
  16238. required: true,
  16239. type: "string"
  16240. },
  16241. owner: {
  16242. required: true,
  16243. type: "string"
  16244. },
  16245. repo: {
  16246. required: true,
  16247. type: "string"
  16248. }
  16249. },
  16250. url: "/repos/:owner/:repo/branches/:branch"
  16251. },
  16252. getBranchProtection: {
  16253. method: "GET",
  16254. params: {
  16255. branch: {
  16256. required: true,
  16257. type: "string"
  16258. },
  16259. owner: {
  16260. required: true,
  16261. type: "string"
  16262. },
  16263. repo: {
  16264. required: true,
  16265. type: "string"
  16266. }
  16267. },
  16268. url: "/repos/:owner/:repo/branches/:branch/protection"
  16269. },
  16270. getClones: {
  16271. method: "GET",
  16272. params: {
  16273. owner: {
  16274. required: true,
  16275. type: "string"
  16276. },
  16277. per: {
  16278. enum: ["day", "week"],
  16279. type: "string"
  16280. },
  16281. repo: {
  16282. required: true,
  16283. type: "string"
  16284. }
  16285. },
  16286. url: "/repos/:owner/:repo/traffic/clones"
  16287. },
  16288. getCodeFrequencyStats: {
  16289. method: "GET",
  16290. params: {
  16291. owner: {
  16292. required: true,
  16293. type: "string"
  16294. },
  16295. repo: {
  16296. required: true,
  16297. type: "string"
  16298. }
  16299. },
  16300. url: "/repos/:owner/:repo/stats/code_frequency"
  16301. },
  16302. getCollaboratorPermissionLevel: {
  16303. method: "GET",
  16304. params: {
  16305. owner: {
  16306. required: true,
  16307. type: "string"
  16308. },
  16309. repo: {
  16310. required: true,
  16311. type: "string"
  16312. },
  16313. username: {
  16314. required: true,
  16315. type: "string"
  16316. }
  16317. },
  16318. url: "/repos/:owner/:repo/collaborators/:username/permission"
  16319. },
  16320. getCombinedStatusForRef: {
  16321. method: "GET",
  16322. params: {
  16323. owner: {
  16324. required: true,
  16325. type: "string"
  16326. },
  16327. ref: {
  16328. required: true,
  16329. type: "string"
  16330. },
  16331. repo: {
  16332. required: true,
  16333. type: "string"
  16334. }
  16335. },
  16336. url: "/repos/:owner/:repo/commits/:ref/status"
  16337. },
  16338. getCommit: {
  16339. method: "GET",
  16340. params: {
  16341. commit_sha: {
  16342. alias: "ref",
  16343. deprecated: true,
  16344. type: "string"
  16345. },
  16346. owner: {
  16347. required: true,
  16348. type: "string"
  16349. },
  16350. ref: {
  16351. required: true,
  16352. type: "string"
  16353. },
  16354. repo: {
  16355. required: true,
  16356. type: "string"
  16357. },
  16358. sha: {
  16359. alias: "ref",
  16360. deprecated: true,
  16361. type: "string"
  16362. }
  16363. },
  16364. url: "/repos/:owner/:repo/commits/:ref"
  16365. },
  16366. getCommitActivityStats: {
  16367. method: "GET",
  16368. params: {
  16369. owner: {
  16370. required: true,
  16371. type: "string"
  16372. },
  16373. repo: {
  16374. required: true,
  16375. type: "string"
  16376. }
  16377. },
  16378. url: "/repos/:owner/:repo/stats/commit_activity"
  16379. },
  16380. getCommitComment: {
  16381. method: "GET",
  16382. params: {
  16383. comment_id: {
  16384. required: true,
  16385. type: "integer"
  16386. },
  16387. owner: {
  16388. required: true,
  16389. type: "string"
  16390. },
  16391. repo: {
  16392. required: true,
  16393. type: "string"
  16394. }
  16395. },
  16396. url: "/repos/:owner/:repo/comments/:comment_id"
  16397. },
  16398. getCommitRefSha: {
  16399. deprecated: "octokit.repos.getCommitRefSha() is deprecated, see https://developer.github.com/v3/repos/commits/#get-a-single-commit",
  16400. headers: {
  16401. accept: "application/vnd.github.v3.sha"
  16402. },
  16403. method: "GET",
  16404. params: {
  16405. owner: {
  16406. required: true,
  16407. type: "string"
  16408. },
  16409. ref: {
  16410. required: true,
  16411. type: "string"
  16412. },
  16413. repo: {
  16414. required: true,
  16415. type: "string"
  16416. }
  16417. },
  16418. url: "/repos/:owner/:repo/commits/:ref"
  16419. },
  16420. getContents: {
  16421. method: "GET",
  16422. params: {
  16423. owner: {
  16424. required: true,
  16425. type: "string"
  16426. },
  16427. path: {
  16428. required: true,
  16429. type: "string"
  16430. },
  16431. ref: {
  16432. type: "string"
  16433. },
  16434. repo: {
  16435. required: true,
  16436. type: "string"
  16437. }
  16438. },
  16439. url: "/repos/:owner/:repo/contents/:path"
  16440. },
  16441. getContributorsStats: {
  16442. method: "GET",
  16443. params: {
  16444. owner: {
  16445. required: true,
  16446. type: "string"
  16447. },
  16448. repo: {
  16449. required: true,
  16450. type: "string"
  16451. }
  16452. },
  16453. url: "/repos/:owner/:repo/stats/contributors"
  16454. },
  16455. getDeployKey: {
  16456. method: "GET",
  16457. params: {
  16458. key_id: {
  16459. required: true,
  16460. type: "integer"
  16461. },
  16462. owner: {
  16463. required: true,
  16464. type: "string"
  16465. },
  16466. repo: {
  16467. required: true,
  16468. type: "string"
  16469. }
  16470. },
  16471. url: "/repos/:owner/:repo/keys/:key_id"
  16472. },
  16473. getDeployment: {
  16474. method: "GET",
  16475. params: {
  16476. deployment_id: {
  16477. required: true,
  16478. type: "integer"
  16479. },
  16480. owner: {
  16481. required: true,
  16482. type: "string"
  16483. },
  16484. repo: {
  16485. required: true,
  16486. type: "string"
  16487. }
  16488. },
  16489. url: "/repos/:owner/:repo/deployments/:deployment_id"
  16490. },
  16491. getDeploymentStatus: {
  16492. method: "GET",
  16493. params: {
  16494. deployment_id: {
  16495. required: true,
  16496. type: "integer"
  16497. },
  16498. owner: {
  16499. required: true,
  16500. type: "string"
  16501. },
  16502. repo: {
  16503. required: true,
  16504. type: "string"
  16505. },
  16506. status_id: {
  16507. required: true,
  16508. type: "integer"
  16509. }
  16510. },
  16511. url: "/repos/:owner/:repo/deployments/:deployment_id/statuses/:status_id"
  16512. },
  16513. getDownload: {
  16514. method: "GET",
  16515. params: {
  16516. download_id: {
  16517. required: true,
  16518. type: "integer"
  16519. },
  16520. owner: {
  16521. required: true,
  16522. type: "string"
  16523. },
  16524. repo: {
  16525. required: true,
  16526. type: "string"
  16527. }
  16528. },
  16529. url: "/repos/:owner/:repo/downloads/:download_id"
  16530. },
  16531. getHook: {
  16532. method: "GET",
  16533. params: {
  16534. hook_id: {
  16535. required: true,
  16536. type: "integer"
  16537. },
  16538. owner: {
  16539. required: true,
  16540. type: "string"
  16541. },
  16542. repo: {
  16543. required: true,
  16544. type: "string"
  16545. }
  16546. },
  16547. url: "/repos/:owner/:repo/hooks/:hook_id"
  16548. },
  16549. getLatestPagesBuild: {
  16550. method: "GET",
  16551. params: {
  16552. owner: {
  16553. required: true,
  16554. type: "string"
  16555. },
  16556. repo: {
  16557. required: true,
  16558. type: "string"
  16559. }
  16560. },
  16561. url: "/repos/:owner/:repo/pages/builds/latest"
  16562. },
  16563. getLatestRelease: {
  16564. method: "GET",
  16565. params: {
  16566. owner: {
  16567. required: true,
  16568. type: "string"
  16569. },
  16570. repo: {
  16571. required: true,
  16572. type: "string"
  16573. }
  16574. },
  16575. url: "/repos/:owner/:repo/releases/latest"
  16576. },
  16577. getPages: {
  16578. method: "GET",
  16579. params: {
  16580. owner: {
  16581. required: true,
  16582. type: "string"
  16583. },
  16584. repo: {
  16585. required: true,
  16586. type: "string"
  16587. }
  16588. },
  16589. url: "/repos/:owner/:repo/pages"
  16590. },
  16591. getPagesBuild: {
  16592. method: "GET",
  16593. params: {
  16594. build_id: {
  16595. required: true,
  16596. type: "integer"
  16597. },
  16598. owner: {
  16599. required: true,
  16600. type: "string"
  16601. },
  16602. repo: {
  16603. required: true,
  16604. type: "string"
  16605. }
  16606. },
  16607. url: "/repos/:owner/:repo/pages/builds/:build_id"
  16608. },
  16609. getParticipationStats: {
  16610. method: "GET",
  16611. params: {
  16612. owner: {
  16613. required: true,
  16614. type: "string"
  16615. },
  16616. repo: {
  16617. required: true,
  16618. type: "string"
  16619. }
  16620. },
  16621. url: "/repos/:owner/:repo/stats/participation"
  16622. },
  16623. getProtectedBranchAdminEnforcement: {
  16624. method: "GET",
  16625. params: {
  16626. branch: {
  16627. required: true,
  16628. type: "string"
  16629. },
  16630. owner: {
  16631. required: true,
  16632. type: "string"
  16633. },
  16634. repo: {
  16635. required: true,
  16636. type: "string"
  16637. }
  16638. },
  16639. url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins"
  16640. },
  16641. getProtectedBranchPullRequestReviewEnforcement: {
  16642. method: "GET",
  16643. params: {
  16644. branch: {
  16645. required: true,
  16646. type: "string"
  16647. },
  16648. owner: {
  16649. required: true,
  16650. type: "string"
  16651. },
  16652. repo: {
  16653. required: true,
  16654. type: "string"
  16655. }
  16656. },
  16657. url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews"
  16658. },
  16659. getProtectedBranchRequiredSignatures: {
  16660. headers: {
  16661. accept: "application/vnd.github.zzzax-preview+json"
  16662. },
  16663. method: "GET",
  16664. params: {
  16665. branch: {
  16666. required: true,
  16667. type: "string"
  16668. },
  16669. owner: {
  16670. required: true,
  16671. type: "string"
  16672. },
  16673. repo: {
  16674. required: true,
  16675. type: "string"
  16676. }
  16677. },
  16678. url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures"
  16679. },
  16680. getProtectedBranchRequiredStatusChecks: {
  16681. method: "GET",
  16682. params: {
  16683. branch: {
  16684. required: true,
  16685. type: "string"
  16686. },
  16687. owner: {
  16688. required: true,
  16689. type: "string"
  16690. },
  16691. repo: {
  16692. required: true,
  16693. type: "string"
  16694. }
  16695. },
  16696. url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks"
  16697. },
  16698. getProtectedBranchRestrictions: {
  16699. method: "GET",
  16700. params: {
  16701. branch: {
  16702. required: true,
  16703. type: "string"
  16704. },
  16705. owner: {
  16706. required: true,
  16707. type: "string"
  16708. },
  16709. repo: {
  16710. required: true,
  16711. type: "string"
  16712. }
  16713. },
  16714. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions"
  16715. },
  16716. getPunchCardStats: {
  16717. method: "GET",
  16718. params: {
  16719. owner: {
  16720. required: true,
  16721. type: "string"
  16722. },
  16723. repo: {
  16724. required: true,
  16725. type: "string"
  16726. }
  16727. },
  16728. url: "/repos/:owner/:repo/stats/punch_card"
  16729. },
  16730. getReadme: {
  16731. method: "GET",
  16732. params: {
  16733. owner: {
  16734. required: true,
  16735. type: "string"
  16736. },
  16737. ref: {
  16738. type: "string"
  16739. },
  16740. repo: {
  16741. required: true,
  16742. type: "string"
  16743. }
  16744. },
  16745. url: "/repos/:owner/:repo/readme"
  16746. },
  16747. getRelease: {
  16748. method: "GET",
  16749. params: {
  16750. owner: {
  16751. required: true,
  16752. type: "string"
  16753. },
  16754. release_id: {
  16755. required: true,
  16756. type: "integer"
  16757. },
  16758. repo: {
  16759. required: true,
  16760. type: "string"
  16761. }
  16762. },
  16763. url: "/repos/:owner/:repo/releases/:release_id"
  16764. },
  16765. getReleaseAsset: {
  16766. method: "GET",
  16767. params: {
  16768. asset_id: {
  16769. required: true,
  16770. type: "integer"
  16771. },
  16772. owner: {
  16773. required: true,
  16774. type: "string"
  16775. },
  16776. repo: {
  16777. required: true,
  16778. type: "string"
  16779. }
  16780. },
  16781. url: "/repos/:owner/:repo/releases/assets/:asset_id"
  16782. },
  16783. getReleaseByTag: {
  16784. method: "GET",
  16785. params: {
  16786. owner: {
  16787. required: true,
  16788. type: "string"
  16789. },
  16790. repo: {
  16791. required: true,
  16792. type: "string"
  16793. },
  16794. tag: {
  16795. required: true,
  16796. type: "string"
  16797. }
  16798. },
  16799. url: "/repos/:owner/:repo/releases/tags/:tag"
  16800. },
  16801. getTeamsWithAccessToProtectedBranch: {
  16802. method: "GET",
  16803. params: {
  16804. branch: {
  16805. required: true,
  16806. type: "string"
  16807. },
  16808. owner: {
  16809. required: true,
  16810. type: "string"
  16811. },
  16812. repo: {
  16813. required: true,
  16814. type: "string"
  16815. }
  16816. },
  16817. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
  16818. },
  16819. getTopPaths: {
  16820. method: "GET",
  16821. params: {
  16822. owner: {
  16823. required: true,
  16824. type: "string"
  16825. },
  16826. repo: {
  16827. required: true,
  16828. type: "string"
  16829. }
  16830. },
  16831. url: "/repos/:owner/:repo/traffic/popular/paths"
  16832. },
  16833. getTopReferrers: {
  16834. method: "GET",
  16835. params: {
  16836. owner: {
  16837. required: true,
  16838. type: "string"
  16839. },
  16840. repo: {
  16841. required: true,
  16842. type: "string"
  16843. }
  16844. },
  16845. url: "/repos/:owner/:repo/traffic/popular/referrers"
  16846. },
  16847. getUsersWithAccessToProtectedBranch: {
  16848. method: "GET",
  16849. params: {
  16850. branch: {
  16851. required: true,
  16852. type: "string"
  16853. },
  16854. owner: {
  16855. required: true,
  16856. type: "string"
  16857. },
  16858. repo: {
  16859. required: true,
  16860. type: "string"
  16861. }
  16862. },
  16863. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
  16864. },
  16865. getViews: {
  16866. method: "GET",
  16867. params: {
  16868. owner: {
  16869. required: true,
  16870. type: "string"
  16871. },
  16872. per: {
  16873. enum: ["day", "week"],
  16874. type: "string"
  16875. },
  16876. repo: {
  16877. required: true,
  16878. type: "string"
  16879. }
  16880. },
  16881. url: "/repos/:owner/:repo/traffic/views"
  16882. },
  16883. list: {
  16884. method: "GET",
  16885. params: {
  16886. affiliation: {
  16887. type: "string"
  16888. },
  16889. direction: {
  16890. enum: ["asc", "desc"],
  16891. type: "string"
  16892. },
  16893. page: {
  16894. type: "integer"
  16895. },
  16896. per_page: {
  16897. type: "integer"
  16898. },
  16899. sort: {
  16900. enum: ["created", "updated", "pushed", "full_name"],
  16901. type: "string"
  16902. },
  16903. type: {
  16904. enum: ["all", "owner", "public", "private", "member"],
  16905. type: "string"
  16906. },
  16907. visibility: {
  16908. enum: ["all", "public", "private"],
  16909. type: "string"
  16910. }
  16911. },
  16912. url: "/user/repos"
  16913. },
  16914. listAppsWithAccessToProtectedBranch: {
  16915. deprecated: "octokit.repos.listAppsWithAccessToProtectedBranch() has been renamed to octokit.repos.getAppsWithAccessToProtectedBranch() (2019-09-13)",
  16916. method: "GET",
  16917. params: {
  16918. branch: {
  16919. required: true,
  16920. type: "string"
  16921. },
  16922. owner: {
  16923. required: true,
  16924. type: "string"
  16925. },
  16926. repo: {
  16927. required: true,
  16928. type: "string"
  16929. }
  16930. },
  16931. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"
  16932. },
  16933. listAssetsForRelease: {
  16934. method: "GET",
  16935. params: {
  16936. owner: {
  16937. required: true,
  16938. type: "string"
  16939. },
  16940. page: {
  16941. type: "integer"
  16942. },
  16943. per_page: {
  16944. type: "integer"
  16945. },
  16946. release_id: {
  16947. required: true,
  16948. type: "integer"
  16949. },
  16950. repo: {
  16951. required: true,
  16952. type: "string"
  16953. }
  16954. },
  16955. url: "/repos/:owner/:repo/releases/:release_id/assets"
  16956. },
  16957. listBranches: {
  16958. method: "GET",
  16959. params: {
  16960. owner: {
  16961. required: true,
  16962. type: "string"
  16963. },
  16964. page: {
  16965. type: "integer"
  16966. },
  16967. per_page: {
  16968. type: "integer"
  16969. },
  16970. protected: {
  16971. type: "boolean"
  16972. },
  16973. repo: {
  16974. required: true,
  16975. type: "string"
  16976. }
  16977. },
  16978. url: "/repos/:owner/:repo/branches"
  16979. },
  16980. listBranchesForHeadCommit: {
  16981. headers: {
  16982. accept: "application/vnd.github.groot-preview+json"
  16983. },
  16984. method: "GET",
  16985. params: {
  16986. commit_sha: {
  16987. required: true,
  16988. type: "string"
  16989. },
  16990. owner: {
  16991. required: true,
  16992. type: "string"
  16993. },
  16994. repo: {
  16995. required: true,
  16996. type: "string"
  16997. }
  16998. },
  16999. url: "/repos/:owner/:repo/commits/:commit_sha/branches-where-head"
  17000. },
  17001. listCollaborators: {
  17002. method: "GET",
  17003. params: {
  17004. affiliation: {
  17005. enum: ["outside", "direct", "all"],
  17006. type: "string"
  17007. },
  17008. owner: {
  17009. required: true,
  17010. type: "string"
  17011. },
  17012. page: {
  17013. type: "integer"
  17014. },
  17015. per_page: {
  17016. type: "integer"
  17017. },
  17018. repo: {
  17019. required: true,
  17020. type: "string"
  17021. }
  17022. },
  17023. url: "/repos/:owner/:repo/collaborators"
  17024. },
  17025. listCommentsForCommit: {
  17026. method: "GET",
  17027. params: {
  17028. commit_sha: {
  17029. required: true,
  17030. type: "string"
  17031. },
  17032. owner: {
  17033. required: true,
  17034. type: "string"
  17035. },
  17036. page: {
  17037. type: "integer"
  17038. },
  17039. per_page: {
  17040. type: "integer"
  17041. },
  17042. ref: {
  17043. alias: "commit_sha",
  17044. deprecated: true,
  17045. type: "string"
  17046. },
  17047. repo: {
  17048. required: true,
  17049. type: "string"
  17050. }
  17051. },
  17052. url: "/repos/:owner/:repo/commits/:commit_sha/comments"
  17053. },
  17054. listCommitComments: {
  17055. method: "GET",
  17056. params: {
  17057. owner: {
  17058. required: true,
  17059. type: "string"
  17060. },
  17061. page: {
  17062. type: "integer"
  17063. },
  17064. per_page: {
  17065. type: "integer"
  17066. },
  17067. repo: {
  17068. required: true,
  17069. type: "string"
  17070. }
  17071. },
  17072. url: "/repos/:owner/:repo/comments"
  17073. },
  17074. listCommits: {
  17075. method: "GET",
  17076. params: {
  17077. author: {
  17078. type: "string"
  17079. },
  17080. owner: {
  17081. required: true,
  17082. type: "string"
  17083. },
  17084. page: {
  17085. type: "integer"
  17086. },
  17087. path: {
  17088. type: "string"
  17089. },
  17090. per_page: {
  17091. type: "integer"
  17092. },
  17093. repo: {
  17094. required: true,
  17095. type: "string"
  17096. },
  17097. sha: {
  17098. type: "string"
  17099. },
  17100. since: {
  17101. type: "string"
  17102. },
  17103. until: {
  17104. type: "string"
  17105. }
  17106. },
  17107. url: "/repos/:owner/:repo/commits"
  17108. },
  17109. listContributors: {
  17110. method: "GET",
  17111. params: {
  17112. anon: {
  17113. type: "string"
  17114. },
  17115. owner: {
  17116. required: true,
  17117. type: "string"
  17118. },
  17119. page: {
  17120. type: "integer"
  17121. },
  17122. per_page: {
  17123. type: "integer"
  17124. },
  17125. repo: {
  17126. required: true,
  17127. type: "string"
  17128. }
  17129. },
  17130. url: "/repos/:owner/:repo/contributors"
  17131. },
  17132. listDeployKeys: {
  17133. method: "GET",
  17134. params: {
  17135. owner: {
  17136. required: true,
  17137. type: "string"
  17138. },
  17139. page: {
  17140. type: "integer"
  17141. },
  17142. per_page: {
  17143. type: "integer"
  17144. },
  17145. repo: {
  17146. required: true,
  17147. type: "string"
  17148. }
  17149. },
  17150. url: "/repos/:owner/:repo/keys"
  17151. },
  17152. listDeploymentStatuses: {
  17153. method: "GET",
  17154. params: {
  17155. deployment_id: {
  17156. required: true,
  17157. type: "integer"
  17158. },
  17159. owner: {
  17160. required: true,
  17161. type: "string"
  17162. },
  17163. page: {
  17164. type: "integer"
  17165. },
  17166. per_page: {
  17167. type: "integer"
  17168. },
  17169. repo: {
  17170. required: true,
  17171. type: "string"
  17172. }
  17173. },
  17174. url: "/repos/:owner/:repo/deployments/:deployment_id/statuses"
  17175. },
  17176. listDeployments: {
  17177. method: "GET",
  17178. params: {
  17179. environment: {
  17180. type: "string"
  17181. },
  17182. owner: {
  17183. required: true,
  17184. type: "string"
  17185. },
  17186. page: {
  17187. type: "integer"
  17188. },
  17189. per_page: {
  17190. type: "integer"
  17191. },
  17192. ref: {
  17193. type: "string"
  17194. },
  17195. repo: {
  17196. required: true,
  17197. type: "string"
  17198. },
  17199. sha: {
  17200. type: "string"
  17201. },
  17202. task: {
  17203. type: "string"
  17204. }
  17205. },
  17206. url: "/repos/:owner/:repo/deployments"
  17207. },
  17208. listDownloads: {
  17209. method: "GET",
  17210. params: {
  17211. owner: {
  17212. required: true,
  17213. type: "string"
  17214. },
  17215. page: {
  17216. type: "integer"
  17217. },
  17218. per_page: {
  17219. type: "integer"
  17220. },
  17221. repo: {
  17222. required: true,
  17223. type: "string"
  17224. }
  17225. },
  17226. url: "/repos/:owner/:repo/downloads"
  17227. },
  17228. listForOrg: {
  17229. method: "GET",
  17230. params: {
  17231. direction: {
  17232. enum: ["asc", "desc"],
  17233. type: "string"
  17234. },
  17235. org: {
  17236. required: true,
  17237. type: "string"
  17238. },
  17239. page: {
  17240. type: "integer"
  17241. },
  17242. per_page: {
  17243. type: "integer"
  17244. },
  17245. sort: {
  17246. enum: ["created", "updated", "pushed", "full_name"],
  17247. type: "string"
  17248. },
  17249. type: {
  17250. enum: ["all", "public", "private", "forks", "sources", "member", "internal"],
  17251. type: "string"
  17252. }
  17253. },
  17254. url: "/orgs/:org/repos"
  17255. },
  17256. listForUser: {
  17257. method: "GET",
  17258. params: {
  17259. direction: {
  17260. enum: ["asc", "desc"],
  17261. type: "string"
  17262. },
  17263. page: {
  17264. type: "integer"
  17265. },
  17266. per_page: {
  17267. type: "integer"
  17268. },
  17269. sort: {
  17270. enum: ["created", "updated", "pushed", "full_name"],
  17271. type: "string"
  17272. },
  17273. type: {
  17274. enum: ["all", "owner", "member"],
  17275. type: "string"
  17276. },
  17277. username: {
  17278. required: true,
  17279. type: "string"
  17280. }
  17281. },
  17282. url: "/users/:username/repos"
  17283. },
  17284. listForks: {
  17285. method: "GET",
  17286. params: {
  17287. owner: {
  17288. required: true,
  17289. type: "string"
  17290. },
  17291. page: {
  17292. type: "integer"
  17293. },
  17294. per_page: {
  17295. type: "integer"
  17296. },
  17297. repo: {
  17298. required: true,
  17299. type: "string"
  17300. },
  17301. sort: {
  17302. enum: ["newest", "oldest", "stargazers"],
  17303. type: "string"
  17304. }
  17305. },
  17306. url: "/repos/:owner/:repo/forks"
  17307. },
  17308. listHooks: {
  17309. method: "GET",
  17310. params: {
  17311. owner: {
  17312. required: true,
  17313. type: "string"
  17314. },
  17315. page: {
  17316. type: "integer"
  17317. },
  17318. per_page: {
  17319. type: "integer"
  17320. },
  17321. repo: {
  17322. required: true,
  17323. type: "string"
  17324. }
  17325. },
  17326. url: "/repos/:owner/:repo/hooks"
  17327. },
  17328. listInvitations: {
  17329. method: "GET",
  17330. params: {
  17331. owner: {
  17332. required: true,
  17333. type: "string"
  17334. },
  17335. page: {
  17336. type: "integer"
  17337. },
  17338. per_page: {
  17339. type: "integer"
  17340. },
  17341. repo: {
  17342. required: true,
  17343. type: "string"
  17344. }
  17345. },
  17346. url: "/repos/:owner/:repo/invitations"
  17347. },
  17348. listInvitationsForAuthenticatedUser: {
  17349. method: "GET",
  17350. params: {
  17351. page: {
  17352. type: "integer"
  17353. },
  17354. per_page: {
  17355. type: "integer"
  17356. }
  17357. },
  17358. url: "/user/repository_invitations"
  17359. },
  17360. listLanguages: {
  17361. method: "GET",
  17362. params: {
  17363. owner: {
  17364. required: true,
  17365. type: "string"
  17366. },
  17367. repo: {
  17368. required: true,
  17369. type: "string"
  17370. }
  17371. },
  17372. url: "/repos/:owner/:repo/languages"
  17373. },
  17374. listPagesBuilds: {
  17375. method: "GET",
  17376. params: {
  17377. owner: {
  17378. required: true,
  17379. type: "string"
  17380. },
  17381. page: {
  17382. type: "integer"
  17383. },
  17384. per_page: {
  17385. type: "integer"
  17386. },
  17387. repo: {
  17388. required: true,
  17389. type: "string"
  17390. }
  17391. },
  17392. url: "/repos/:owner/:repo/pages/builds"
  17393. },
  17394. listProtectedBranchRequiredStatusChecksContexts: {
  17395. method: "GET",
  17396. params: {
  17397. branch: {
  17398. required: true,
  17399. type: "string"
  17400. },
  17401. owner: {
  17402. required: true,
  17403. type: "string"
  17404. },
  17405. repo: {
  17406. required: true,
  17407. type: "string"
  17408. }
  17409. },
  17410. url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"
  17411. },
  17412. listProtectedBranchTeamRestrictions: {
  17413. deprecated: "octokit.repos.listProtectedBranchTeamRestrictions() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-09)",
  17414. method: "GET",
  17415. params: {
  17416. branch: {
  17417. required: true,
  17418. type: "string"
  17419. },
  17420. owner: {
  17421. required: true,
  17422. type: "string"
  17423. },
  17424. repo: {
  17425. required: true,
  17426. type: "string"
  17427. }
  17428. },
  17429. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
  17430. },
  17431. listProtectedBranchUserRestrictions: {
  17432. deprecated: "octokit.repos.listProtectedBranchUserRestrictions() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-09)",
  17433. method: "GET",
  17434. params: {
  17435. branch: {
  17436. required: true,
  17437. type: "string"
  17438. },
  17439. owner: {
  17440. required: true,
  17441. type: "string"
  17442. },
  17443. repo: {
  17444. required: true,
  17445. type: "string"
  17446. }
  17447. },
  17448. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
  17449. },
  17450. listPublic: {
  17451. method: "GET",
  17452. params: {
  17453. page: {
  17454. type: "integer"
  17455. },
  17456. per_page: {
  17457. type: "integer"
  17458. },
  17459. since: {
  17460. type: "integer"
  17461. }
  17462. },
  17463. url: "/repositories"
  17464. },
  17465. listPullRequestsAssociatedWithCommit: {
  17466. headers: {
  17467. accept: "application/vnd.github.groot-preview+json"
  17468. },
  17469. method: "GET",
  17470. params: {
  17471. commit_sha: {
  17472. required: true,
  17473. type: "string"
  17474. },
  17475. owner: {
  17476. required: true,
  17477. type: "string"
  17478. },
  17479. page: {
  17480. type: "integer"
  17481. },
  17482. per_page: {
  17483. type: "integer"
  17484. },
  17485. repo: {
  17486. required: true,
  17487. type: "string"
  17488. }
  17489. },
  17490. url: "/repos/:owner/:repo/commits/:commit_sha/pulls"
  17491. },
  17492. listReleases: {
  17493. method: "GET",
  17494. params: {
  17495. owner: {
  17496. required: true,
  17497. type: "string"
  17498. },
  17499. page: {
  17500. type: "integer"
  17501. },
  17502. per_page: {
  17503. type: "integer"
  17504. },
  17505. repo: {
  17506. required: true,
  17507. type: "string"
  17508. }
  17509. },
  17510. url: "/repos/:owner/:repo/releases"
  17511. },
  17512. listStatusesForRef: {
  17513. method: "GET",
  17514. params: {
  17515. owner: {
  17516. required: true,
  17517. type: "string"
  17518. },
  17519. page: {
  17520. type: "integer"
  17521. },
  17522. per_page: {
  17523. type: "integer"
  17524. },
  17525. ref: {
  17526. required: true,
  17527. type: "string"
  17528. },
  17529. repo: {
  17530. required: true,
  17531. type: "string"
  17532. }
  17533. },
  17534. url: "/repos/:owner/:repo/commits/:ref/statuses"
  17535. },
  17536. listTags: {
  17537. method: "GET",
  17538. params: {
  17539. owner: {
  17540. required: true,
  17541. type: "string"
  17542. },
  17543. page: {
  17544. type: "integer"
  17545. },
  17546. per_page: {
  17547. type: "integer"
  17548. },
  17549. repo: {
  17550. required: true,
  17551. type: "string"
  17552. }
  17553. },
  17554. url: "/repos/:owner/:repo/tags"
  17555. },
  17556. listTeams: {
  17557. method: "GET",
  17558. params: {
  17559. owner: {
  17560. required: true,
  17561. type: "string"
  17562. },
  17563. page: {
  17564. type: "integer"
  17565. },
  17566. per_page: {
  17567. type: "integer"
  17568. },
  17569. repo: {
  17570. required: true,
  17571. type: "string"
  17572. }
  17573. },
  17574. url: "/repos/:owner/:repo/teams"
  17575. },
  17576. listTeamsWithAccessToProtectedBranch: {
  17577. deprecated: "octokit.repos.listTeamsWithAccessToProtectedBranch() has been renamed to octokit.repos.getTeamsWithAccessToProtectedBranch() (2019-09-13)",
  17578. method: "GET",
  17579. params: {
  17580. branch: {
  17581. required: true,
  17582. type: "string"
  17583. },
  17584. owner: {
  17585. required: true,
  17586. type: "string"
  17587. },
  17588. repo: {
  17589. required: true,
  17590. type: "string"
  17591. }
  17592. },
  17593. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
  17594. },
  17595. listTopics: {
  17596. headers: {
  17597. accept: "application/vnd.github.mercy-preview+json"
  17598. },
  17599. method: "GET",
  17600. params: {
  17601. owner: {
  17602. required: true,
  17603. type: "string"
  17604. },
  17605. repo: {
  17606. required: true,
  17607. type: "string"
  17608. }
  17609. },
  17610. url: "/repos/:owner/:repo/topics"
  17611. },
  17612. listUsersWithAccessToProtectedBranch: {
  17613. deprecated: "octokit.repos.listUsersWithAccessToProtectedBranch() has been renamed to octokit.repos.getUsersWithAccessToProtectedBranch() (2019-09-13)",
  17614. method: "GET",
  17615. params: {
  17616. branch: {
  17617. required: true,
  17618. type: "string"
  17619. },
  17620. owner: {
  17621. required: true,
  17622. type: "string"
  17623. },
  17624. repo: {
  17625. required: true,
  17626. type: "string"
  17627. }
  17628. },
  17629. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
  17630. },
  17631. merge: {
  17632. method: "POST",
  17633. params: {
  17634. base: {
  17635. required: true,
  17636. type: "string"
  17637. },
  17638. commit_message: {
  17639. type: "string"
  17640. },
  17641. head: {
  17642. required: true,
  17643. type: "string"
  17644. },
  17645. owner: {
  17646. required: true,
  17647. type: "string"
  17648. },
  17649. repo: {
  17650. required: true,
  17651. type: "string"
  17652. }
  17653. },
  17654. url: "/repos/:owner/:repo/merges"
  17655. },
  17656. pingHook: {
  17657. method: "POST",
  17658. params: {
  17659. hook_id: {
  17660. required: true,
  17661. type: "integer"
  17662. },
  17663. owner: {
  17664. required: true,
  17665. type: "string"
  17666. },
  17667. repo: {
  17668. required: true,
  17669. type: "string"
  17670. }
  17671. },
  17672. url: "/repos/:owner/:repo/hooks/:hook_id/pings"
  17673. },
  17674. removeBranchProtection: {
  17675. method: "DELETE",
  17676. params: {
  17677. branch: {
  17678. required: true,
  17679. type: "string"
  17680. },
  17681. owner: {
  17682. required: true,
  17683. type: "string"
  17684. },
  17685. repo: {
  17686. required: true,
  17687. type: "string"
  17688. }
  17689. },
  17690. url: "/repos/:owner/:repo/branches/:branch/protection"
  17691. },
  17692. removeCollaborator: {
  17693. method: "DELETE",
  17694. params: {
  17695. owner: {
  17696. required: true,
  17697. type: "string"
  17698. },
  17699. repo: {
  17700. required: true,
  17701. type: "string"
  17702. },
  17703. username: {
  17704. required: true,
  17705. type: "string"
  17706. }
  17707. },
  17708. url: "/repos/:owner/:repo/collaborators/:username"
  17709. },
  17710. removeDeployKey: {
  17711. method: "DELETE",
  17712. params: {
  17713. key_id: {
  17714. required: true,
  17715. type: "integer"
  17716. },
  17717. owner: {
  17718. required: true,
  17719. type: "string"
  17720. },
  17721. repo: {
  17722. required: true,
  17723. type: "string"
  17724. }
  17725. },
  17726. url: "/repos/:owner/:repo/keys/:key_id"
  17727. },
  17728. removeProtectedBranchAdminEnforcement: {
  17729. method: "DELETE",
  17730. params: {
  17731. branch: {
  17732. required: true,
  17733. type: "string"
  17734. },
  17735. owner: {
  17736. required: true,
  17737. type: "string"
  17738. },
  17739. repo: {
  17740. required: true,
  17741. type: "string"
  17742. }
  17743. },
  17744. url: "/repos/:owner/:repo/branches/:branch/protection/enforce_admins"
  17745. },
  17746. removeProtectedBranchAppRestrictions: {
  17747. method: "DELETE",
  17748. params: {
  17749. apps: {
  17750. mapTo: "data",
  17751. required: true,
  17752. type: "string[]"
  17753. },
  17754. branch: {
  17755. required: true,
  17756. type: "string"
  17757. },
  17758. owner: {
  17759. required: true,
  17760. type: "string"
  17761. },
  17762. repo: {
  17763. required: true,
  17764. type: "string"
  17765. }
  17766. },
  17767. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"
  17768. },
  17769. removeProtectedBranchPullRequestReviewEnforcement: {
  17770. method: "DELETE",
  17771. params: {
  17772. branch: {
  17773. required: true,
  17774. type: "string"
  17775. },
  17776. owner: {
  17777. required: true,
  17778. type: "string"
  17779. },
  17780. repo: {
  17781. required: true,
  17782. type: "string"
  17783. }
  17784. },
  17785. url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews"
  17786. },
  17787. removeProtectedBranchRequiredSignatures: {
  17788. headers: {
  17789. accept: "application/vnd.github.zzzax-preview+json"
  17790. },
  17791. method: "DELETE",
  17792. params: {
  17793. branch: {
  17794. required: true,
  17795. type: "string"
  17796. },
  17797. owner: {
  17798. required: true,
  17799. type: "string"
  17800. },
  17801. repo: {
  17802. required: true,
  17803. type: "string"
  17804. }
  17805. },
  17806. url: "/repos/:owner/:repo/branches/:branch/protection/required_signatures"
  17807. },
  17808. removeProtectedBranchRequiredStatusChecks: {
  17809. method: "DELETE",
  17810. params: {
  17811. branch: {
  17812. required: true,
  17813. type: "string"
  17814. },
  17815. owner: {
  17816. required: true,
  17817. type: "string"
  17818. },
  17819. repo: {
  17820. required: true,
  17821. type: "string"
  17822. }
  17823. },
  17824. url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks"
  17825. },
  17826. removeProtectedBranchRequiredStatusChecksContexts: {
  17827. method: "DELETE",
  17828. params: {
  17829. branch: {
  17830. required: true,
  17831. type: "string"
  17832. },
  17833. contexts: {
  17834. mapTo: "data",
  17835. required: true,
  17836. type: "string[]"
  17837. },
  17838. owner: {
  17839. required: true,
  17840. type: "string"
  17841. },
  17842. repo: {
  17843. required: true,
  17844. type: "string"
  17845. }
  17846. },
  17847. url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"
  17848. },
  17849. removeProtectedBranchRestrictions: {
  17850. method: "DELETE",
  17851. params: {
  17852. branch: {
  17853. required: true,
  17854. type: "string"
  17855. },
  17856. owner: {
  17857. required: true,
  17858. type: "string"
  17859. },
  17860. repo: {
  17861. required: true,
  17862. type: "string"
  17863. }
  17864. },
  17865. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions"
  17866. },
  17867. removeProtectedBranchTeamRestrictions: {
  17868. method: "DELETE",
  17869. params: {
  17870. branch: {
  17871. required: true,
  17872. type: "string"
  17873. },
  17874. owner: {
  17875. required: true,
  17876. type: "string"
  17877. },
  17878. repo: {
  17879. required: true,
  17880. type: "string"
  17881. },
  17882. teams: {
  17883. mapTo: "data",
  17884. required: true,
  17885. type: "string[]"
  17886. }
  17887. },
  17888. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
  17889. },
  17890. removeProtectedBranchUserRestrictions: {
  17891. method: "DELETE",
  17892. params: {
  17893. branch: {
  17894. required: true,
  17895. type: "string"
  17896. },
  17897. owner: {
  17898. required: true,
  17899. type: "string"
  17900. },
  17901. repo: {
  17902. required: true,
  17903. type: "string"
  17904. },
  17905. users: {
  17906. mapTo: "data",
  17907. required: true,
  17908. type: "string[]"
  17909. }
  17910. },
  17911. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
  17912. },
  17913. replaceProtectedBranchAppRestrictions: {
  17914. method: "PUT",
  17915. params: {
  17916. apps: {
  17917. mapTo: "data",
  17918. required: true,
  17919. type: "string[]"
  17920. },
  17921. branch: {
  17922. required: true,
  17923. type: "string"
  17924. },
  17925. owner: {
  17926. required: true,
  17927. type: "string"
  17928. },
  17929. repo: {
  17930. required: true,
  17931. type: "string"
  17932. }
  17933. },
  17934. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/apps"
  17935. },
  17936. replaceProtectedBranchRequiredStatusChecksContexts: {
  17937. method: "PUT",
  17938. params: {
  17939. branch: {
  17940. required: true,
  17941. type: "string"
  17942. },
  17943. contexts: {
  17944. mapTo: "data",
  17945. required: true,
  17946. type: "string[]"
  17947. },
  17948. owner: {
  17949. required: true,
  17950. type: "string"
  17951. },
  17952. repo: {
  17953. required: true,
  17954. type: "string"
  17955. }
  17956. },
  17957. url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks/contexts"
  17958. },
  17959. replaceProtectedBranchTeamRestrictions: {
  17960. method: "PUT",
  17961. params: {
  17962. branch: {
  17963. required: true,
  17964. type: "string"
  17965. },
  17966. owner: {
  17967. required: true,
  17968. type: "string"
  17969. },
  17970. repo: {
  17971. required: true,
  17972. type: "string"
  17973. },
  17974. teams: {
  17975. mapTo: "data",
  17976. required: true,
  17977. type: "string[]"
  17978. }
  17979. },
  17980. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/teams"
  17981. },
  17982. replaceProtectedBranchUserRestrictions: {
  17983. method: "PUT",
  17984. params: {
  17985. branch: {
  17986. required: true,
  17987. type: "string"
  17988. },
  17989. owner: {
  17990. required: true,
  17991. type: "string"
  17992. },
  17993. repo: {
  17994. required: true,
  17995. type: "string"
  17996. },
  17997. users: {
  17998. mapTo: "data",
  17999. required: true,
  18000. type: "string[]"
  18001. }
  18002. },
  18003. url: "/repos/:owner/:repo/branches/:branch/protection/restrictions/users"
  18004. },
  18005. replaceTopics: {
  18006. headers: {
  18007. accept: "application/vnd.github.mercy-preview+json"
  18008. },
  18009. method: "PUT",
  18010. params: {
  18011. names: {
  18012. required: true,
  18013. type: "string[]"
  18014. },
  18015. owner: {
  18016. required: true,
  18017. type: "string"
  18018. },
  18019. repo: {
  18020. required: true,
  18021. type: "string"
  18022. }
  18023. },
  18024. url: "/repos/:owner/:repo/topics"
  18025. },
  18026. requestPageBuild: {
  18027. method: "POST",
  18028. params: {
  18029. owner: {
  18030. required: true,
  18031. type: "string"
  18032. },
  18033. repo: {
  18034. required: true,
  18035. type: "string"
  18036. }
  18037. },
  18038. url: "/repos/:owner/:repo/pages/builds"
  18039. },
  18040. retrieveCommunityProfileMetrics: {
  18041. method: "GET",
  18042. params: {
  18043. owner: {
  18044. required: true,
  18045. type: "string"
  18046. },
  18047. repo: {
  18048. required: true,
  18049. type: "string"
  18050. }
  18051. },
  18052. url: "/repos/:owner/:repo/community/profile"
  18053. },
  18054. testPushHook: {
  18055. method: "POST",
  18056. params: {
  18057. hook_id: {
  18058. required: true,
  18059. type: "integer"
  18060. },
  18061. owner: {
  18062. required: true,
  18063. type: "string"
  18064. },
  18065. repo: {
  18066. required: true,
  18067. type: "string"
  18068. }
  18069. },
  18070. url: "/repos/:owner/:repo/hooks/:hook_id/tests"
  18071. },
  18072. transfer: {
  18073. method: "POST",
  18074. params: {
  18075. new_owner: {
  18076. type: "string"
  18077. },
  18078. owner: {
  18079. required: true,
  18080. type: "string"
  18081. },
  18082. repo: {
  18083. required: true,
  18084. type: "string"
  18085. },
  18086. team_ids: {
  18087. type: "integer[]"
  18088. }
  18089. },
  18090. url: "/repos/:owner/:repo/transfer"
  18091. },
  18092. update: {
  18093. method: "PATCH",
  18094. params: {
  18095. allow_merge_commit: {
  18096. type: "boolean"
  18097. },
  18098. allow_rebase_merge: {
  18099. type: "boolean"
  18100. },
  18101. allow_squash_merge: {
  18102. type: "boolean"
  18103. },
  18104. archived: {
  18105. type: "boolean"
  18106. },
  18107. default_branch: {
  18108. type: "string"
  18109. },
  18110. delete_branch_on_merge: {
  18111. type: "boolean"
  18112. },
  18113. description: {
  18114. type: "string"
  18115. },
  18116. has_issues: {
  18117. type: "boolean"
  18118. },
  18119. has_projects: {
  18120. type: "boolean"
  18121. },
  18122. has_wiki: {
  18123. type: "boolean"
  18124. },
  18125. homepage: {
  18126. type: "string"
  18127. },
  18128. is_template: {
  18129. type: "boolean"
  18130. },
  18131. name: {
  18132. type: "string"
  18133. },
  18134. owner: {
  18135. required: true,
  18136. type: "string"
  18137. },
  18138. private: {
  18139. type: "boolean"
  18140. },
  18141. repo: {
  18142. required: true,
  18143. type: "string"
  18144. },
  18145. visibility: {
  18146. enum: ["public", "private", "visibility", "internal"],
  18147. type: "string"
  18148. }
  18149. },
  18150. url: "/repos/:owner/:repo"
  18151. },
  18152. updateBranchProtection: {
  18153. method: "PUT",
  18154. params: {
  18155. allow_deletions: {
  18156. type: "boolean"
  18157. },
  18158. allow_force_pushes: {
  18159. allowNull: true,
  18160. type: "boolean"
  18161. },
  18162. branch: {
  18163. required: true,
  18164. type: "string"
  18165. },
  18166. enforce_admins: {
  18167. allowNull: true,
  18168. required: true,
  18169. type: "boolean"
  18170. },
  18171. owner: {
  18172. required: true,
  18173. type: "string"
  18174. },
  18175. repo: {
  18176. required: true,
  18177. type: "string"
  18178. },
  18179. required_linear_history: {
  18180. type: "boolean"
  18181. },
  18182. required_pull_request_reviews: {
  18183. allowNull: true,
  18184. required: true,
  18185. type: "object"
  18186. },
  18187. "required_pull_request_reviews.dismiss_stale_reviews": {
  18188. type: "boolean"
  18189. },
  18190. "required_pull_request_reviews.dismissal_restrictions": {
  18191. type: "object"
  18192. },
  18193. "required_pull_request_reviews.dismissal_restrictions.teams": {
  18194. type: "string[]"
  18195. },
  18196. "required_pull_request_reviews.dismissal_restrictions.users": {
  18197. type: "string[]"
  18198. },
  18199. "required_pull_request_reviews.require_code_owner_reviews": {
  18200. type: "boolean"
  18201. },
  18202. "required_pull_request_reviews.required_approving_review_count": {
  18203. type: "integer"
  18204. },
  18205. required_status_checks: {
  18206. allowNull: true,
  18207. required: true,
  18208. type: "object"
  18209. },
  18210. "required_status_checks.contexts": {
  18211. required: true,
  18212. type: "string[]"
  18213. },
  18214. "required_status_checks.strict": {
  18215. required: true,
  18216. type: "boolean"
  18217. },
  18218. restrictions: {
  18219. allowNull: true,
  18220. required: true,
  18221. type: "object"
  18222. },
  18223. "restrictions.apps": {
  18224. type: "string[]"
  18225. },
  18226. "restrictions.teams": {
  18227. required: true,
  18228. type: "string[]"
  18229. },
  18230. "restrictions.users": {
  18231. required: true,
  18232. type: "string[]"
  18233. }
  18234. },
  18235. url: "/repos/:owner/:repo/branches/:branch/protection"
  18236. },
  18237. updateCommitComment: {
  18238. method: "PATCH",
  18239. params: {
  18240. body: {
  18241. required: true,
  18242. type: "string"
  18243. },
  18244. comment_id: {
  18245. required: true,
  18246. type: "integer"
  18247. },
  18248. owner: {
  18249. required: true,
  18250. type: "string"
  18251. },
  18252. repo: {
  18253. required: true,
  18254. type: "string"
  18255. }
  18256. },
  18257. url: "/repos/:owner/:repo/comments/:comment_id"
  18258. },
  18259. updateFile: {
  18260. deprecated: "octokit.repos.updateFile() has been renamed to octokit.repos.createOrUpdateFile() (2019-06-07)",
  18261. method: "PUT",
  18262. params: {
  18263. author: {
  18264. type: "object"
  18265. },
  18266. "author.email": {
  18267. required: true,
  18268. type: "string"
  18269. },
  18270. "author.name": {
  18271. required: true,
  18272. type: "string"
  18273. },
  18274. branch: {
  18275. type: "string"
  18276. },
  18277. committer: {
  18278. type: "object"
  18279. },
  18280. "committer.email": {
  18281. required: true,
  18282. type: "string"
  18283. },
  18284. "committer.name": {
  18285. required: true,
  18286. type: "string"
  18287. },
  18288. content: {
  18289. required: true,
  18290. type: "string"
  18291. },
  18292. message: {
  18293. required: true,
  18294. type: "string"
  18295. },
  18296. owner: {
  18297. required: true,
  18298. type: "string"
  18299. },
  18300. path: {
  18301. required: true,
  18302. type: "string"
  18303. },
  18304. repo: {
  18305. required: true,
  18306. type: "string"
  18307. },
  18308. sha: {
  18309. type: "string"
  18310. }
  18311. },
  18312. url: "/repos/:owner/:repo/contents/:path"
  18313. },
  18314. updateHook: {
  18315. method: "PATCH",
  18316. params: {
  18317. active: {
  18318. type: "boolean"
  18319. },
  18320. add_events: {
  18321. type: "string[]"
  18322. },
  18323. config: {
  18324. type: "object"
  18325. },
  18326. "config.content_type": {
  18327. type: "string"
  18328. },
  18329. "config.insecure_ssl": {
  18330. type: "string"
  18331. },
  18332. "config.secret": {
  18333. type: "string"
  18334. },
  18335. "config.url": {
  18336. required: true,
  18337. type: "string"
  18338. },
  18339. events: {
  18340. type: "string[]"
  18341. },
  18342. hook_id: {
  18343. required: true,
  18344. type: "integer"
  18345. },
  18346. owner: {
  18347. required: true,
  18348. type: "string"
  18349. },
  18350. remove_events: {
  18351. type: "string[]"
  18352. },
  18353. repo: {
  18354. required: true,
  18355. type: "string"
  18356. }
  18357. },
  18358. url: "/repos/:owner/:repo/hooks/:hook_id"
  18359. },
  18360. updateInformationAboutPagesSite: {
  18361. method: "PUT",
  18362. params: {
  18363. cname: {
  18364. type: "string"
  18365. },
  18366. owner: {
  18367. required: true,
  18368. type: "string"
  18369. },
  18370. repo: {
  18371. required: true,
  18372. type: "string"
  18373. },
  18374. source: {
  18375. enum: ['"gh-pages"', '"master"', '"master /docs"'],
  18376. type: "string"
  18377. }
  18378. },
  18379. url: "/repos/:owner/:repo/pages"
  18380. },
  18381. updateInvitation: {
  18382. method: "PATCH",
  18383. params: {
  18384. invitation_id: {
  18385. required: true,
  18386. type: "integer"
  18387. },
  18388. owner: {
  18389. required: true,
  18390. type: "string"
  18391. },
  18392. permissions: {
  18393. enum: ["read", "write", "admin"],
  18394. type: "string"
  18395. },
  18396. repo: {
  18397. required: true,
  18398. type: "string"
  18399. }
  18400. },
  18401. url: "/repos/:owner/:repo/invitations/:invitation_id"
  18402. },
  18403. updateProtectedBranchPullRequestReviewEnforcement: {
  18404. method: "PATCH",
  18405. params: {
  18406. branch: {
  18407. required: true,
  18408. type: "string"
  18409. },
  18410. dismiss_stale_reviews: {
  18411. type: "boolean"
  18412. },
  18413. dismissal_restrictions: {
  18414. type: "object"
  18415. },
  18416. "dismissal_restrictions.teams": {
  18417. type: "string[]"
  18418. },
  18419. "dismissal_restrictions.users": {
  18420. type: "string[]"
  18421. },
  18422. owner: {
  18423. required: true,
  18424. type: "string"
  18425. },
  18426. repo: {
  18427. required: true,
  18428. type: "string"
  18429. },
  18430. require_code_owner_reviews: {
  18431. type: "boolean"
  18432. },
  18433. required_approving_review_count: {
  18434. type: "integer"
  18435. }
  18436. },
  18437. url: "/repos/:owner/:repo/branches/:branch/protection/required_pull_request_reviews"
  18438. },
  18439. updateProtectedBranchRequiredStatusChecks: {
  18440. method: "PATCH",
  18441. params: {
  18442. branch: {
  18443. required: true,
  18444. type: "string"
  18445. },
  18446. contexts: {
  18447. type: "string[]"
  18448. },
  18449. owner: {
  18450. required: true,
  18451. type: "string"
  18452. },
  18453. repo: {
  18454. required: true,
  18455. type: "string"
  18456. },
  18457. strict: {
  18458. type: "boolean"
  18459. }
  18460. },
  18461. url: "/repos/:owner/:repo/branches/:branch/protection/required_status_checks"
  18462. },
  18463. updateRelease: {
  18464. method: "PATCH",
  18465. params: {
  18466. body: {
  18467. type: "string"
  18468. },
  18469. draft: {
  18470. type: "boolean"
  18471. },
  18472. name: {
  18473. type: "string"
  18474. },
  18475. owner: {
  18476. required: true,
  18477. type: "string"
  18478. },
  18479. prerelease: {
  18480. type: "boolean"
  18481. },
  18482. release_id: {
  18483. required: true,
  18484. type: "integer"
  18485. },
  18486. repo: {
  18487. required: true,
  18488. type: "string"
  18489. },
  18490. tag_name: {
  18491. type: "string"
  18492. },
  18493. target_commitish: {
  18494. type: "string"
  18495. }
  18496. },
  18497. url: "/repos/:owner/:repo/releases/:release_id"
  18498. },
  18499. updateReleaseAsset: {
  18500. method: "PATCH",
  18501. params: {
  18502. asset_id: {
  18503. required: true,
  18504. type: "integer"
  18505. },
  18506. label: {
  18507. type: "string"
  18508. },
  18509. name: {
  18510. type: "string"
  18511. },
  18512. owner: {
  18513. required: true,
  18514. type: "string"
  18515. },
  18516. repo: {
  18517. required: true,
  18518. type: "string"
  18519. }
  18520. },
  18521. url: "/repos/:owner/:repo/releases/assets/:asset_id"
  18522. },
  18523. uploadReleaseAsset: {
  18524. method: "POST",
  18525. params: {
  18526. data: {
  18527. mapTo: "data",
  18528. required: true,
  18529. type: "string | object"
  18530. },
  18531. file: {
  18532. alias: "data",
  18533. deprecated: true,
  18534. type: "string | object"
  18535. },
  18536. headers: {
  18537. required: true,
  18538. type: "object"
  18539. },
  18540. "headers.content-length": {
  18541. required: true,
  18542. type: "integer"
  18543. },
  18544. "headers.content-type": {
  18545. required: true,
  18546. type: "string"
  18547. },
  18548. label: {
  18549. type: "string"
  18550. },
  18551. name: {
  18552. required: true,
  18553. type: "string"
  18554. },
  18555. url: {
  18556. required: true,
  18557. type: "string"
  18558. }
  18559. },
  18560. url: ":url"
  18561. }
  18562. },
  18563. search: {
  18564. code: {
  18565. method: "GET",
  18566. params: {
  18567. order: {
  18568. enum: ["desc", "asc"],
  18569. type: "string"
  18570. },
  18571. page: {
  18572. type: "integer"
  18573. },
  18574. per_page: {
  18575. type: "integer"
  18576. },
  18577. q: {
  18578. required: true,
  18579. type: "string"
  18580. },
  18581. sort: {
  18582. enum: ["indexed"],
  18583. type: "string"
  18584. }
  18585. },
  18586. url: "/search/code"
  18587. },
  18588. commits: {
  18589. headers: {
  18590. accept: "application/vnd.github.cloak-preview+json"
  18591. },
  18592. method: "GET",
  18593. params: {
  18594. order: {
  18595. enum: ["desc", "asc"],
  18596. type: "string"
  18597. },
  18598. page: {
  18599. type: "integer"
  18600. },
  18601. per_page: {
  18602. type: "integer"
  18603. },
  18604. q: {
  18605. required: true,
  18606. type: "string"
  18607. },
  18608. sort: {
  18609. enum: ["author-date", "committer-date"],
  18610. type: "string"
  18611. }
  18612. },
  18613. url: "/search/commits"
  18614. },
  18615. issues: {
  18616. deprecated: "octokit.search.issues() has been renamed to octokit.search.issuesAndPullRequests() (2018-12-27)",
  18617. method: "GET",
  18618. params: {
  18619. order: {
  18620. enum: ["desc", "asc"],
  18621. type: "string"
  18622. },
  18623. page: {
  18624. type: "integer"
  18625. },
  18626. per_page: {
  18627. type: "integer"
  18628. },
  18629. q: {
  18630. required: true,
  18631. type: "string"
  18632. },
  18633. sort: {
  18634. enum: ["comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"],
  18635. type: "string"
  18636. }
  18637. },
  18638. url: "/search/issues"
  18639. },
  18640. issuesAndPullRequests: {
  18641. method: "GET",
  18642. params: {
  18643. order: {
  18644. enum: ["desc", "asc"],
  18645. type: "string"
  18646. },
  18647. page: {
  18648. type: "integer"
  18649. },
  18650. per_page: {
  18651. type: "integer"
  18652. },
  18653. q: {
  18654. required: true,
  18655. type: "string"
  18656. },
  18657. sort: {
  18658. enum: ["comments", "reactions", "reactions-+1", "reactions--1", "reactions-smile", "reactions-thinking_face", "reactions-heart", "reactions-tada", "interactions", "created", "updated"],
  18659. type: "string"
  18660. }
  18661. },
  18662. url: "/search/issues"
  18663. },
  18664. labels: {
  18665. method: "GET",
  18666. params: {
  18667. order: {
  18668. enum: ["desc", "asc"],
  18669. type: "string"
  18670. },
  18671. q: {
  18672. required: true,
  18673. type: "string"
  18674. },
  18675. repository_id: {
  18676. required: true,
  18677. type: "integer"
  18678. },
  18679. sort: {
  18680. enum: ["created", "updated"],
  18681. type: "string"
  18682. }
  18683. },
  18684. url: "/search/labels"
  18685. },
  18686. repos: {
  18687. method: "GET",
  18688. params: {
  18689. order: {
  18690. enum: ["desc", "asc"],
  18691. type: "string"
  18692. },
  18693. page: {
  18694. type: "integer"
  18695. },
  18696. per_page: {
  18697. type: "integer"
  18698. },
  18699. q: {
  18700. required: true,
  18701. type: "string"
  18702. },
  18703. sort: {
  18704. enum: ["stars", "forks", "help-wanted-issues", "updated"],
  18705. type: "string"
  18706. }
  18707. },
  18708. url: "/search/repositories"
  18709. },
  18710. topics: {
  18711. method: "GET",
  18712. params: {
  18713. q: {
  18714. required: true,
  18715. type: "string"
  18716. }
  18717. },
  18718. url: "/search/topics"
  18719. },
  18720. users: {
  18721. method: "GET",
  18722. params: {
  18723. order: {
  18724. enum: ["desc", "asc"],
  18725. type: "string"
  18726. },
  18727. page: {
  18728. type: "integer"
  18729. },
  18730. per_page: {
  18731. type: "integer"
  18732. },
  18733. q: {
  18734. required: true,
  18735. type: "string"
  18736. },
  18737. sort: {
  18738. enum: ["followers", "repositories", "joined"],
  18739. type: "string"
  18740. }
  18741. },
  18742. url: "/search/users"
  18743. }
  18744. },
  18745. teams: {
  18746. addMember: {
  18747. deprecated: "octokit.teams.addMember() has been renamed to octokit.teams.addMemberLegacy() (2020-01-16)",
  18748. method: "PUT",
  18749. params: {
  18750. team_id: {
  18751. required: true,
  18752. type: "integer"
  18753. },
  18754. username: {
  18755. required: true,
  18756. type: "string"
  18757. }
  18758. },
  18759. url: "/teams/:team_id/members/:username"
  18760. },
  18761. addMemberLegacy: {
  18762. deprecated: "octokit.teams.addMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-team-member-legacy",
  18763. method: "PUT",
  18764. params: {
  18765. team_id: {
  18766. required: true,
  18767. type: "integer"
  18768. },
  18769. username: {
  18770. required: true,
  18771. type: "string"
  18772. }
  18773. },
  18774. url: "/teams/:team_id/members/:username"
  18775. },
  18776. addOrUpdateMembership: {
  18777. deprecated: "octokit.teams.addOrUpdateMembership() has been renamed to octokit.teams.addOrUpdateMembershipLegacy() (2020-01-16)",
  18778. method: "PUT",
  18779. params: {
  18780. role: {
  18781. enum: ["member", "maintainer"],
  18782. type: "string"
  18783. },
  18784. team_id: {
  18785. required: true,
  18786. type: "integer"
  18787. },
  18788. username: {
  18789. required: true,
  18790. type: "string"
  18791. }
  18792. },
  18793. url: "/teams/:team_id/memberships/:username"
  18794. },
  18795. addOrUpdateMembershipInOrg: {
  18796. method: "PUT",
  18797. params: {
  18798. org: {
  18799. required: true,
  18800. type: "string"
  18801. },
  18802. role: {
  18803. enum: ["member", "maintainer"],
  18804. type: "string"
  18805. },
  18806. team_slug: {
  18807. required: true,
  18808. type: "string"
  18809. },
  18810. username: {
  18811. required: true,
  18812. type: "string"
  18813. }
  18814. },
  18815. url: "/orgs/:org/teams/:team_slug/memberships/:username"
  18816. },
  18817. addOrUpdateMembershipLegacy: {
  18818. deprecated: "octokit.teams.addOrUpdateMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#add-or-update-team-membership-legacy",
  18819. method: "PUT",
  18820. params: {
  18821. role: {
  18822. enum: ["member", "maintainer"],
  18823. type: "string"
  18824. },
  18825. team_id: {
  18826. required: true,
  18827. type: "integer"
  18828. },
  18829. username: {
  18830. required: true,
  18831. type: "string"
  18832. }
  18833. },
  18834. url: "/teams/:team_id/memberships/:username"
  18835. },
  18836. addOrUpdateProject: {
  18837. deprecated: "octokit.teams.addOrUpdateProject() has been renamed to octokit.teams.addOrUpdateProjectLegacy() (2020-01-16)",
  18838. headers: {
  18839. accept: "application/vnd.github.inertia-preview+json"
  18840. },
  18841. method: "PUT",
  18842. params: {
  18843. permission: {
  18844. enum: ["read", "write", "admin"],
  18845. type: "string"
  18846. },
  18847. project_id: {
  18848. required: true,
  18849. type: "integer"
  18850. },
  18851. team_id: {
  18852. required: true,
  18853. type: "integer"
  18854. }
  18855. },
  18856. url: "/teams/:team_id/projects/:project_id"
  18857. },
  18858. addOrUpdateProjectInOrg: {
  18859. headers: {
  18860. accept: "application/vnd.github.inertia-preview+json"
  18861. },
  18862. method: "PUT",
  18863. params: {
  18864. org: {
  18865. required: true,
  18866. type: "string"
  18867. },
  18868. permission: {
  18869. enum: ["read", "write", "admin"],
  18870. type: "string"
  18871. },
  18872. project_id: {
  18873. required: true,
  18874. type: "integer"
  18875. },
  18876. team_slug: {
  18877. required: true,
  18878. type: "string"
  18879. }
  18880. },
  18881. url: "/orgs/:org/teams/:team_slug/projects/:project_id"
  18882. },
  18883. addOrUpdateProjectLegacy: {
  18884. deprecated: "octokit.teams.addOrUpdateProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-project-legacy",
  18885. headers: {
  18886. accept: "application/vnd.github.inertia-preview+json"
  18887. },
  18888. method: "PUT",
  18889. params: {
  18890. permission: {
  18891. enum: ["read", "write", "admin"],
  18892. type: "string"
  18893. },
  18894. project_id: {
  18895. required: true,
  18896. type: "integer"
  18897. },
  18898. team_id: {
  18899. required: true,
  18900. type: "integer"
  18901. }
  18902. },
  18903. url: "/teams/:team_id/projects/:project_id"
  18904. },
  18905. addOrUpdateRepo: {
  18906. deprecated: "octokit.teams.addOrUpdateRepo() has been renamed to octokit.teams.addOrUpdateRepoLegacy() (2020-01-16)",
  18907. method: "PUT",
  18908. params: {
  18909. owner: {
  18910. required: true,
  18911. type: "string"
  18912. },
  18913. permission: {
  18914. enum: ["pull", "push", "admin"],
  18915. type: "string"
  18916. },
  18917. repo: {
  18918. required: true,
  18919. type: "string"
  18920. },
  18921. team_id: {
  18922. required: true,
  18923. type: "integer"
  18924. }
  18925. },
  18926. url: "/teams/:team_id/repos/:owner/:repo"
  18927. },
  18928. addOrUpdateRepoInOrg: {
  18929. method: "PUT",
  18930. params: {
  18931. org: {
  18932. required: true,
  18933. type: "string"
  18934. },
  18935. owner: {
  18936. required: true,
  18937. type: "string"
  18938. },
  18939. permission: {
  18940. enum: ["pull", "push", "admin"],
  18941. type: "string"
  18942. },
  18943. repo: {
  18944. required: true,
  18945. type: "string"
  18946. },
  18947. team_slug: {
  18948. required: true,
  18949. type: "string"
  18950. }
  18951. },
  18952. url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo"
  18953. },
  18954. addOrUpdateRepoLegacy: {
  18955. deprecated: "octokit.teams.addOrUpdateRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#add-or-update-team-repository-legacy",
  18956. method: "PUT",
  18957. params: {
  18958. owner: {
  18959. required: true,
  18960. type: "string"
  18961. },
  18962. permission: {
  18963. enum: ["pull", "push", "admin"],
  18964. type: "string"
  18965. },
  18966. repo: {
  18967. required: true,
  18968. type: "string"
  18969. },
  18970. team_id: {
  18971. required: true,
  18972. type: "integer"
  18973. }
  18974. },
  18975. url: "/teams/:team_id/repos/:owner/:repo"
  18976. },
  18977. checkManagesRepo: {
  18978. deprecated: "octokit.teams.checkManagesRepo() has been renamed to octokit.teams.checkManagesRepoLegacy() (2020-01-16)",
  18979. method: "GET",
  18980. params: {
  18981. owner: {
  18982. required: true,
  18983. type: "string"
  18984. },
  18985. repo: {
  18986. required: true,
  18987. type: "string"
  18988. },
  18989. team_id: {
  18990. required: true,
  18991. type: "integer"
  18992. }
  18993. },
  18994. url: "/teams/:team_id/repos/:owner/:repo"
  18995. },
  18996. checkManagesRepoInOrg: {
  18997. method: "GET",
  18998. params: {
  18999. org: {
  19000. required: true,
  19001. type: "string"
  19002. },
  19003. owner: {
  19004. required: true,
  19005. type: "string"
  19006. },
  19007. repo: {
  19008. required: true,
  19009. type: "string"
  19010. },
  19011. team_slug: {
  19012. required: true,
  19013. type: "string"
  19014. }
  19015. },
  19016. url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo"
  19017. },
  19018. checkManagesRepoLegacy: {
  19019. deprecated: "octokit.teams.checkManagesRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#check-if-a-team-manages-a-repository-legacy",
  19020. method: "GET",
  19021. params: {
  19022. owner: {
  19023. required: true,
  19024. type: "string"
  19025. },
  19026. repo: {
  19027. required: true,
  19028. type: "string"
  19029. },
  19030. team_id: {
  19031. required: true,
  19032. type: "integer"
  19033. }
  19034. },
  19035. url: "/teams/:team_id/repos/:owner/:repo"
  19036. },
  19037. create: {
  19038. method: "POST",
  19039. params: {
  19040. description: {
  19041. type: "string"
  19042. },
  19043. maintainers: {
  19044. type: "string[]"
  19045. },
  19046. name: {
  19047. required: true,
  19048. type: "string"
  19049. },
  19050. org: {
  19051. required: true,
  19052. type: "string"
  19053. },
  19054. parent_team_id: {
  19055. type: "integer"
  19056. },
  19057. permission: {
  19058. enum: ["pull", "push", "admin"],
  19059. type: "string"
  19060. },
  19061. privacy: {
  19062. enum: ["secret", "closed"],
  19063. type: "string"
  19064. },
  19065. repo_names: {
  19066. type: "string[]"
  19067. }
  19068. },
  19069. url: "/orgs/:org/teams"
  19070. },
  19071. createDiscussion: {
  19072. deprecated: "octokit.teams.createDiscussion() has been renamed to octokit.teams.createDiscussionLegacy() (2020-01-16)",
  19073. method: "POST",
  19074. params: {
  19075. body: {
  19076. required: true,
  19077. type: "string"
  19078. },
  19079. private: {
  19080. type: "boolean"
  19081. },
  19082. team_id: {
  19083. required: true,
  19084. type: "integer"
  19085. },
  19086. title: {
  19087. required: true,
  19088. type: "string"
  19089. }
  19090. },
  19091. url: "/teams/:team_id/discussions"
  19092. },
  19093. createDiscussionComment: {
  19094. deprecated: "octokit.teams.createDiscussionComment() has been renamed to octokit.teams.createDiscussionCommentLegacy() (2020-01-16)",
  19095. method: "POST",
  19096. params: {
  19097. body: {
  19098. required: true,
  19099. type: "string"
  19100. },
  19101. discussion_number: {
  19102. required: true,
  19103. type: "integer"
  19104. },
  19105. team_id: {
  19106. required: true,
  19107. type: "integer"
  19108. }
  19109. },
  19110. url: "/teams/:team_id/discussions/:discussion_number/comments"
  19111. },
  19112. createDiscussionCommentInOrg: {
  19113. method: "POST",
  19114. params: {
  19115. body: {
  19116. required: true,
  19117. type: "string"
  19118. },
  19119. discussion_number: {
  19120. required: true,
  19121. type: "integer"
  19122. },
  19123. org: {
  19124. required: true,
  19125. type: "string"
  19126. },
  19127. team_slug: {
  19128. required: true,
  19129. type: "string"
  19130. }
  19131. },
  19132. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments"
  19133. },
  19134. createDiscussionCommentLegacy: {
  19135. deprecated: "octokit.teams.createDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#create-a-comment-legacy",
  19136. method: "POST",
  19137. params: {
  19138. body: {
  19139. required: true,
  19140. type: "string"
  19141. },
  19142. discussion_number: {
  19143. required: true,
  19144. type: "integer"
  19145. },
  19146. team_id: {
  19147. required: true,
  19148. type: "integer"
  19149. }
  19150. },
  19151. url: "/teams/:team_id/discussions/:discussion_number/comments"
  19152. },
  19153. createDiscussionInOrg: {
  19154. method: "POST",
  19155. params: {
  19156. body: {
  19157. required: true,
  19158. type: "string"
  19159. },
  19160. org: {
  19161. required: true,
  19162. type: "string"
  19163. },
  19164. private: {
  19165. type: "boolean"
  19166. },
  19167. team_slug: {
  19168. required: true,
  19169. type: "string"
  19170. },
  19171. title: {
  19172. required: true,
  19173. type: "string"
  19174. }
  19175. },
  19176. url: "/orgs/:org/teams/:team_slug/discussions"
  19177. },
  19178. createDiscussionLegacy: {
  19179. deprecated: "octokit.teams.createDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#create-a-discussion-legacy",
  19180. method: "POST",
  19181. params: {
  19182. body: {
  19183. required: true,
  19184. type: "string"
  19185. },
  19186. private: {
  19187. type: "boolean"
  19188. },
  19189. team_id: {
  19190. required: true,
  19191. type: "integer"
  19192. },
  19193. title: {
  19194. required: true,
  19195. type: "string"
  19196. }
  19197. },
  19198. url: "/teams/:team_id/discussions"
  19199. },
  19200. delete: {
  19201. deprecated: "octokit.teams.delete() has been renamed to octokit.teams.deleteLegacy() (2020-01-16)",
  19202. method: "DELETE",
  19203. params: {
  19204. team_id: {
  19205. required: true,
  19206. type: "integer"
  19207. }
  19208. },
  19209. url: "/teams/:team_id"
  19210. },
  19211. deleteDiscussion: {
  19212. deprecated: "octokit.teams.deleteDiscussion() has been renamed to octokit.teams.deleteDiscussionLegacy() (2020-01-16)",
  19213. method: "DELETE",
  19214. params: {
  19215. discussion_number: {
  19216. required: true,
  19217. type: "integer"
  19218. },
  19219. team_id: {
  19220. required: true,
  19221. type: "integer"
  19222. }
  19223. },
  19224. url: "/teams/:team_id/discussions/:discussion_number"
  19225. },
  19226. deleteDiscussionComment: {
  19227. deprecated: "octokit.teams.deleteDiscussionComment() has been renamed to octokit.teams.deleteDiscussionCommentLegacy() (2020-01-16)",
  19228. method: "DELETE",
  19229. params: {
  19230. comment_number: {
  19231. required: true,
  19232. type: "integer"
  19233. },
  19234. discussion_number: {
  19235. required: true,
  19236. type: "integer"
  19237. },
  19238. team_id: {
  19239. required: true,
  19240. type: "integer"
  19241. }
  19242. },
  19243. url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
  19244. },
  19245. deleteDiscussionCommentInOrg: {
  19246. method: "DELETE",
  19247. params: {
  19248. comment_number: {
  19249. required: true,
  19250. type: "integer"
  19251. },
  19252. discussion_number: {
  19253. required: true,
  19254. type: "integer"
  19255. },
  19256. org: {
  19257. required: true,
  19258. type: "string"
  19259. },
  19260. team_slug: {
  19261. required: true,
  19262. type: "string"
  19263. }
  19264. },
  19265. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number"
  19266. },
  19267. deleteDiscussionCommentLegacy: {
  19268. deprecated: "octokit.teams.deleteDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#delete-a-comment-legacy",
  19269. method: "DELETE",
  19270. params: {
  19271. comment_number: {
  19272. required: true,
  19273. type: "integer"
  19274. },
  19275. discussion_number: {
  19276. required: true,
  19277. type: "integer"
  19278. },
  19279. team_id: {
  19280. required: true,
  19281. type: "integer"
  19282. }
  19283. },
  19284. url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
  19285. },
  19286. deleteDiscussionInOrg: {
  19287. method: "DELETE",
  19288. params: {
  19289. discussion_number: {
  19290. required: true,
  19291. type: "integer"
  19292. },
  19293. org: {
  19294. required: true,
  19295. type: "string"
  19296. },
  19297. team_slug: {
  19298. required: true,
  19299. type: "string"
  19300. }
  19301. },
  19302. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number"
  19303. },
  19304. deleteDiscussionLegacy: {
  19305. deprecated: "octokit.teams.deleteDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#delete-a-discussion-legacy",
  19306. method: "DELETE",
  19307. params: {
  19308. discussion_number: {
  19309. required: true,
  19310. type: "integer"
  19311. },
  19312. team_id: {
  19313. required: true,
  19314. type: "integer"
  19315. }
  19316. },
  19317. url: "/teams/:team_id/discussions/:discussion_number"
  19318. },
  19319. deleteInOrg: {
  19320. method: "DELETE",
  19321. params: {
  19322. org: {
  19323. required: true,
  19324. type: "string"
  19325. },
  19326. team_slug: {
  19327. required: true,
  19328. type: "string"
  19329. }
  19330. },
  19331. url: "/orgs/:org/teams/:team_slug"
  19332. },
  19333. deleteLegacy: {
  19334. deprecated: "octokit.teams.deleteLegacy() is deprecated, see https://developer.github.com/v3/teams/#delete-team-legacy",
  19335. method: "DELETE",
  19336. params: {
  19337. team_id: {
  19338. required: true,
  19339. type: "integer"
  19340. }
  19341. },
  19342. url: "/teams/:team_id"
  19343. },
  19344. get: {
  19345. deprecated: "octokit.teams.get() has been renamed to octokit.teams.getLegacy() (2020-01-16)",
  19346. method: "GET",
  19347. params: {
  19348. team_id: {
  19349. required: true,
  19350. type: "integer"
  19351. }
  19352. },
  19353. url: "/teams/:team_id"
  19354. },
  19355. getByName: {
  19356. method: "GET",
  19357. params: {
  19358. org: {
  19359. required: true,
  19360. type: "string"
  19361. },
  19362. team_slug: {
  19363. required: true,
  19364. type: "string"
  19365. }
  19366. },
  19367. url: "/orgs/:org/teams/:team_slug"
  19368. },
  19369. getDiscussion: {
  19370. deprecated: "octokit.teams.getDiscussion() has been renamed to octokit.teams.getDiscussionLegacy() (2020-01-16)",
  19371. method: "GET",
  19372. params: {
  19373. discussion_number: {
  19374. required: true,
  19375. type: "integer"
  19376. },
  19377. team_id: {
  19378. required: true,
  19379. type: "integer"
  19380. }
  19381. },
  19382. url: "/teams/:team_id/discussions/:discussion_number"
  19383. },
  19384. getDiscussionComment: {
  19385. deprecated: "octokit.teams.getDiscussionComment() has been renamed to octokit.teams.getDiscussionCommentLegacy() (2020-01-16)",
  19386. method: "GET",
  19387. params: {
  19388. comment_number: {
  19389. required: true,
  19390. type: "integer"
  19391. },
  19392. discussion_number: {
  19393. required: true,
  19394. type: "integer"
  19395. },
  19396. team_id: {
  19397. required: true,
  19398. type: "integer"
  19399. }
  19400. },
  19401. url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
  19402. },
  19403. getDiscussionCommentInOrg: {
  19404. method: "GET",
  19405. params: {
  19406. comment_number: {
  19407. required: true,
  19408. type: "integer"
  19409. },
  19410. discussion_number: {
  19411. required: true,
  19412. type: "integer"
  19413. },
  19414. org: {
  19415. required: true,
  19416. type: "string"
  19417. },
  19418. team_slug: {
  19419. required: true,
  19420. type: "string"
  19421. }
  19422. },
  19423. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number"
  19424. },
  19425. getDiscussionCommentLegacy: {
  19426. deprecated: "octokit.teams.getDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#get-a-single-comment-legacy",
  19427. method: "GET",
  19428. params: {
  19429. comment_number: {
  19430. required: true,
  19431. type: "integer"
  19432. },
  19433. discussion_number: {
  19434. required: true,
  19435. type: "integer"
  19436. },
  19437. team_id: {
  19438. required: true,
  19439. type: "integer"
  19440. }
  19441. },
  19442. url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
  19443. },
  19444. getDiscussionInOrg: {
  19445. method: "GET",
  19446. params: {
  19447. discussion_number: {
  19448. required: true,
  19449. type: "integer"
  19450. },
  19451. org: {
  19452. required: true,
  19453. type: "string"
  19454. },
  19455. team_slug: {
  19456. required: true,
  19457. type: "string"
  19458. }
  19459. },
  19460. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number"
  19461. },
  19462. getDiscussionLegacy: {
  19463. deprecated: "octokit.teams.getDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#get-a-single-discussion-legacy",
  19464. method: "GET",
  19465. params: {
  19466. discussion_number: {
  19467. required: true,
  19468. type: "integer"
  19469. },
  19470. team_id: {
  19471. required: true,
  19472. type: "integer"
  19473. }
  19474. },
  19475. url: "/teams/:team_id/discussions/:discussion_number"
  19476. },
  19477. getLegacy: {
  19478. deprecated: "octokit.teams.getLegacy() is deprecated, see https://developer.github.com/v3/teams/#get-team-legacy",
  19479. method: "GET",
  19480. params: {
  19481. team_id: {
  19482. required: true,
  19483. type: "integer"
  19484. }
  19485. },
  19486. url: "/teams/:team_id"
  19487. },
  19488. getMember: {
  19489. deprecated: "octokit.teams.getMember() has been renamed to octokit.teams.getMemberLegacy() (2020-01-16)",
  19490. method: "GET",
  19491. params: {
  19492. team_id: {
  19493. required: true,
  19494. type: "integer"
  19495. },
  19496. username: {
  19497. required: true,
  19498. type: "string"
  19499. }
  19500. },
  19501. url: "/teams/:team_id/members/:username"
  19502. },
  19503. getMemberLegacy: {
  19504. deprecated: "octokit.teams.getMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-member-legacy",
  19505. method: "GET",
  19506. params: {
  19507. team_id: {
  19508. required: true,
  19509. type: "integer"
  19510. },
  19511. username: {
  19512. required: true,
  19513. type: "string"
  19514. }
  19515. },
  19516. url: "/teams/:team_id/members/:username"
  19517. },
  19518. getMembership: {
  19519. deprecated: "octokit.teams.getMembership() has been renamed to octokit.teams.getMembershipLegacy() (2020-01-16)",
  19520. method: "GET",
  19521. params: {
  19522. team_id: {
  19523. required: true,
  19524. type: "integer"
  19525. },
  19526. username: {
  19527. required: true,
  19528. type: "string"
  19529. }
  19530. },
  19531. url: "/teams/:team_id/memberships/:username"
  19532. },
  19533. getMembershipInOrg: {
  19534. method: "GET",
  19535. params: {
  19536. org: {
  19537. required: true,
  19538. type: "string"
  19539. },
  19540. team_slug: {
  19541. required: true,
  19542. type: "string"
  19543. },
  19544. username: {
  19545. required: true,
  19546. type: "string"
  19547. }
  19548. },
  19549. url: "/orgs/:org/teams/:team_slug/memberships/:username"
  19550. },
  19551. getMembershipLegacy: {
  19552. deprecated: "octokit.teams.getMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#get-team-membership-legacy",
  19553. method: "GET",
  19554. params: {
  19555. team_id: {
  19556. required: true,
  19557. type: "integer"
  19558. },
  19559. username: {
  19560. required: true,
  19561. type: "string"
  19562. }
  19563. },
  19564. url: "/teams/:team_id/memberships/:username"
  19565. },
  19566. list: {
  19567. method: "GET",
  19568. params: {
  19569. org: {
  19570. required: true,
  19571. type: "string"
  19572. },
  19573. page: {
  19574. type: "integer"
  19575. },
  19576. per_page: {
  19577. type: "integer"
  19578. }
  19579. },
  19580. url: "/orgs/:org/teams"
  19581. },
  19582. listChild: {
  19583. deprecated: "octokit.teams.listChild() has been renamed to octokit.teams.listChildLegacy() (2020-01-16)",
  19584. method: "GET",
  19585. params: {
  19586. page: {
  19587. type: "integer"
  19588. },
  19589. per_page: {
  19590. type: "integer"
  19591. },
  19592. team_id: {
  19593. required: true,
  19594. type: "integer"
  19595. }
  19596. },
  19597. url: "/teams/:team_id/teams"
  19598. },
  19599. listChildInOrg: {
  19600. method: "GET",
  19601. params: {
  19602. org: {
  19603. required: true,
  19604. type: "string"
  19605. },
  19606. page: {
  19607. type: "integer"
  19608. },
  19609. per_page: {
  19610. type: "integer"
  19611. },
  19612. team_slug: {
  19613. required: true,
  19614. type: "string"
  19615. }
  19616. },
  19617. url: "/orgs/:org/teams/:team_slug/teams"
  19618. },
  19619. listChildLegacy: {
  19620. deprecated: "octokit.teams.listChildLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-child-teams-legacy",
  19621. method: "GET",
  19622. params: {
  19623. page: {
  19624. type: "integer"
  19625. },
  19626. per_page: {
  19627. type: "integer"
  19628. },
  19629. team_id: {
  19630. required: true,
  19631. type: "integer"
  19632. }
  19633. },
  19634. url: "/teams/:team_id/teams"
  19635. },
  19636. listDiscussionComments: {
  19637. deprecated: "octokit.teams.listDiscussionComments() has been renamed to octokit.teams.listDiscussionCommentsLegacy() (2020-01-16)",
  19638. method: "GET",
  19639. params: {
  19640. direction: {
  19641. enum: ["asc", "desc"],
  19642. type: "string"
  19643. },
  19644. discussion_number: {
  19645. required: true,
  19646. type: "integer"
  19647. },
  19648. page: {
  19649. type: "integer"
  19650. },
  19651. per_page: {
  19652. type: "integer"
  19653. },
  19654. team_id: {
  19655. required: true,
  19656. type: "integer"
  19657. }
  19658. },
  19659. url: "/teams/:team_id/discussions/:discussion_number/comments"
  19660. },
  19661. listDiscussionCommentsInOrg: {
  19662. method: "GET",
  19663. params: {
  19664. direction: {
  19665. enum: ["asc", "desc"],
  19666. type: "string"
  19667. },
  19668. discussion_number: {
  19669. required: true,
  19670. type: "integer"
  19671. },
  19672. org: {
  19673. required: true,
  19674. type: "string"
  19675. },
  19676. page: {
  19677. type: "integer"
  19678. },
  19679. per_page: {
  19680. type: "integer"
  19681. },
  19682. team_slug: {
  19683. required: true,
  19684. type: "string"
  19685. }
  19686. },
  19687. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments"
  19688. },
  19689. listDiscussionCommentsLegacy: {
  19690. deprecated: "octokit.teams.listDiscussionCommentsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#list-comments-legacy",
  19691. method: "GET",
  19692. params: {
  19693. direction: {
  19694. enum: ["asc", "desc"],
  19695. type: "string"
  19696. },
  19697. discussion_number: {
  19698. required: true,
  19699. type: "integer"
  19700. },
  19701. page: {
  19702. type: "integer"
  19703. },
  19704. per_page: {
  19705. type: "integer"
  19706. },
  19707. team_id: {
  19708. required: true,
  19709. type: "integer"
  19710. }
  19711. },
  19712. url: "/teams/:team_id/discussions/:discussion_number/comments"
  19713. },
  19714. listDiscussions: {
  19715. deprecated: "octokit.teams.listDiscussions() has been renamed to octokit.teams.listDiscussionsLegacy() (2020-01-16)",
  19716. method: "GET",
  19717. params: {
  19718. direction: {
  19719. enum: ["asc", "desc"],
  19720. type: "string"
  19721. },
  19722. page: {
  19723. type: "integer"
  19724. },
  19725. per_page: {
  19726. type: "integer"
  19727. },
  19728. team_id: {
  19729. required: true,
  19730. type: "integer"
  19731. }
  19732. },
  19733. url: "/teams/:team_id/discussions"
  19734. },
  19735. listDiscussionsInOrg: {
  19736. method: "GET",
  19737. params: {
  19738. direction: {
  19739. enum: ["asc", "desc"],
  19740. type: "string"
  19741. },
  19742. org: {
  19743. required: true,
  19744. type: "string"
  19745. },
  19746. page: {
  19747. type: "integer"
  19748. },
  19749. per_page: {
  19750. type: "integer"
  19751. },
  19752. team_slug: {
  19753. required: true,
  19754. type: "string"
  19755. }
  19756. },
  19757. url: "/orgs/:org/teams/:team_slug/discussions"
  19758. },
  19759. listDiscussionsLegacy: {
  19760. deprecated: "octokit.teams.listDiscussionsLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#list-discussions-legacy",
  19761. method: "GET",
  19762. params: {
  19763. direction: {
  19764. enum: ["asc", "desc"],
  19765. type: "string"
  19766. },
  19767. page: {
  19768. type: "integer"
  19769. },
  19770. per_page: {
  19771. type: "integer"
  19772. },
  19773. team_id: {
  19774. required: true,
  19775. type: "integer"
  19776. }
  19777. },
  19778. url: "/teams/:team_id/discussions"
  19779. },
  19780. listForAuthenticatedUser: {
  19781. method: "GET",
  19782. params: {
  19783. page: {
  19784. type: "integer"
  19785. },
  19786. per_page: {
  19787. type: "integer"
  19788. }
  19789. },
  19790. url: "/user/teams"
  19791. },
  19792. listMembers: {
  19793. deprecated: "octokit.teams.listMembers() has been renamed to octokit.teams.listMembersLegacy() (2020-01-16)",
  19794. method: "GET",
  19795. params: {
  19796. page: {
  19797. type: "integer"
  19798. },
  19799. per_page: {
  19800. type: "integer"
  19801. },
  19802. role: {
  19803. enum: ["member", "maintainer", "all"],
  19804. type: "string"
  19805. },
  19806. team_id: {
  19807. required: true,
  19808. type: "integer"
  19809. }
  19810. },
  19811. url: "/teams/:team_id/members"
  19812. },
  19813. listMembersInOrg: {
  19814. method: "GET",
  19815. params: {
  19816. org: {
  19817. required: true,
  19818. type: "string"
  19819. },
  19820. page: {
  19821. type: "integer"
  19822. },
  19823. per_page: {
  19824. type: "integer"
  19825. },
  19826. role: {
  19827. enum: ["member", "maintainer", "all"],
  19828. type: "string"
  19829. },
  19830. team_slug: {
  19831. required: true,
  19832. type: "string"
  19833. }
  19834. },
  19835. url: "/orgs/:org/teams/:team_slug/members"
  19836. },
  19837. listMembersLegacy: {
  19838. deprecated: "octokit.teams.listMembersLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-team-members-legacy",
  19839. method: "GET",
  19840. params: {
  19841. page: {
  19842. type: "integer"
  19843. },
  19844. per_page: {
  19845. type: "integer"
  19846. },
  19847. role: {
  19848. enum: ["member", "maintainer", "all"],
  19849. type: "string"
  19850. },
  19851. team_id: {
  19852. required: true,
  19853. type: "integer"
  19854. }
  19855. },
  19856. url: "/teams/:team_id/members"
  19857. },
  19858. listPendingInvitations: {
  19859. deprecated: "octokit.teams.listPendingInvitations() has been renamed to octokit.teams.listPendingInvitationsLegacy() (2020-01-16)",
  19860. method: "GET",
  19861. params: {
  19862. page: {
  19863. type: "integer"
  19864. },
  19865. per_page: {
  19866. type: "integer"
  19867. },
  19868. team_id: {
  19869. required: true,
  19870. type: "integer"
  19871. }
  19872. },
  19873. url: "/teams/:team_id/invitations"
  19874. },
  19875. listPendingInvitationsInOrg: {
  19876. method: "GET",
  19877. params: {
  19878. org: {
  19879. required: true,
  19880. type: "string"
  19881. },
  19882. page: {
  19883. type: "integer"
  19884. },
  19885. per_page: {
  19886. type: "integer"
  19887. },
  19888. team_slug: {
  19889. required: true,
  19890. type: "string"
  19891. }
  19892. },
  19893. url: "/orgs/:org/teams/:team_slug/invitations"
  19894. },
  19895. listPendingInvitationsLegacy: {
  19896. deprecated: "octokit.teams.listPendingInvitationsLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#list-pending-team-invitations-legacy",
  19897. method: "GET",
  19898. params: {
  19899. page: {
  19900. type: "integer"
  19901. },
  19902. per_page: {
  19903. type: "integer"
  19904. },
  19905. team_id: {
  19906. required: true,
  19907. type: "integer"
  19908. }
  19909. },
  19910. url: "/teams/:team_id/invitations"
  19911. },
  19912. listProjects: {
  19913. deprecated: "octokit.teams.listProjects() has been renamed to octokit.teams.listProjectsLegacy() (2020-01-16)",
  19914. headers: {
  19915. accept: "application/vnd.github.inertia-preview+json"
  19916. },
  19917. method: "GET",
  19918. params: {
  19919. page: {
  19920. type: "integer"
  19921. },
  19922. per_page: {
  19923. type: "integer"
  19924. },
  19925. team_id: {
  19926. required: true,
  19927. type: "integer"
  19928. }
  19929. },
  19930. url: "/teams/:team_id/projects"
  19931. },
  19932. listProjectsInOrg: {
  19933. headers: {
  19934. accept: "application/vnd.github.inertia-preview+json"
  19935. },
  19936. method: "GET",
  19937. params: {
  19938. org: {
  19939. required: true,
  19940. type: "string"
  19941. },
  19942. page: {
  19943. type: "integer"
  19944. },
  19945. per_page: {
  19946. type: "integer"
  19947. },
  19948. team_slug: {
  19949. required: true,
  19950. type: "string"
  19951. }
  19952. },
  19953. url: "/orgs/:org/teams/:team_slug/projects"
  19954. },
  19955. listProjectsLegacy: {
  19956. deprecated: "octokit.teams.listProjectsLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-projects-legacy",
  19957. headers: {
  19958. accept: "application/vnd.github.inertia-preview+json"
  19959. },
  19960. method: "GET",
  19961. params: {
  19962. page: {
  19963. type: "integer"
  19964. },
  19965. per_page: {
  19966. type: "integer"
  19967. },
  19968. team_id: {
  19969. required: true,
  19970. type: "integer"
  19971. }
  19972. },
  19973. url: "/teams/:team_id/projects"
  19974. },
  19975. listRepos: {
  19976. deprecated: "octokit.teams.listRepos() has been renamed to octokit.teams.listReposLegacy() (2020-01-16)",
  19977. method: "GET",
  19978. params: {
  19979. page: {
  19980. type: "integer"
  19981. },
  19982. per_page: {
  19983. type: "integer"
  19984. },
  19985. team_id: {
  19986. required: true,
  19987. type: "integer"
  19988. }
  19989. },
  19990. url: "/teams/:team_id/repos"
  19991. },
  19992. listReposInOrg: {
  19993. method: "GET",
  19994. params: {
  19995. org: {
  19996. required: true,
  19997. type: "string"
  19998. },
  19999. page: {
  20000. type: "integer"
  20001. },
  20002. per_page: {
  20003. type: "integer"
  20004. },
  20005. team_slug: {
  20006. required: true,
  20007. type: "string"
  20008. }
  20009. },
  20010. url: "/orgs/:org/teams/:team_slug/repos"
  20011. },
  20012. listReposLegacy: {
  20013. deprecated: "octokit.teams.listReposLegacy() is deprecated, see https://developer.github.com/v3/teams/#list-team-repos-legacy",
  20014. method: "GET",
  20015. params: {
  20016. page: {
  20017. type: "integer"
  20018. },
  20019. per_page: {
  20020. type: "integer"
  20021. },
  20022. team_id: {
  20023. required: true,
  20024. type: "integer"
  20025. }
  20026. },
  20027. url: "/teams/:team_id/repos"
  20028. },
  20029. removeMember: {
  20030. deprecated: "octokit.teams.removeMember() has been renamed to octokit.teams.removeMemberLegacy() (2020-01-16)",
  20031. method: "DELETE",
  20032. params: {
  20033. team_id: {
  20034. required: true,
  20035. type: "integer"
  20036. },
  20037. username: {
  20038. required: true,
  20039. type: "string"
  20040. }
  20041. },
  20042. url: "/teams/:team_id/members/:username"
  20043. },
  20044. removeMemberLegacy: {
  20045. deprecated: "octokit.teams.removeMemberLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-member-legacy",
  20046. method: "DELETE",
  20047. params: {
  20048. team_id: {
  20049. required: true,
  20050. type: "integer"
  20051. },
  20052. username: {
  20053. required: true,
  20054. type: "string"
  20055. }
  20056. },
  20057. url: "/teams/:team_id/members/:username"
  20058. },
  20059. removeMembership: {
  20060. deprecated: "octokit.teams.removeMembership() has been renamed to octokit.teams.removeMembershipLegacy() (2020-01-16)",
  20061. method: "DELETE",
  20062. params: {
  20063. team_id: {
  20064. required: true,
  20065. type: "integer"
  20066. },
  20067. username: {
  20068. required: true,
  20069. type: "string"
  20070. }
  20071. },
  20072. url: "/teams/:team_id/memberships/:username"
  20073. },
  20074. removeMembershipInOrg: {
  20075. method: "DELETE",
  20076. params: {
  20077. org: {
  20078. required: true,
  20079. type: "string"
  20080. },
  20081. team_slug: {
  20082. required: true,
  20083. type: "string"
  20084. },
  20085. username: {
  20086. required: true,
  20087. type: "string"
  20088. }
  20089. },
  20090. url: "/orgs/:org/teams/:team_slug/memberships/:username"
  20091. },
  20092. removeMembershipLegacy: {
  20093. deprecated: "octokit.teams.removeMembershipLegacy() is deprecated, see https://developer.github.com/v3/teams/members/#remove-team-membership-legacy",
  20094. method: "DELETE",
  20095. params: {
  20096. team_id: {
  20097. required: true,
  20098. type: "integer"
  20099. },
  20100. username: {
  20101. required: true,
  20102. type: "string"
  20103. }
  20104. },
  20105. url: "/teams/:team_id/memberships/:username"
  20106. },
  20107. removeProject: {
  20108. deprecated: "octokit.teams.removeProject() has been renamed to octokit.teams.removeProjectLegacy() (2020-01-16)",
  20109. method: "DELETE",
  20110. params: {
  20111. project_id: {
  20112. required: true,
  20113. type: "integer"
  20114. },
  20115. team_id: {
  20116. required: true,
  20117. type: "integer"
  20118. }
  20119. },
  20120. url: "/teams/:team_id/projects/:project_id"
  20121. },
  20122. removeProjectInOrg: {
  20123. method: "DELETE",
  20124. params: {
  20125. org: {
  20126. required: true,
  20127. type: "string"
  20128. },
  20129. project_id: {
  20130. required: true,
  20131. type: "integer"
  20132. },
  20133. team_slug: {
  20134. required: true,
  20135. type: "string"
  20136. }
  20137. },
  20138. url: "/orgs/:org/teams/:team_slug/projects/:project_id"
  20139. },
  20140. removeProjectLegacy: {
  20141. deprecated: "octokit.teams.removeProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-project-legacy",
  20142. method: "DELETE",
  20143. params: {
  20144. project_id: {
  20145. required: true,
  20146. type: "integer"
  20147. },
  20148. team_id: {
  20149. required: true,
  20150. type: "integer"
  20151. }
  20152. },
  20153. url: "/teams/:team_id/projects/:project_id"
  20154. },
  20155. removeRepo: {
  20156. deprecated: "octokit.teams.removeRepo() has been renamed to octokit.teams.removeRepoLegacy() (2020-01-16)",
  20157. method: "DELETE",
  20158. params: {
  20159. owner: {
  20160. required: true,
  20161. type: "string"
  20162. },
  20163. repo: {
  20164. required: true,
  20165. type: "string"
  20166. },
  20167. team_id: {
  20168. required: true,
  20169. type: "integer"
  20170. }
  20171. },
  20172. url: "/teams/:team_id/repos/:owner/:repo"
  20173. },
  20174. removeRepoInOrg: {
  20175. method: "DELETE",
  20176. params: {
  20177. org: {
  20178. required: true,
  20179. type: "string"
  20180. },
  20181. owner: {
  20182. required: true,
  20183. type: "string"
  20184. },
  20185. repo: {
  20186. required: true,
  20187. type: "string"
  20188. },
  20189. team_slug: {
  20190. required: true,
  20191. type: "string"
  20192. }
  20193. },
  20194. url: "/orgs/:org/teams/:team_slug/repos/:owner/:repo"
  20195. },
  20196. removeRepoLegacy: {
  20197. deprecated: "octokit.teams.removeRepoLegacy() is deprecated, see https://developer.github.com/v3/teams/#remove-team-repository-legacy",
  20198. method: "DELETE",
  20199. params: {
  20200. owner: {
  20201. required: true,
  20202. type: "string"
  20203. },
  20204. repo: {
  20205. required: true,
  20206. type: "string"
  20207. },
  20208. team_id: {
  20209. required: true,
  20210. type: "integer"
  20211. }
  20212. },
  20213. url: "/teams/:team_id/repos/:owner/:repo"
  20214. },
  20215. reviewProject: {
  20216. deprecated: "octokit.teams.reviewProject() has been renamed to octokit.teams.reviewProjectLegacy() (2020-01-16)",
  20217. headers: {
  20218. accept: "application/vnd.github.inertia-preview+json"
  20219. },
  20220. method: "GET",
  20221. params: {
  20222. project_id: {
  20223. required: true,
  20224. type: "integer"
  20225. },
  20226. team_id: {
  20227. required: true,
  20228. type: "integer"
  20229. }
  20230. },
  20231. url: "/teams/:team_id/projects/:project_id"
  20232. },
  20233. reviewProjectInOrg: {
  20234. headers: {
  20235. accept: "application/vnd.github.inertia-preview+json"
  20236. },
  20237. method: "GET",
  20238. params: {
  20239. org: {
  20240. required: true,
  20241. type: "string"
  20242. },
  20243. project_id: {
  20244. required: true,
  20245. type: "integer"
  20246. },
  20247. team_slug: {
  20248. required: true,
  20249. type: "string"
  20250. }
  20251. },
  20252. url: "/orgs/:org/teams/:team_slug/projects/:project_id"
  20253. },
  20254. reviewProjectLegacy: {
  20255. deprecated: "octokit.teams.reviewProjectLegacy() is deprecated, see https://developer.github.com/v3/teams/#review-a-team-project-legacy",
  20256. headers: {
  20257. accept: "application/vnd.github.inertia-preview+json"
  20258. },
  20259. method: "GET",
  20260. params: {
  20261. project_id: {
  20262. required: true,
  20263. type: "integer"
  20264. },
  20265. team_id: {
  20266. required: true,
  20267. type: "integer"
  20268. }
  20269. },
  20270. url: "/teams/:team_id/projects/:project_id"
  20271. },
  20272. update: {
  20273. deprecated: "octokit.teams.update() has been renamed to octokit.teams.updateLegacy() (2020-01-16)",
  20274. method: "PATCH",
  20275. params: {
  20276. description: {
  20277. type: "string"
  20278. },
  20279. name: {
  20280. required: true,
  20281. type: "string"
  20282. },
  20283. parent_team_id: {
  20284. type: "integer"
  20285. },
  20286. permission: {
  20287. enum: ["pull", "push", "admin"],
  20288. type: "string"
  20289. },
  20290. privacy: {
  20291. enum: ["secret", "closed"],
  20292. type: "string"
  20293. },
  20294. team_id: {
  20295. required: true,
  20296. type: "integer"
  20297. }
  20298. },
  20299. url: "/teams/:team_id"
  20300. },
  20301. updateDiscussion: {
  20302. deprecated: "octokit.teams.updateDiscussion() has been renamed to octokit.teams.updateDiscussionLegacy() (2020-01-16)",
  20303. method: "PATCH",
  20304. params: {
  20305. body: {
  20306. type: "string"
  20307. },
  20308. discussion_number: {
  20309. required: true,
  20310. type: "integer"
  20311. },
  20312. team_id: {
  20313. required: true,
  20314. type: "integer"
  20315. },
  20316. title: {
  20317. type: "string"
  20318. }
  20319. },
  20320. url: "/teams/:team_id/discussions/:discussion_number"
  20321. },
  20322. updateDiscussionComment: {
  20323. deprecated: "octokit.teams.updateDiscussionComment() has been renamed to octokit.teams.updateDiscussionCommentLegacy() (2020-01-16)",
  20324. method: "PATCH",
  20325. params: {
  20326. body: {
  20327. required: true,
  20328. type: "string"
  20329. },
  20330. comment_number: {
  20331. required: true,
  20332. type: "integer"
  20333. },
  20334. discussion_number: {
  20335. required: true,
  20336. type: "integer"
  20337. },
  20338. team_id: {
  20339. required: true,
  20340. type: "integer"
  20341. }
  20342. },
  20343. url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
  20344. },
  20345. updateDiscussionCommentInOrg: {
  20346. method: "PATCH",
  20347. params: {
  20348. body: {
  20349. required: true,
  20350. type: "string"
  20351. },
  20352. comment_number: {
  20353. required: true,
  20354. type: "integer"
  20355. },
  20356. discussion_number: {
  20357. required: true,
  20358. type: "integer"
  20359. },
  20360. org: {
  20361. required: true,
  20362. type: "string"
  20363. },
  20364. team_slug: {
  20365. required: true,
  20366. type: "string"
  20367. }
  20368. },
  20369. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number/comments/:comment_number"
  20370. },
  20371. updateDiscussionCommentLegacy: {
  20372. deprecated: "octokit.teams.updateDiscussionCommentLegacy() is deprecated, see https://developer.github.com/v3/teams/discussion_comments/#edit-a-comment-legacy",
  20373. method: "PATCH",
  20374. params: {
  20375. body: {
  20376. required: true,
  20377. type: "string"
  20378. },
  20379. comment_number: {
  20380. required: true,
  20381. type: "integer"
  20382. },
  20383. discussion_number: {
  20384. required: true,
  20385. type: "integer"
  20386. },
  20387. team_id: {
  20388. required: true,
  20389. type: "integer"
  20390. }
  20391. },
  20392. url: "/teams/:team_id/discussions/:discussion_number/comments/:comment_number"
  20393. },
  20394. updateDiscussionInOrg: {
  20395. method: "PATCH",
  20396. params: {
  20397. body: {
  20398. type: "string"
  20399. },
  20400. discussion_number: {
  20401. required: true,
  20402. type: "integer"
  20403. },
  20404. org: {
  20405. required: true,
  20406. type: "string"
  20407. },
  20408. team_slug: {
  20409. required: true,
  20410. type: "string"
  20411. },
  20412. title: {
  20413. type: "string"
  20414. }
  20415. },
  20416. url: "/orgs/:org/teams/:team_slug/discussions/:discussion_number"
  20417. },
  20418. updateDiscussionLegacy: {
  20419. deprecated: "octokit.teams.updateDiscussionLegacy() is deprecated, see https://developer.github.com/v3/teams/discussions/#edit-a-discussion-legacy",
  20420. method: "PATCH",
  20421. params: {
  20422. body: {
  20423. type: "string"
  20424. },
  20425. discussion_number: {
  20426. required: true,
  20427. type: "integer"
  20428. },
  20429. team_id: {
  20430. required: true,
  20431. type: "integer"
  20432. },
  20433. title: {
  20434. type: "string"
  20435. }
  20436. },
  20437. url: "/teams/:team_id/discussions/:discussion_number"
  20438. },
  20439. updateInOrg: {
  20440. method: "PATCH",
  20441. params: {
  20442. description: {
  20443. type: "string"
  20444. },
  20445. name: {
  20446. required: true,
  20447. type: "string"
  20448. },
  20449. org: {
  20450. required: true,
  20451. type: "string"
  20452. },
  20453. parent_team_id: {
  20454. type: "integer"
  20455. },
  20456. permission: {
  20457. enum: ["pull", "push", "admin"],
  20458. type: "string"
  20459. },
  20460. privacy: {
  20461. enum: ["secret", "closed"],
  20462. type: "string"
  20463. },
  20464. team_slug: {
  20465. required: true,
  20466. type: "string"
  20467. }
  20468. },
  20469. url: "/orgs/:org/teams/:team_slug"
  20470. },
  20471. updateLegacy: {
  20472. deprecated: "octokit.teams.updateLegacy() is deprecated, see https://developer.github.com/v3/teams/#edit-team-legacy",
  20473. method: "PATCH",
  20474. params: {
  20475. description: {
  20476. type: "string"
  20477. },
  20478. name: {
  20479. required: true,
  20480. type: "string"
  20481. },
  20482. parent_team_id: {
  20483. type: "integer"
  20484. },
  20485. permission: {
  20486. enum: ["pull", "push", "admin"],
  20487. type: "string"
  20488. },
  20489. privacy: {
  20490. enum: ["secret", "closed"],
  20491. type: "string"
  20492. },
  20493. team_id: {
  20494. required: true,
  20495. type: "integer"
  20496. }
  20497. },
  20498. url: "/teams/:team_id"
  20499. }
  20500. },
  20501. users: {
  20502. addEmails: {
  20503. method: "POST",
  20504. params: {
  20505. emails: {
  20506. required: true,
  20507. type: "string[]"
  20508. }
  20509. },
  20510. url: "/user/emails"
  20511. },
  20512. block: {
  20513. method: "PUT",
  20514. params: {
  20515. username: {
  20516. required: true,
  20517. type: "string"
  20518. }
  20519. },
  20520. url: "/user/blocks/:username"
  20521. },
  20522. checkBlocked: {
  20523. method: "GET",
  20524. params: {
  20525. username: {
  20526. required: true,
  20527. type: "string"
  20528. }
  20529. },
  20530. url: "/user/blocks/:username"
  20531. },
  20532. checkFollowing: {
  20533. method: "GET",
  20534. params: {
  20535. username: {
  20536. required: true,
  20537. type: "string"
  20538. }
  20539. },
  20540. url: "/user/following/:username"
  20541. },
  20542. checkFollowingForUser: {
  20543. method: "GET",
  20544. params: {
  20545. target_user: {
  20546. required: true,
  20547. type: "string"
  20548. },
  20549. username: {
  20550. required: true,
  20551. type: "string"
  20552. }
  20553. },
  20554. url: "/users/:username/following/:target_user"
  20555. },
  20556. createGpgKey: {
  20557. method: "POST",
  20558. params: {
  20559. armored_public_key: {
  20560. type: "string"
  20561. }
  20562. },
  20563. url: "/user/gpg_keys"
  20564. },
  20565. createPublicKey: {
  20566. method: "POST",
  20567. params: {
  20568. key: {
  20569. type: "string"
  20570. },
  20571. title: {
  20572. type: "string"
  20573. }
  20574. },
  20575. url: "/user/keys"
  20576. },
  20577. deleteEmails: {
  20578. method: "DELETE",
  20579. params: {
  20580. emails: {
  20581. required: true,
  20582. type: "string[]"
  20583. }
  20584. },
  20585. url: "/user/emails"
  20586. },
  20587. deleteGpgKey: {
  20588. method: "DELETE",
  20589. params: {
  20590. gpg_key_id: {
  20591. required: true,
  20592. type: "integer"
  20593. }
  20594. },
  20595. url: "/user/gpg_keys/:gpg_key_id"
  20596. },
  20597. deletePublicKey: {
  20598. method: "DELETE",
  20599. params: {
  20600. key_id: {
  20601. required: true,
  20602. type: "integer"
  20603. }
  20604. },
  20605. url: "/user/keys/:key_id"
  20606. },
  20607. follow: {
  20608. method: "PUT",
  20609. params: {
  20610. username: {
  20611. required: true,
  20612. type: "string"
  20613. }
  20614. },
  20615. url: "/user/following/:username"
  20616. },
  20617. getAuthenticated: {
  20618. method: "GET",
  20619. params: {},
  20620. url: "/user"
  20621. },
  20622. getByUsername: {
  20623. method: "GET",
  20624. params: {
  20625. username: {
  20626. required: true,
  20627. type: "string"
  20628. }
  20629. },
  20630. url: "/users/:username"
  20631. },
  20632. getContextForUser: {
  20633. method: "GET",
  20634. params: {
  20635. subject_id: {
  20636. type: "string"
  20637. },
  20638. subject_type: {
  20639. enum: ["organization", "repository", "issue", "pull_request"],
  20640. type: "string"
  20641. },
  20642. username: {
  20643. required: true,
  20644. type: "string"
  20645. }
  20646. },
  20647. url: "/users/:username/hovercard"
  20648. },
  20649. getGpgKey: {
  20650. method: "GET",
  20651. params: {
  20652. gpg_key_id: {
  20653. required: true,
  20654. type: "integer"
  20655. }
  20656. },
  20657. url: "/user/gpg_keys/:gpg_key_id"
  20658. },
  20659. getPublicKey: {
  20660. method: "GET",
  20661. params: {
  20662. key_id: {
  20663. required: true,
  20664. type: "integer"
  20665. }
  20666. },
  20667. url: "/user/keys/:key_id"
  20668. },
  20669. list: {
  20670. method: "GET",
  20671. params: {
  20672. page: {
  20673. type: "integer"
  20674. },
  20675. per_page: {
  20676. type: "integer"
  20677. },
  20678. since: {
  20679. type: "string"
  20680. }
  20681. },
  20682. url: "/users"
  20683. },
  20684. listBlocked: {
  20685. method: "GET",
  20686. params: {},
  20687. url: "/user/blocks"
  20688. },
  20689. listEmails: {
  20690. method: "GET",
  20691. params: {
  20692. page: {
  20693. type: "integer"
  20694. },
  20695. per_page: {
  20696. type: "integer"
  20697. }
  20698. },
  20699. url: "/user/emails"
  20700. },
  20701. listFollowersForAuthenticatedUser: {
  20702. method: "GET",
  20703. params: {
  20704. page: {
  20705. type: "integer"
  20706. },
  20707. per_page: {
  20708. type: "integer"
  20709. }
  20710. },
  20711. url: "/user/followers"
  20712. },
  20713. listFollowersForUser: {
  20714. method: "GET",
  20715. params: {
  20716. page: {
  20717. type: "integer"
  20718. },
  20719. per_page: {
  20720. type: "integer"
  20721. },
  20722. username: {
  20723. required: true,
  20724. type: "string"
  20725. }
  20726. },
  20727. url: "/users/:username/followers"
  20728. },
  20729. listFollowingForAuthenticatedUser: {
  20730. method: "GET",
  20731. params: {
  20732. page: {
  20733. type: "integer"
  20734. },
  20735. per_page: {
  20736. type: "integer"
  20737. }
  20738. },
  20739. url: "/user/following"
  20740. },
  20741. listFollowingForUser: {
  20742. method: "GET",
  20743. params: {
  20744. page: {
  20745. type: "integer"
  20746. },
  20747. per_page: {
  20748. type: "integer"
  20749. },
  20750. username: {
  20751. required: true,
  20752. type: "string"
  20753. }
  20754. },
  20755. url: "/users/:username/following"
  20756. },
  20757. listGpgKeys: {
  20758. method: "GET",
  20759. params: {
  20760. page: {
  20761. type: "integer"
  20762. },
  20763. per_page: {
  20764. type: "integer"
  20765. }
  20766. },
  20767. url: "/user/gpg_keys"
  20768. },
  20769. listGpgKeysForUser: {
  20770. method: "GET",
  20771. params: {
  20772. page: {
  20773. type: "integer"
  20774. },
  20775. per_page: {
  20776. type: "integer"
  20777. },
  20778. username: {
  20779. required: true,
  20780. type: "string"
  20781. }
  20782. },
  20783. url: "/users/:username/gpg_keys"
  20784. },
  20785. listPublicEmails: {
  20786. method: "GET",
  20787. params: {
  20788. page: {
  20789. type: "integer"
  20790. },
  20791. per_page: {
  20792. type: "integer"
  20793. }
  20794. },
  20795. url: "/user/public_emails"
  20796. },
  20797. listPublicKeys: {
  20798. method: "GET",
  20799. params: {
  20800. page: {
  20801. type: "integer"
  20802. },
  20803. per_page: {
  20804. type: "integer"
  20805. }
  20806. },
  20807. url: "/user/keys"
  20808. },
  20809. listPublicKeysForUser: {
  20810. method: "GET",
  20811. params: {
  20812. page: {
  20813. type: "integer"
  20814. },
  20815. per_page: {
  20816. type: "integer"
  20817. },
  20818. username: {
  20819. required: true,
  20820. type: "string"
  20821. }
  20822. },
  20823. url: "/users/:username/keys"
  20824. },
  20825. togglePrimaryEmailVisibility: {
  20826. method: "PATCH",
  20827. params: {
  20828. email: {
  20829. required: true,
  20830. type: "string"
  20831. },
  20832. visibility: {
  20833. required: true,
  20834. type: "string"
  20835. }
  20836. },
  20837. url: "/user/email/visibility"
  20838. },
  20839. unblock: {
  20840. method: "DELETE",
  20841. params: {
  20842. username: {
  20843. required: true,
  20844. type: "string"
  20845. }
  20846. },
  20847. url: "/user/blocks/:username"
  20848. },
  20849. unfollow: {
  20850. method: "DELETE",
  20851. params: {
  20852. username: {
  20853. required: true,
  20854. type: "string"
  20855. }
  20856. },
  20857. url: "/user/following/:username"
  20858. },
  20859. updateAuthenticated: {
  20860. method: "PATCH",
  20861. params: {
  20862. bio: {
  20863. type: "string"
  20864. },
  20865. blog: {
  20866. type: "string"
  20867. },
  20868. company: {
  20869. type: "string"
  20870. },
  20871. email: {
  20872. type: "string"
  20873. },
  20874. hireable: {
  20875. type: "boolean"
  20876. },
  20877. location: {
  20878. type: "string"
  20879. },
  20880. name: {
  20881. type: "string"
  20882. }
  20883. },
  20884. url: "/user"
  20885. }
  20886. }
  20887. };
  20888. const VERSION = "2.4.0";
  20889. function registerEndpoints(octokit, routes) {
  20890. Object.keys(routes).forEach(namespaceName => {
  20891. if (!octokit[namespaceName]) {
  20892. octokit[namespaceName] = {};
  20893. }
  20894. Object.keys(routes[namespaceName]).forEach(apiName => {
  20895. const apiOptions = routes[namespaceName][apiName];
  20896. const endpointDefaults = ["method", "url", "headers"].reduce((map, key) => {
  20897. if (typeof apiOptions[key] !== "undefined") {
  20898. map[key] = apiOptions[key];
  20899. }
  20900. return map;
  20901. }, {});
  20902. endpointDefaults.request = {
  20903. validate: apiOptions.params
  20904. };
  20905. let request = octokit.request.defaults(endpointDefaults); // patch request & endpoint methods to support deprecated parameters.
  20906. // Not the most elegant solution, but we don’t want to move deprecation
  20907. // logic into octokit/endpoint.js as it’s out of scope
  20908. const hasDeprecatedParam = Object.keys(apiOptions.params || {}).find(key => apiOptions.params[key].deprecated);
  20909. if (hasDeprecatedParam) {
  20910. const patch = patchForDeprecation.bind(null, octokit, apiOptions);
  20911. request = patch(octokit.request.defaults(endpointDefaults), `.${namespaceName}.${apiName}()`);
  20912. request.endpoint = patch(request.endpoint, `.${namespaceName}.${apiName}.endpoint()`);
  20913. request.endpoint.merge = patch(request.endpoint.merge, `.${namespaceName}.${apiName}.endpoint.merge()`);
  20914. }
  20915. if (apiOptions.deprecated) {
  20916. octokit[namespaceName][apiName] = Object.assign(function deprecatedEndpointMethod() {
  20917. octokit.log.warn(new deprecation.Deprecation(`[@octokit/rest] ${apiOptions.deprecated}`));
  20918. octokit[namespaceName][apiName] = request;
  20919. return request.apply(null, arguments);
  20920. }, request);
  20921. return;
  20922. }
  20923. octokit[namespaceName][apiName] = request;
  20924. });
  20925. });
  20926. }
  20927. function patchForDeprecation(octokit, apiOptions, method, methodName) {
  20928. const patchedMethod = options => {
  20929. options = Object.assign({}, options);
  20930. Object.keys(options).forEach(key => {
  20931. if (apiOptions.params[key] && apiOptions.params[key].deprecated) {
  20932. const aliasKey = apiOptions.params[key].alias;
  20933. octokit.log.warn(new deprecation.Deprecation(`[@octokit/rest] "${key}" parameter is deprecated for "${methodName}". Use "${aliasKey}" instead`));
  20934. if (!(aliasKey in options)) {
  20935. options[aliasKey] = options[key];
  20936. }
  20937. delete options[key];
  20938. }
  20939. });
  20940. return method(options);
  20941. };
  20942. Object.keys(method).forEach(key => {
  20943. patchedMethod[key] = method[key];
  20944. });
  20945. return patchedMethod;
  20946. }
  20947. /**
  20948. * This plugin is a 1:1 copy of internal @octokit/rest plugins. The primary
  20949. * goal is to rebuild @octokit/rest on top of @octokit/core. Once that is
  20950. * done, we will remove the registerEndpoints methods and return the methods
  20951. * directly as with the other plugins. At that point we will also remove the
  20952. * legacy workarounds and deprecations.
  20953. *
  20954. * See the plan at
  20955. * https://github.com/octokit/plugin-rest-endpoint-methods.js/pull/1
  20956. */
  20957. function restEndpointMethods(octokit) {
  20958. // @ts-ignore
  20959. octokit.registerEndpoints = registerEndpoints.bind(null, octokit);
  20960. registerEndpoints(octokit, endpointsByScope); // Aliasing scopes for backward compatibility
  20961. // See https://github.com/octokit/rest.js/pull/1134
  20962. [["gitdata", "git"], ["authorization", "oauthAuthorizations"], ["pullRequests", "pulls"]].forEach(([deprecatedScope, scope]) => {
  20963. Object.defineProperty(octokit, deprecatedScope, {
  20964. get() {
  20965. octokit.log.warn( // @ts-ignore
  20966. new deprecation.Deprecation(`[@octokit/plugin-rest-endpoint-methods] "octokit.${deprecatedScope}.*" methods are deprecated, use "octokit.${scope}.*" instead`)); // @ts-ignore
  20967. return octokit[scope];
  20968. }
  20969. });
  20970. });
  20971. return {};
  20972. }
  20973. restEndpointMethods.VERSION = VERSION;
  20974. exports.restEndpointMethods = restEndpointMethods;
  20975. //# sourceMappingURL=index.js.map
  20976. /***/ }),
  20977. /***/ 850:
  20978. /***/ (function(module, __unusedexports, __webpack_require__) {
  20979. module.exports = paginationMethodsPlugin
  20980. function paginationMethodsPlugin (octokit) {
  20981. octokit.getFirstPage = __webpack_require__(777).bind(null, octokit)
  20982. octokit.getLastPage = __webpack_require__(649).bind(null, octokit)
  20983. octokit.getNextPage = __webpack_require__(550).bind(null, octokit)
  20984. octokit.getPreviousPage = __webpack_require__(563).bind(null, octokit)
  20985. octokit.hasFirstPage = __webpack_require__(536)
  20986. octokit.hasLastPage = __webpack_require__(336)
  20987. octokit.hasNextPage = __webpack_require__(929)
  20988. octokit.hasPreviousPage = __webpack_require__(558)
  20989. }
  20990. /***/ }),
  20991. /***/ 854:
  20992. /***/ (function(module) {
  20993. /**
  20994. * lodash (Custom Build) <https://lodash.com/>
  20995. * Build: `lodash modularize exports="npm" -o ./`
  20996. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  20997. * Released under MIT license <https://lodash.com/license>
  20998. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  20999. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  21000. */
  21001. /** Used as the `TypeError` message for "Functions" methods. */
  21002. var FUNC_ERROR_TEXT = 'Expected a function';
  21003. /** Used to stand-in for `undefined` hash values. */
  21004. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  21005. /** Used as references for various `Number` constants. */
  21006. var INFINITY = 1 / 0;
  21007. /** `Object#toString` result references. */
  21008. var funcTag = '[object Function]',
  21009. genTag = '[object GeneratorFunction]',
  21010. symbolTag = '[object Symbol]';
  21011. /** Used to match property names within property paths. */
  21012. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  21013. reIsPlainProp = /^\w*$/,
  21014. reLeadingDot = /^\./,
  21015. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  21016. /**
  21017. * Used to match `RegExp`
  21018. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  21019. */
  21020. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  21021. /** Used to match backslashes in property paths. */
  21022. var reEscapeChar = /\\(\\)?/g;
  21023. /** Used to detect host constructors (Safari). */
  21024. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  21025. /** Detect free variable `global` from Node.js. */
  21026. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  21027. /** Detect free variable `self`. */
  21028. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  21029. /** Used as a reference to the global object. */
  21030. var root = freeGlobal || freeSelf || Function('return this')();
  21031. /**
  21032. * Gets the value at `key` of `object`.
  21033. *
  21034. * @private
  21035. * @param {Object} [object] The object to query.
  21036. * @param {string} key The key of the property to get.
  21037. * @returns {*} Returns the property value.
  21038. */
  21039. function getValue(object, key) {
  21040. return object == null ? undefined : object[key];
  21041. }
  21042. /**
  21043. * Checks if `value` is a host object in IE < 9.
  21044. *
  21045. * @private
  21046. * @param {*} value The value to check.
  21047. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  21048. */
  21049. function isHostObject(value) {
  21050. // Many host objects are `Object` objects that can coerce to strings
  21051. // despite having improperly defined `toString` methods.
  21052. var result = false;
  21053. if (value != null && typeof value.toString != 'function') {
  21054. try {
  21055. result = !!(value + '');
  21056. } catch (e) {}
  21057. }
  21058. return result;
  21059. }
  21060. /** Used for built-in method references. */
  21061. var arrayProto = Array.prototype,
  21062. funcProto = Function.prototype,
  21063. objectProto = Object.prototype;
  21064. /** Used to detect overreaching core-js shims. */
  21065. var coreJsData = root['__core-js_shared__'];
  21066. /** Used to detect methods masquerading as native. */
  21067. var maskSrcKey = (function() {
  21068. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  21069. return uid ? ('Symbol(src)_1.' + uid) : '';
  21070. }());
  21071. /** Used to resolve the decompiled source of functions. */
  21072. var funcToString = funcProto.toString;
  21073. /** Used to check objects for own properties. */
  21074. var hasOwnProperty = objectProto.hasOwnProperty;
  21075. /**
  21076. * Used to resolve the
  21077. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  21078. * of values.
  21079. */
  21080. var objectToString = objectProto.toString;
  21081. /** Used to detect if a method is native. */
  21082. var reIsNative = RegExp('^' +
  21083. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  21084. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  21085. );
  21086. /** Built-in value references. */
  21087. var Symbol = root.Symbol,
  21088. splice = arrayProto.splice;
  21089. /* Built-in method references that are verified to be native. */
  21090. var Map = getNative(root, 'Map'),
  21091. nativeCreate = getNative(Object, 'create');
  21092. /** Used to convert symbols to primitives and strings. */
  21093. var symbolProto = Symbol ? Symbol.prototype : undefined,
  21094. symbolToString = symbolProto ? symbolProto.toString : undefined;
  21095. /**
  21096. * Creates a hash object.
  21097. *
  21098. * @private
  21099. * @constructor
  21100. * @param {Array} [entries] The key-value pairs to cache.
  21101. */
  21102. function Hash(entries) {
  21103. var index = -1,
  21104. length = entries ? entries.length : 0;
  21105. this.clear();
  21106. while (++index < length) {
  21107. var entry = entries[index];
  21108. this.set(entry[0], entry[1]);
  21109. }
  21110. }
  21111. /**
  21112. * Removes all key-value entries from the hash.
  21113. *
  21114. * @private
  21115. * @name clear
  21116. * @memberOf Hash
  21117. */
  21118. function hashClear() {
  21119. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  21120. }
  21121. /**
  21122. * Removes `key` and its value from the hash.
  21123. *
  21124. * @private
  21125. * @name delete
  21126. * @memberOf Hash
  21127. * @param {Object} hash The hash to modify.
  21128. * @param {string} key The key of the value to remove.
  21129. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  21130. */
  21131. function hashDelete(key) {
  21132. return this.has(key) && delete this.__data__[key];
  21133. }
  21134. /**
  21135. * Gets the hash value for `key`.
  21136. *
  21137. * @private
  21138. * @name get
  21139. * @memberOf Hash
  21140. * @param {string} key The key of the value to get.
  21141. * @returns {*} Returns the entry value.
  21142. */
  21143. function hashGet(key) {
  21144. var data = this.__data__;
  21145. if (nativeCreate) {
  21146. var result = data[key];
  21147. return result === HASH_UNDEFINED ? undefined : result;
  21148. }
  21149. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  21150. }
  21151. /**
  21152. * Checks if a hash value for `key` exists.
  21153. *
  21154. * @private
  21155. * @name has
  21156. * @memberOf Hash
  21157. * @param {string} key The key of the entry to check.
  21158. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  21159. */
  21160. function hashHas(key) {
  21161. var data = this.__data__;
  21162. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  21163. }
  21164. /**
  21165. * Sets the hash `key` to `value`.
  21166. *
  21167. * @private
  21168. * @name set
  21169. * @memberOf Hash
  21170. * @param {string} key The key of the value to set.
  21171. * @param {*} value The value to set.
  21172. * @returns {Object} Returns the hash instance.
  21173. */
  21174. function hashSet(key, value) {
  21175. var data = this.__data__;
  21176. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  21177. return this;
  21178. }
  21179. // Add methods to `Hash`.
  21180. Hash.prototype.clear = hashClear;
  21181. Hash.prototype['delete'] = hashDelete;
  21182. Hash.prototype.get = hashGet;
  21183. Hash.prototype.has = hashHas;
  21184. Hash.prototype.set = hashSet;
  21185. /**
  21186. * Creates an list cache object.
  21187. *
  21188. * @private
  21189. * @constructor
  21190. * @param {Array} [entries] The key-value pairs to cache.
  21191. */
  21192. function ListCache(entries) {
  21193. var index = -1,
  21194. length = entries ? entries.length : 0;
  21195. this.clear();
  21196. while (++index < length) {
  21197. var entry = entries[index];
  21198. this.set(entry[0], entry[1]);
  21199. }
  21200. }
  21201. /**
  21202. * Removes all key-value entries from the list cache.
  21203. *
  21204. * @private
  21205. * @name clear
  21206. * @memberOf ListCache
  21207. */
  21208. function listCacheClear() {
  21209. this.__data__ = [];
  21210. }
  21211. /**
  21212. * Removes `key` and its value from the list cache.
  21213. *
  21214. * @private
  21215. * @name delete
  21216. * @memberOf ListCache
  21217. * @param {string} key The key of the value to remove.
  21218. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  21219. */
  21220. function listCacheDelete(key) {
  21221. var data = this.__data__,
  21222. index = assocIndexOf(data, key);
  21223. if (index < 0) {
  21224. return false;
  21225. }
  21226. var lastIndex = data.length - 1;
  21227. if (index == lastIndex) {
  21228. data.pop();
  21229. } else {
  21230. splice.call(data, index, 1);
  21231. }
  21232. return true;
  21233. }
  21234. /**
  21235. * Gets the list cache value for `key`.
  21236. *
  21237. * @private
  21238. * @name get
  21239. * @memberOf ListCache
  21240. * @param {string} key The key of the value to get.
  21241. * @returns {*} Returns the entry value.
  21242. */
  21243. function listCacheGet(key) {
  21244. var data = this.__data__,
  21245. index = assocIndexOf(data, key);
  21246. return index < 0 ? undefined : data[index][1];
  21247. }
  21248. /**
  21249. * Checks if a list cache value for `key` exists.
  21250. *
  21251. * @private
  21252. * @name has
  21253. * @memberOf ListCache
  21254. * @param {string} key The key of the entry to check.
  21255. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  21256. */
  21257. function listCacheHas(key) {
  21258. return assocIndexOf(this.__data__, key) > -1;
  21259. }
  21260. /**
  21261. * Sets the list cache `key` to `value`.
  21262. *
  21263. * @private
  21264. * @name set
  21265. * @memberOf ListCache
  21266. * @param {string} key The key of the value to set.
  21267. * @param {*} value The value to set.
  21268. * @returns {Object} Returns the list cache instance.
  21269. */
  21270. function listCacheSet(key, value) {
  21271. var data = this.__data__,
  21272. index = assocIndexOf(data, key);
  21273. if (index < 0) {
  21274. data.push([key, value]);
  21275. } else {
  21276. data[index][1] = value;
  21277. }
  21278. return this;
  21279. }
  21280. // Add methods to `ListCache`.
  21281. ListCache.prototype.clear = listCacheClear;
  21282. ListCache.prototype['delete'] = listCacheDelete;
  21283. ListCache.prototype.get = listCacheGet;
  21284. ListCache.prototype.has = listCacheHas;
  21285. ListCache.prototype.set = listCacheSet;
  21286. /**
  21287. * Creates a map cache object to store key-value pairs.
  21288. *
  21289. * @private
  21290. * @constructor
  21291. * @param {Array} [entries] The key-value pairs to cache.
  21292. */
  21293. function MapCache(entries) {
  21294. var index = -1,
  21295. length = entries ? entries.length : 0;
  21296. this.clear();
  21297. while (++index < length) {
  21298. var entry = entries[index];
  21299. this.set(entry[0], entry[1]);
  21300. }
  21301. }
  21302. /**
  21303. * Removes all key-value entries from the map.
  21304. *
  21305. * @private
  21306. * @name clear
  21307. * @memberOf MapCache
  21308. */
  21309. function mapCacheClear() {
  21310. this.__data__ = {
  21311. 'hash': new Hash,
  21312. 'map': new (Map || ListCache),
  21313. 'string': new Hash
  21314. };
  21315. }
  21316. /**
  21317. * Removes `key` and its value from the map.
  21318. *
  21319. * @private
  21320. * @name delete
  21321. * @memberOf MapCache
  21322. * @param {string} key The key of the value to remove.
  21323. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  21324. */
  21325. function mapCacheDelete(key) {
  21326. return getMapData(this, key)['delete'](key);
  21327. }
  21328. /**
  21329. * Gets the map value for `key`.
  21330. *
  21331. * @private
  21332. * @name get
  21333. * @memberOf MapCache
  21334. * @param {string} key The key of the value to get.
  21335. * @returns {*} Returns the entry value.
  21336. */
  21337. function mapCacheGet(key) {
  21338. return getMapData(this, key).get(key);
  21339. }
  21340. /**
  21341. * Checks if a map value for `key` exists.
  21342. *
  21343. * @private
  21344. * @name has
  21345. * @memberOf MapCache
  21346. * @param {string} key The key of the entry to check.
  21347. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  21348. */
  21349. function mapCacheHas(key) {
  21350. return getMapData(this, key).has(key);
  21351. }
  21352. /**
  21353. * Sets the map `key` to `value`.
  21354. *
  21355. * @private
  21356. * @name set
  21357. * @memberOf MapCache
  21358. * @param {string} key The key of the value to set.
  21359. * @param {*} value The value to set.
  21360. * @returns {Object} Returns the map cache instance.
  21361. */
  21362. function mapCacheSet(key, value) {
  21363. getMapData(this, key).set(key, value);
  21364. return this;
  21365. }
  21366. // Add methods to `MapCache`.
  21367. MapCache.prototype.clear = mapCacheClear;
  21368. MapCache.prototype['delete'] = mapCacheDelete;
  21369. MapCache.prototype.get = mapCacheGet;
  21370. MapCache.prototype.has = mapCacheHas;
  21371. MapCache.prototype.set = mapCacheSet;
  21372. /**
  21373. * Gets the index at which the `key` is found in `array` of key-value pairs.
  21374. *
  21375. * @private
  21376. * @param {Array} array The array to inspect.
  21377. * @param {*} key The key to search for.
  21378. * @returns {number} Returns the index of the matched value, else `-1`.
  21379. */
  21380. function assocIndexOf(array, key) {
  21381. var length = array.length;
  21382. while (length--) {
  21383. if (eq(array[length][0], key)) {
  21384. return length;
  21385. }
  21386. }
  21387. return -1;
  21388. }
  21389. /**
  21390. * The base implementation of `_.get` without support for default values.
  21391. *
  21392. * @private
  21393. * @param {Object} object The object to query.
  21394. * @param {Array|string} path The path of the property to get.
  21395. * @returns {*} Returns the resolved value.
  21396. */
  21397. function baseGet(object, path) {
  21398. path = isKey(path, object) ? [path] : castPath(path);
  21399. var index = 0,
  21400. length = path.length;
  21401. while (object != null && index < length) {
  21402. object = object[toKey(path[index++])];
  21403. }
  21404. return (index && index == length) ? object : undefined;
  21405. }
  21406. /**
  21407. * The base implementation of `_.isNative` without bad shim checks.
  21408. *
  21409. * @private
  21410. * @param {*} value The value to check.
  21411. * @returns {boolean} Returns `true` if `value` is a native function,
  21412. * else `false`.
  21413. */
  21414. function baseIsNative(value) {
  21415. if (!isObject(value) || isMasked(value)) {
  21416. return false;
  21417. }
  21418. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  21419. return pattern.test(toSource(value));
  21420. }
  21421. /**
  21422. * The base implementation of `_.toString` which doesn't convert nullish
  21423. * values to empty strings.
  21424. *
  21425. * @private
  21426. * @param {*} value The value to process.
  21427. * @returns {string} Returns the string.
  21428. */
  21429. function baseToString(value) {
  21430. // Exit early for strings to avoid a performance hit in some environments.
  21431. if (typeof value == 'string') {
  21432. return value;
  21433. }
  21434. if (isSymbol(value)) {
  21435. return symbolToString ? symbolToString.call(value) : '';
  21436. }
  21437. var result = (value + '');
  21438. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  21439. }
  21440. /**
  21441. * Casts `value` to a path array if it's not one.
  21442. *
  21443. * @private
  21444. * @param {*} value The value to inspect.
  21445. * @returns {Array} Returns the cast property path array.
  21446. */
  21447. function castPath(value) {
  21448. return isArray(value) ? value : stringToPath(value);
  21449. }
  21450. /**
  21451. * Gets the data for `map`.
  21452. *
  21453. * @private
  21454. * @param {Object} map The map to query.
  21455. * @param {string} key The reference key.
  21456. * @returns {*} Returns the map data.
  21457. */
  21458. function getMapData(map, key) {
  21459. var data = map.__data__;
  21460. return isKeyable(key)
  21461. ? data[typeof key == 'string' ? 'string' : 'hash']
  21462. : data.map;
  21463. }
  21464. /**
  21465. * Gets the native function at `key` of `object`.
  21466. *
  21467. * @private
  21468. * @param {Object} object The object to query.
  21469. * @param {string} key The key of the method to get.
  21470. * @returns {*} Returns the function if it's native, else `undefined`.
  21471. */
  21472. function getNative(object, key) {
  21473. var value = getValue(object, key);
  21474. return baseIsNative(value) ? value : undefined;
  21475. }
  21476. /**
  21477. * Checks if `value` is a property name and not a property path.
  21478. *
  21479. * @private
  21480. * @param {*} value The value to check.
  21481. * @param {Object} [object] The object to query keys on.
  21482. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  21483. */
  21484. function isKey(value, object) {
  21485. if (isArray(value)) {
  21486. return false;
  21487. }
  21488. var type = typeof value;
  21489. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  21490. value == null || isSymbol(value)) {
  21491. return true;
  21492. }
  21493. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  21494. (object != null && value in Object(object));
  21495. }
  21496. /**
  21497. * Checks if `value` is suitable for use as unique object key.
  21498. *
  21499. * @private
  21500. * @param {*} value The value to check.
  21501. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  21502. */
  21503. function isKeyable(value) {
  21504. var type = typeof value;
  21505. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  21506. ? (value !== '__proto__')
  21507. : (value === null);
  21508. }
  21509. /**
  21510. * Checks if `func` has its source masked.
  21511. *
  21512. * @private
  21513. * @param {Function} func The function to check.
  21514. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  21515. */
  21516. function isMasked(func) {
  21517. return !!maskSrcKey && (maskSrcKey in func);
  21518. }
  21519. /**
  21520. * Converts `string` to a property path array.
  21521. *
  21522. * @private
  21523. * @param {string} string The string to convert.
  21524. * @returns {Array} Returns the property path array.
  21525. */
  21526. var stringToPath = memoize(function(string) {
  21527. string = toString(string);
  21528. var result = [];
  21529. if (reLeadingDot.test(string)) {
  21530. result.push('');
  21531. }
  21532. string.replace(rePropName, function(match, number, quote, string) {
  21533. result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
  21534. });
  21535. return result;
  21536. });
  21537. /**
  21538. * Converts `value` to a string key if it's not a string or symbol.
  21539. *
  21540. * @private
  21541. * @param {*} value The value to inspect.
  21542. * @returns {string|symbol} Returns the key.
  21543. */
  21544. function toKey(value) {
  21545. if (typeof value == 'string' || isSymbol(value)) {
  21546. return value;
  21547. }
  21548. var result = (value + '');
  21549. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  21550. }
  21551. /**
  21552. * Converts `func` to its source code.
  21553. *
  21554. * @private
  21555. * @param {Function} func The function to process.
  21556. * @returns {string} Returns the source code.
  21557. */
  21558. function toSource(func) {
  21559. if (func != null) {
  21560. try {
  21561. return funcToString.call(func);
  21562. } catch (e) {}
  21563. try {
  21564. return (func + '');
  21565. } catch (e) {}
  21566. }
  21567. return '';
  21568. }
  21569. /**
  21570. * Creates a function that memoizes the result of `func`. If `resolver` is
  21571. * provided, it determines the cache key for storing the result based on the
  21572. * arguments provided to the memoized function. By default, the first argument
  21573. * provided to the memoized function is used as the map cache key. The `func`
  21574. * is invoked with the `this` binding of the memoized function.
  21575. *
  21576. * **Note:** The cache is exposed as the `cache` property on the memoized
  21577. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  21578. * constructor with one whose instances implement the
  21579. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  21580. * method interface of `delete`, `get`, `has`, and `set`.
  21581. *
  21582. * @static
  21583. * @memberOf _
  21584. * @since 0.1.0
  21585. * @category Function
  21586. * @param {Function} func The function to have its output memoized.
  21587. * @param {Function} [resolver] The function to resolve the cache key.
  21588. * @returns {Function} Returns the new memoized function.
  21589. * @example
  21590. *
  21591. * var object = { 'a': 1, 'b': 2 };
  21592. * var other = { 'c': 3, 'd': 4 };
  21593. *
  21594. * var values = _.memoize(_.values);
  21595. * values(object);
  21596. * // => [1, 2]
  21597. *
  21598. * values(other);
  21599. * // => [3, 4]
  21600. *
  21601. * object.a = 2;
  21602. * values(object);
  21603. * // => [1, 2]
  21604. *
  21605. * // Modify the result cache.
  21606. * values.cache.set(object, ['a', 'b']);
  21607. * values(object);
  21608. * // => ['a', 'b']
  21609. *
  21610. * // Replace `_.memoize.Cache`.
  21611. * _.memoize.Cache = WeakMap;
  21612. */
  21613. function memoize(func, resolver) {
  21614. if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
  21615. throw new TypeError(FUNC_ERROR_TEXT);
  21616. }
  21617. var memoized = function() {
  21618. var args = arguments,
  21619. key = resolver ? resolver.apply(this, args) : args[0],
  21620. cache = memoized.cache;
  21621. if (cache.has(key)) {
  21622. return cache.get(key);
  21623. }
  21624. var result = func.apply(this, args);
  21625. memoized.cache = cache.set(key, result);
  21626. return result;
  21627. };
  21628. memoized.cache = new (memoize.Cache || MapCache);
  21629. return memoized;
  21630. }
  21631. // Assign cache to `_.memoize`.
  21632. memoize.Cache = MapCache;
  21633. /**
  21634. * Performs a
  21635. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  21636. * comparison between two values to determine if they are equivalent.
  21637. *
  21638. * @static
  21639. * @memberOf _
  21640. * @since 4.0.0
  21641. * @category Lang
  21642. * @param {*} value The value to compare.
  21643. * @param {*} other The other value to compare.
  21644. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  21645. * @example
  21646. *
  21647. * var object = { 'a': 1 };
  21648. * var other = { 'a': 1 };
  21649. *
  21650. * _.eq(object, object);
  21651. * // => true
  21652. *
  21653. * _.eq(object, other);
  21654. * // => false
  21655. *
  21656. * _.eq('a', 'a');
  21657. * // => true
  21658. *
  21659. * _.eq('a', Object('a'));
  21660. * // => false
  21661. *
  21662. * _.eq(NaN, NaN);
  21663. * // => true
  21664. */
  21665. function eq(value, other) {
  21666. return value === other || (value !== value && other !== other);
  21667. }
  21668. /**
  21669. * Checks if `value` is classified as an `Array` object.
  21670. *
  21671. * @static
  21672. * @memberOf _
  21673. * @since 0.1.0
  21674. * @category Lang
  21675. * @param {*} value The value to check.
  21676. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  21677. * @example
  21678. *
  21679. * _.isArray([1, 2, 3]);
  21680. * // => true
  21681. *
  21682. * _.isArray(document.body.children);
  21683. * // => false
  21684. *
  21685. * _.isArray('abc');
  21686. * // => false
  21687. *
  21688. * _.isArray(_.noop);
  21689. * // => false
  21690. */
  21691. var isArray = Array.isArray;
  21692. /**
  21693. * Checks if `value` is classified as a `Function` object.
  21694. *
  21695. * @static
  21696. * @memberOf _
  21697. * @since 0.1.0
  21698. * @category Lang
  21699. * @param {*} value The value to check.
  21700. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  21701. * @example
  21702. *
  21703. * _.isFunction(_);
  21704. * // => true
  21705. *
  21706. * _.isFunction(/abc/);
  21707. * // => false
  21708. */
  21709. function isFunction(value) {
  21710. // The use of `Object#toString` avoids issues with the `typeof` operator
  21711. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  21712. var tag = isObject(value) ? objectToString.call(value) : '';
  21713. return tag == funcTag || tag == genTag;
  21714. }
  21715. /**
  21716. * Checks if `value` is the
  21717. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  21718. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  21719. *
  21720. * @static
  21721. * @memberOf _
  21722. * @since 0.1.0
  21723. * @category Lang
  21724. * @param {*} value The value to check.
  21725. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  21726. * @example
  21727. *
  21728. * _.isObject({});
  21729. * // => true
  21730. *
  21731. * _.isObject([1, 2, 3]);
  21732. * // => true
  21733. *
  21734. * _.isObject(_.noop);
  21735. * // => true
  21736. *
  21737. * _.isObject(null);
  21738. * // => false
  21739. */
  21740. function isObject(value) {
  21741. var type = typeof value;
  21742. return !!value && (type == 'object' || type == 'function');
  21743. }
  21744. /**
  21745. * Checks if `value` is object-like. A value is object-like if it's not `null`
  21746. * and has a `typeof` result of "object".
  21747. *
  21748. * @static
  21749. * @memberOf _
  21750. * @since 4.0.0
  21751. * @category Lang
  21752. * @param {*} value The value to check.
  21753. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  21754. * @example
  21755. *
  21756. * _.isObjectLike({});
  21757. * // => true
  21758. *
  21759. * _.isObjectLike([1, 2, 3]);
  21760. * // => true
  21761. *
  21762. * _.isObjectLike(_.noop);
  21763. * // => false
  21764. *
  21765. * _.isObjectLike(null);
  21766. * // => false
  21767. */
  21768. function isObjectLike(value) {
  21769. return !!value && typeof value == 'object';
  21770. }
  21771. /**
  21772. * Checks if `value` is classified as a `Symbol` primitive or object.
  21773. *
  21774. * @static
  21775. * @memberOf _
  21776. * @since 4.0.0
  21777. * @category Lang
  21778. * @param {*} value The value to check.
  21779. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  21780. * @example
  21781. *
  21782. * _.isSymbol(Symbol.iterator);
  21783. * // => true
  21784. *
  21785. * _.isSymbol('abc');
  21786. * // => false
  21787. */
  21788. function isSymbol(value) {
  21789. return typeof value == 'symbol' ||
  21790. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  21791. }
  21792. /**
  21793. * Converts `value` to a string. An empty string is returned for `null`
  21794. * and `undefined` values. The sign of `-0` is preserved.
  21795. *
  21796. * @static
  21797. * @memberOf _
  21798. * @since 4.0.0
  21799. * @category Lang
  21800. * @param {*} value The value to process.
  21801. * @returns {string} Returns the string.
  21802. * @example
  21803. *
  21804. * _.toString(null);
  21805. * // => ''
  21806. *
  21807. * _.toString(-0);
  21808. * // => '-0'
  21809. *
  21810. * _.toString([1, 2, 3]);
  21811. * // => '1,2,3'
  21812. */
  21813. function toString(value) {
  21814. return value == null ? '' : baseToString(value);
  21815. }
  21816. /**
  21817. * Gets the value at `path` of `object`. If the resolved value is
  21818. * `undefined`, the `defaultValue` is returned in its place.
  21819. *
  21820. * @static
  21821. * @memberOf _
  21822. * @since 3.7.0
  21823. * @category Object
  21824. * @param {Object} object The object to query.
  21825. * @param {Array|string} path The path of the property to get.
  21826. * @param {*} [defaultValue] The value returned for `undefined` resolved values.
  21827. * @returns {*} Returns the resolved value.
  21828. * @example
  21829. *
  21830. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  21831. *
  21832. * _.get(object, 'a[0].b.c');
  21833. * // => 3
  21834. *
  21835. * _.get(object, ['a', '0', 'b', 'c']);
  21836. * // => 3
  21837. *
  21838. * _.get(object, 'a.b.c', 'default');
  21839. * // => 'default'
  21840. */
  21841. function get(object, path, defaultValue) {
  21842. var result = object == null ? undefined : baseGet(object, path);
  21843. return result === undefined ? defaultValue : result;
  21844. }
  21845. module.exports = get;
  21846. /***/ }),
  21847. /***/ 855:
  21848. /***/ (function(module, __unusedexports, __webpack_require__) {
  21849. module.exports = registerPlugin;
  21850. const factory = __webpack_require__(47);
  21851. function registerPlugin(plugins, pluginFunction) {
  21852. return factory(
  21853. plugins.includes(pluginFunction) ? plugins : plugins.concat(pluginFunction)
  21854. );
  21855. }
  21856. /***/ }),
  21857. /***/ 856:
  21858. /***/ (function(module, __unusedexports, __webpack_require__) {
  21859. module.exports = __webpack_require__(141);
  21860. /***/ }),
  21861. /***/ 863:
  21862. /***/ (function(module, __unusedexports, __webpack_require__) {
  21863. module.exports = authenticationBeforeRequest;
  21864. const btoa = __webpack_require__(675);
  21865. const withAuthorizationPrefix = __webpack_require__(143);
  21866. function authenticationBeforeRequest(state, options) {
  21867. if (typeof state.auth === "string") {
  21868. options.headers.authorization = withAuthorizationPrefix(state.auth);
  21869. return;
  21870. }
  21871. if (state.auth.username) {
  21872. const hash = btoa(`${state.auth.username}:${state.auth.password}`);
  21873. options.headers.authorization = `Basic ${hash}`;
  21874. if (state.otp) {
  21875. options.headers["x-github-otp"] = state.otp;
  21876. }
  21877. return;
  21878. }
  21879. if (state.auth.clientId) {
  21880. // There is a special case for OAuth applications, when `clientId` and `clientSecret` is passed as
  21881. // Basic Authorization instead of query parameters. The only routes where that applies share the same
  21882. // URL though: `/applications/:client_id/tokens/:access_token`.
  21883. //
  21884. // 1. [Check an authorization](https://developer.github.com/v3/oauth_authorizations/#check-an-authorization)
  21885. // 2. [Reset an authorization](https://developer.github.com/v3/oauth_authorizations/#reset-an-authorization)
  21886. // 3. [Revoke an authorization for an application](https://developer.github.com/v3/oauth_authorizations/#revoke-an-authorization-for-an-application)
  21887. //
  21888. // We identify by checking the URL. It must merge both "/applications/:client_id/tokens/:access_token"
  21889. // as well as "/applications/123/tokens/token456"
  21890. if (/\/applications\/:?[\w_]+\/tokens\/:?[\w_]+($|\?)/.test(options.url)) {
  21891. const hash = btoa(`${state.auth.clientId}:${state.auth.clientSecret}`);
  21892. options.headers.authorization = `Basic ${hash}`;
  21893. return;
  21894. }
  21895. options.url += options.url.indexOf("?") === -1 ? "?" : "&";
  21896. options.url += `client_id=${state.auth.clientId}&client_secret=${state.auth.clientSecret}`;
  21897. return;
  21898. }
  21899. return Promise.resolve()
  21900. .then(() => {
  21901. return state.auth();
  21902. })
  21903. .then(authorization => {
  21904. options.headers.authorization = withAuthorizationPrefix(authorization);
  21905. });
  21906. }
  21907. /***/ }),
  21908. /***/ 866:
  21909. /***/ (function(module, __unusedexports, __webpack_require__) {
  21910. "use strict";
  21911. var shebangRegex = __webpack_require__(816);
  21912. module.exports = function (str) {
  21913. var match = str.match(shebangRegex);
  21914. if (!match) {
  21915. return null;
  21916. }
  21917. var arr = match[0].replace(/#! ?/, '').split(' ');
  21918. var bin = arr[0].split('/').pop();
  21919. var arg = arr[1];
  21920. return (bin === 'env' ?
  21921. arg :
  21922. bin + (arg ? ' ' + arg : '')
  21923. );
  21924. };
  21925. /***/ }),
  21926. /***/ 881:
  21927. /***/ (function(module) {
  21928. "use strict";
  21929. const isWin = process.platform === 'win32';
  21930. function notFoundError(original, syscall) {
  21931. return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
  21932. code: 'ENOENT',
  21933. errno: 'ENOENT',
  21934. syscall: `${syscall} ${original.command}`,
  21935. path: original.command,
  21936. spawnargs: original.args,
  21937. });
  21938. }
  21939. function hookChildProcess(cp, parsed) {
  21940. if (!isWin) {
  21941. return;
  21942. }
  21943. const originalEmit = cp.emit;
  21944. cp.emit = function (name, arg1) {
  21945. // If emitting "exit" event and exit code is 1, we need to check if
  21946. // the command exists and emit an "error" instead
  21947. // See https://github.com/IndigoUnited/node-cross-spawn/issues/16
  21948. if (name === 'exit') {
  21949. const err = verifyENOENT(arg1, parsed, 'spawn');
  21950. if (err) {
  21951. return originalEmit.call(cp, 'error', err);
  21952. }
  21953. }
  21954. return originalEmit.apply(cp, arguments); // eslint-disable-line prefer-rest-params
  21955. };
  21956. }
  21957. function verifyENOENT(status, parsed) {
  21958. if (isWin && status === 1 && !parsed.file) {
  21959. return notFoundError(parsed.original, 'spawn');
  21960. }
  21961. return null;
  21962. }
  21963. function verifyENOENTSync(status, parsed) {
  21964. if (isWin && status === 1 && !parsed.file) {
  21965. return notFoundError(parsed.original, 'spawnSync');
  21966. }
  21967. return null;
  21968. }
  21969. module.exports = {
  21970. hookChildProcess,
  21971. verifyENOENT,
  21972. verifyENOENTSync,
  21973. notFoundError,
  21974. };
  21975. /***/ }),
  21976. /***/ 883:
  21977. /***/ (function(module) {
  21978. /**
  21979. * lodash (Custom Build) <https://lodash.com/>
  21980. * Build: `lodash modularize exports="npm" -o ./`
  21981. * Copyright jQuery Foundation and other contributors <https://jquery.org/>
  21982. * Released under MIT license <https://lodash.com/license>
  21983. * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
  21984. * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
  21985. */
  21986. /** Used as the `TypeError` message for "Functions" methods. */
  21987. var FUNC_ERROR_TEXT = 'Expected a function';
  21988. /** Used to stand-in for `undefined` hash values. */
  21989. var HASH_UNDEFINED = '__lodash_hash_undefined__';
  21990. /** Used as references for various `Number` constants. */
  21991. var INFINITY = 1 / 0,
  21992. MAX_SAFE_INTEGER = 9007199254740991;
  21993. /** `Object#toString` result references. */
  21994. var funcTag = '[object Function]',
  21995. genTag = '[object GeneratorFunction]',
  21996. symbolTag = '[object Symbol]';
  21997. /** Used to match property names within property paths. */
  21998. var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
  21999. reIsPlainProp = /^\w*$/,
  22000. reLeadingDot = /^\./,
  22001. rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
  22002. /**
  22003. * Used to match `RegExp`
  22004. * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
  22005. */
  22006. var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
  22007. /** Used to match backslashes in property paths. */
  22008. var reEscapeChar = /\\(\\)?/g;
  22009. /** Used to detect host constructors (Safari). */
  22010. var reIsHostCtor = /^\[object .+?Constructor\]$/;
  22011. /** Used to detect unsigned integer values. */
  22012. var reIsUint = /^(?:0|[1-9]\d*)$/;
  22013. /** Detect free variable `global` from Node.js. */
  22014. var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
  22015. /** Detect free variable `self`. */
  22016. var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
  22017. /** Used as a reference to the global object. */
  22018. var root = freeGlobal || freeSelf || Function('return this')();
  22019. /**
  22020. * Gets the value at `key` of `object`.
  22021. *
  22022. * @private
  22023. * @param {Object} [object] The object to query.
  22024. * @param {string} key The key of the property to get.
  22025. * @returns {*} Returns the property value.
  22026. */
  22027. function getValue(object, key) {
  22028. return object == null ? undefined : object[key];
  22029. }
  22030. /**
  22031. * Checks if `value` is a host object in IE < 9.
  22032. *
  22033. * @private
  22034. * @param {*} value The value to check.
  22035. * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
  22036. */
  22037. function isHostObject(value) {
  22038. // Many host objects are `Object` objects that can coerce to strings
  22039. // despite having improperly defined `toString` methods.
  22040. var result = false;
  22041. if (value != null && typeof value.toString != 'function') {
  22042. try {
  22043. result = !!(value + '');
  22044. } catch (e) {}
  22045. }
  22046. return result;
  22047. }
  22048. /** Used for built-in method references. */
  22049. var arrayProto = Array.prototype,
  22050. funcProto = Function.prototype,
  22051. objectProto = Object.prototype;
  22052. /** Used to detect overreaching core-js shims. */
  22053. var coreJsData = root['__core-js_shared__'];
  22054. /** Used to detect methods masquerading as native. */
  22055. var maskSrcKey = (function() {
  22056. var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
  22057. return uid ? ('Symbol(src)_1.' + uid) : '';
  22058. }());
  22059. /** Used to resolve the decompiled source of functions. */
  22060. var funcToString = funcProto.toString;
  22061. /** Used to check objects for own properties. */
  22062. var hasOwnProperty = objectProto.hasOwnProperty;
  22063. /**
  22064. * Used to resolve the
  22065. * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
  22066. * of values.
  22067. */
  22068. var objectToString = objectProto.toString;
  22069. /** Used to detect if a method is native. */
  22070. var reIsNative = RegExp('^' +
  22071. funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
  22072. .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
  22073. );
  22074. /** Built-in value references. */
  22075. var Symbol = root.Symbol,
  22076. splice = arrayProto.splice;
  22077. /* Built-in method references that are verified to be native. */
  22078. var Map = getNative(root, 'Map'),
  22079. nativeCreate = getNative(Object, 'create');
  22080. /** Used to convert symbols to primitives and strings. */
  22081. var symbolProto = Symbol ? Symbol.prototype : undefined,
  22082. symbolToString = symbolProto ? symbolProto.toString : undefined;
  22083. /**
  22084. * Creates a hash object.
  22085. *
  22086. * @private
  22087. * @constructor
  22088. * @param {Array} [entries] The key-value pairs to cache.
  22089. */
  22090. function Hash(entries) {
  22091. var index = -1,
  22092. length = entries ? entries.length : 0;
  22093. this.clear();
  22094. while (++index < length) {
  22095. var entry = entries[index];
  22096. this.set(entry[0], entry[1]);
  22097. }
  22098. }
  22099. /**
  22100. * Removes all key-value entries from the hash.
  22101. *
  22102. * @private
  22103. * @name clear
  22104. * @memberOf Hash
  22105. */
  22106. function hashClear() {
  22107. this.__data__ = nativeCreate ? nativeCreate(null) : {};
  22108. }
  22109. /**
  22110. * Removes `key` and its value from the hash.
  22111. *
  22112. * @private
  22113. * @name delete
  22114. * @memberOf Hash
  22115. * @param {Object} hash The hash to modify.
  22116. * @param {string} key The key of the value to remove.
  22117. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  22118. */
  22119. function hashDelete(key) {
  22120. return this.has(key) && delete this.__data__[key];
  22121. }
  22122. /**
  22123. * Gets the hash value for `key`.
  22124. *
  22125. * @private
  22126. * @name get
  22127. * @memberOf Hash
  22128. * @param {string} key The key of the value to get.
  22129. * @returns {*} Returns the entry value.
  22130. */
  22131. function hashGet(key) {
  22132. var data = this.__data__;
  22133. if (nativeCreate) {
  22134. var result = data[key];
  22135. return result === HASH_UNDEFINED ? undefined : result;
  22136. }
  22137. return hasOwnProperty.call(data, key) ? data[key] : undefined;
  22138. }
  22139. /**
  22140. * Checks if a hash value for `key` exists.
  22141. *
  22142. * @private
  22143. * @name has
  22144. * @memberOf Hash
  22145. * @param {string} key The key of the entry to check.
  22146. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  22147. */
  22148. function hashHas(key) {
  22149. var data = this.__data__;
  22150. return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
  22151. }
  22152. /**
  22153. * Sets the hash `key` to `value`.
  22154. *
  22155. * @private
  22156. * @name set
  22157. * @memberOf Hash
  22158. * @param {string} key The key of the value to set.
  22159. * @param {*} value The value to set.
  22160. * @returns {Object} Returns the hash instance.
  22161. */
  22162. function hashSet(key, value) {
  22163. var data = this.__data__;
  22164. data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
  22165. return this;
  22166. }
  22167. // Add methods to `Hash`.
  22168. Hash.prototype.clear = hashClear;
  22169. Hash.prototype['delete'] = hashDelete;
  22170. Hash.prototype.get = hashGet;
  22171. Hash.prototype.has = hashHas;
  22172. Hash.prototype.set = hashSet;
  22173. /**
  22174. * Creates an list cache object.
  22175. *
  22176. * @private
  22177. * @constructor
  22178. * @param {Array} [entries] The key-value pairs to cache.
  22179. */
  22180. function ListCache(entries) {
  22181. var index = -1,
  22182. length = entries ? entries.length : 0;
  22183. this.clear();
  22184. while (++index < length) {
  22185. var entry = entries[index];
  22186. this.set(entry[0], entry[1]);
  22187. }
  22188. }
  22189. /**
  22190. * Removes all key-value entries from the list cache.
  22191. *
  22192. * @private
  22193. * @name clear
  22194. * @memberOf ListCache
  22195. */
  22196. function listCacheClear() {
  22197. this.__data__ = [];
  22198. }
  22199. /**
  22200. * Removes `key` and its value from the list cache.
  22201. *
  22202. * @private
  22203. * @name delete
  22204. * @memberOf ListCache
  22205. * @param {string} key The key of the value to remove.
  22206. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  22207. */
  22208. function listCacheDelete(key) {
  22209. var data = this.__data__,
  22210. index = assocIndexOf(data, key);
  22211. if (index < 0) {
  22212. return false;
  22213. }
  22214. var lastIndex = data.length - 1;
  22215. if (index == lastIndex) {
  22216. data.pop();
  22217. } else {
  22218. splice.call(data, index, 1);
  22219. }
  22220. return true;
  22221. }
  22222. /**
  22223. * Gets the list cache value for `key`.
  22224. *
  22225. * @private
  22226. * @name get
  22227. * @memberOf ListCache
  22228. * @param {string} key The key of the value to get.
  22229. * @returns {*} Returns the entry value.
  22230. */
  22231. function listCacheGet(key) {
  22232. var data = this.__data__,
  22233. index = assocIndexOf(data, key);
  22234. return index < 0 ? undefined : data[index][1];
  22235. }
  22236. /**
  22237. * Checks if a list cache value for `key` exists.
  22238. *
  22239. * @private
  22240. * @name has
  22241. * @memberOf ListCache
  22242. * @param {string} key The key of the entry to check.
  22243. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  22244. */
  22245. function listCacheHas(key) {
  22246. return assocIndexOf(this.__data__, key) > -1;
  22247. }
  22248. /**
  22249. * Sets the list cache `key` to `value`.
  22250. *
  22251. * @private
  22252. * @name set
  22253. * @memberOf ListCache
  22254. * @param {string} key The key of the value to set.
  22255. * @param {*} value The value to set.
  22256. * @returns {Object} Returns the list cache instance.
  22257. */
  22258. function listCacheSet(key, value) {
  22259. var data = this.__data__,
  22260. index = assocIndexOf(data, key);
  22261. if (index < 0) {
  22262. data.push([key, value]);
  22263. } else {
  22264. data[index][1] = value;
  22265. }
  22266. return this;
  22267. }
  22268. // Add methods to `ListCache`.
  22269. ListCache.prototype.clear = listCacheClear;
  22270. ListCache.prototype['delete'] = listCacheDelete;
  22271. ListCache.prototype.get = listCacheGet;
  22272. ListCache.prototype.has = listCacheHas;
  22273. ListCache.prototype.set = listCacheSet;
  22274. /**
  22275. * Creates a map cache object to store key-value pairs.
  22276. *
  22277. * @private
  22278. * @constructor
  22279. * @param {Array} [entries] The key-value pairs to cache.
  22280. */
  22281. function MapCache(entries) {
  22282. var index = -1,
  22283. length = entries ? entries.length : 0;
  22284. this.clear();
  22285. while (++index < length) {
  22286. var entry = entries[index];
  22287. this.set(entry[0], entry[1]);
  22288. }
  22289. }
  22290. /**
  22291. * Removes all key-value entries from the map.
  22292. *
  22293. * @private
  22294. * @name clear
  22295. * @memberOf MapCache
  22296. */
  22297. function mapCacheClear() {
  22298. this.__data__ = {
  22299. 'hash': new Hash,
  22300. 'map': new (Map || ListCache),
  22301. 'string': new Hash
  22302. };
  22303. }
  22304. /**
  22305. * Removes `key` and its value from the map.
  22306. *
  22307. * @private
  22308. * @name delete
  22309. * @memberOf MapCache
  22310. * @param {string} key The key of the value to remove.
  22311. * @returns {boolean} Returns `true` if the entry was removed, else `false`.
  22312. */
  22313. function mapCacheDelete(key) {
  22314. return getMapData(this, key)['delete'](key);
  22315. }
  22316. /**
  22317. * Gets the map value for `key`.
  22318. *
  22319. * @private
  22320. * @name get
  22321. * @memberOf MapCache
  22322. * @param {string} key The key of the value to get.
  22323. * @returns {*} Returns the entry value.
  22324. */
  22325. function mapCacheGet(key) {
  22326. return getMapData(this, key).get(key);
  22327. }
  22328. /**
  22329. * Checks if a map value for `key` exists.
  22330. *
  22331. * @private
  22332. * @name has
  22333. * @memberOf MapCache
  22334. * @param {string} key The key of the entry to check.
  22335. * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
  22336. */
  22337. function mapCacheHas(key) {
  22338. return getMapData(this, key).has(key);
  22339. }
  22340. /**
  22341. * Sets the map `key` to `value`.
  22342. *
  22343. * @private
  22344. * @name set
  22345. * @memberOf MapCache
  22346. * @param {string} key The key of the value to set.
  22347. * @param {*} value The value to set.
  22348. * @returns {Object} Returns the map cache instance.
  22349. */
  22350. function mapCacheSet(key, value) {
  22351. getMapData(this, key).set(key, value);
  22352. return this;
  22353. }
  22354. // Add methods to `MapCache`.
  22355. MapCache.prototype.clear = mapCacheClear;
  22356. MapCache.prototype['delete'] = mapCacheDelete;
  22357. MapCache.prototype.get = mapCacheGet;
  22358. MapCache.prototype.has = mapCacheHas;
  22359. MapCache.prototype.set = mapCacheSet;
  22360. /**
  22361. * Assigns `value` to `key` of `object` if the existing value is not equivalent
  22362. * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  22363. * for equality comparisons.
  22364. *
  22365. * @private
  22366. * @param {Object} object The object to modify.
  22367. * @param {string} key The key of the property to assign.
  22368. * @param {*} value The value to assign.
  22369. */
  22370. function assignValue(object, key, value) {
  22371. var objValue = object[key];
  22372. if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
  22373. (value === undefined && !(key in object))) {
  22374. object[key] = value;
  22375. }
  22376. }
  22377. /**
  22378. * Gets the index at which the `key` is found in `array` of key-value pairs.
  22379. *
  22380. * @private
  22381. * @param {Array} array The array to inspect.
  22382. * @param {*} key The key to search for.
  22383. * @returns {number} Returns the index of the matched value, else `-1`.
  22384. */
  22385. function assocIndexOf(array, key) {
  22386. var length = array.length;
  22387. while (length--) {
  22388. if (eq(array[length][0], key)) {
  22389. return length;
  22390. }
  22391. }
  22392. return -1;
  22393. }
  22394. /**
  22395. * The base implementation of `_.isNative` without bad shim checks.
  22396. *
  22397. * @private
  22398. * @param {*} value The value to check.
  22399. * @returns {boolean} Returns `true` if `value` is a native function,
  22400. * else `false`.
  22401. */
  22402. function baseIsNative(value) {
  22403. if (!isObject(value) || isMasked(value)) {
  22404. return false;
  22405. }
  22406. var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
  22407. return pattern.test(toSource(value));
  22408. }
  22409. /**
  22410. * The base implementation of `_.set`.
  22411. *
  22412. * @private
  22413. * @param {Object} object The object to modify.
  22414. * @param {Array|string} path The path of the property to set.
  22415. * @param {*} value The value to set.
  22416. * @param {Function} [customizer] The function to customize path creation.
  22417. * @returns {Object} Returns `object`.
  22418. */
  22419. function baseSet(object, path, value, customizer) {
  22420. if (!isObject(object)) {
  22421. return object;
  22422. }
  22423. path = isKey(path, object) ? [path] : castPath(path);
  22424. var index = -1,
  22425. length = path.length,
  22426. lastIndex = length - 1,
  22427. nested = object;
  22428. while (nested != null && ++index < length) {
  22429. var key = toKey(path[index]),
  22430. newValue = value;
  22431. if (index != lastIndex) {
  22432. var objValue = nested[key];
  22433. newValue = customizer ? customizer(objValue, key, nested) : undefined;
  22434. if (newValue === undefined) {
  22435. newValue = isObject(objValue)
  22436. ? objValue
  22437. : (isIndex(path[index + 1]) ? [] : {});
  22438. }
  22439. }
  22440. assignValue(nested, key, newValue);
  22441. nested = nested[key];
  22442. }
  22443. return object;
  22444. }
  22445. /**
  22446. * The base implementation of `_.toString` which doesn't convert nullish
  22447. * values to empty strings.
  22448. *
  22449. * @private
  22450. * @param {*} value The value to process.
  22451. * @returns {string} Returns the string.
  22452. */
  22453. function baseToString(value) {
  22454. // Exit early for strings to avoid a performance hit in some environments.
  22455. if (typeof value == 'string') {
  22456. return value;
  22457. }
  22458. if (isSymbol(value)) {
  22459. return symbolToString ? symbolToString.call(value) : '';
  22460. }
  22461. var result = (value + '');
  22462. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  22463. }
  22464. /**
  22465. * Casts `value` to a path array if it's not one.
  22466. *
  22467. * @private
  22468. * @param {*} value The value to inspect.
  22469. * @returns {Array} Returns the cast property path array.
  22470. */
  22471. function castPath(value) {
  22472. return isArray(value) ? value : stringToPath(value);
  22473. }
  22474. /**
  22475. * Gets the data for `map`.
  22476. *
  22477. * @private
  22478. * @param {Object} map The map to query.
  22479. * @param {string} key The reference key.
  22480. * @returns {*} Returns the map data.
  22481. */
  22482. function getMapData(map, key) {
  22483. var data = map.__data__;
  22484. return isKeyable(key)
  22485. ? data[typeof key == 'string' ? 'string' : 'hash']
  22486. : data.map;
  22487. }
  22488. /**
  22489. * Gets the native function at `key` of `object`.
  22490. *
  22491. * @private
  22492. * @param {Object} object The object to query.
  22493. * @param {string} key The key of the method to get.
  22494. * @returns {*} Returns the function if it's native, else `undefined`.
  22495. */
  22496. function getNative(object, key) {
  22497. var value = getValue(object, key);
  22498. return baseIsNative(value) ? value : undefined;
  22499. }
  22500. /**
  22501. * Checks if `value` is a valid array-like index.
  22502. *
  22503. * @private
  22504. * @param {*} value The value to check.
  22505. * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
  22506. * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
  22507. */
  22508. function isIndex(value, length) {
  22509. length = length == null ? MAX_SAFE_INTEGER : length;
  22510. return !!length &&
  22511. (typeof value == 'number' || reIsUint.test(value)) &&
  22512. (value > -1 && value % 1 == 0 && value < length);
  22513. }
  22514. /**
  22515. * Checks if `value` is a property name and not a property path.
  22516. *
  22517. * @private
  22518. * @param {*} value The value to check.
  22519. * @param {Object} [object] The object to query keys on.
  22520. * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
  22521. */
  22522. function isKey(value, object) {
  22523. if (isArray(value)) {
  22524. return false;
  22525. }
  22526. var type = typeof value;
  22527. if (type == 'number' || type == 'symbol' || type == 'boolean' ||
  22528. value == null || isSymbol(value)) {
  22529. return true;
  22530. }
  22531. return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
  22532. (object != null && value in Object(object));
  22533. }
  22534. /**
  22535. * Checks if `value` is suitable for use as unique object key.
  22536. *
  22537. * @private
  22538. * @param {*} value The value to check.
  22539. * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
  22540. */
  22541. function isKeyable(value) {
  22542. var type = typeof value;
  22543. return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
  22544. ? (value !== '__proto__')
  22545. : (value === null);
  22546. }
  22547. /**
  22548. * Checks if `func` has its source masked.
  22549. *
  22550. * @private
  22551. * @param {Function} func The function to check.
  22552. * @returns {boolean} Returns `true` if `func` is masked, else `false`.
  22553. */
  22554. function isMasked(func) {
  22555. return !!maskSrcKey && (maskSrcKey in func);
  22556. }
  22557. /**
  22558. * Converts `string` to a property path array.
  22559. *
  22560. * @private
  22561. * @param {string} string The string to convert.
  22562. * @returns {Array} Returns the property path array.
  22563. */
  22564. var stringToPath = memoize(function(string) {
  22565. string = toString(string);
  22566. var result = [];
  22567. if (reLeadingDot.test(string)) {
  22568. result.push('');
  22569. }
  22570. string.replace(rePropName, function(match, number, quote, string) {
  22571. result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));
  22572. });
  22573. return result;
  22574. });
  22575. /**
  22576. * Converts `value` to a string key if it's not a string or symbol.
  22577. *
  22578. * @private
  22579. * @param {*} value The value to inspect.
  22580. * @returns {string|symbol} Returns the key.
  22581. */
  22582. function toKey(value) {
  22583. if (typeof value == 'string' || isSymbol(value)) {
  22584. return value;
  22585. }
  22586. var result = (value + '');
  22587. return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
  22588. }
  22589. /**
  22590. * Converts `func` to its source code.
  22591. *
  22592. * @private
  22593. * @param {Function} func The function to process.
  22594. * @returns {string} Returns the source code.
  22595. */
  22596. function toSource(func) {
  22597. if (func != null) {
  22598. try {
  22599. return funcToString.call(func);
  22600. } catch (e) {}
  22601. try {
  22602. return (func + '');
  22603. } catch (e) {}
  22604. }
  22605. return '';
  22606. }
  22607. /**
  22608. * Creates a function that memoizes the result of `func`. If `resolver` is
  22609. * provided, it determines the cache key for storing the result based on the
  22610. * arguments provided to the memoized function. By default, the first argument
  22611. * provided to the memoized function is used as the map cache key. The `func`
  22612. * is invoked with the `this` binding of the memoized function.
  22613. *
  22614. * **Note:** The cache is exposed as the `cache` property on the memoized
  22615. * function. Its creation may be customized by replacing the `_.memoize.Cache`
  22616. * constructor with one whose instances implement the
  22617. * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
  22618. * method interface of `delete`, `get`, `has`, and `set`.
  22619. *
  22620. * @static
  22621. * @memberOf _
  22622. * @since 0.1.0
  22623. * @category Function
  22624. * @param {Function} func The function to have its output memoized.
  22625. * @param {Function} [resolver] The function to resolve the cache key.
  22626. * @returns {Function} Returns the new memoized function.
  22627. * @example
  22628. *
  22629. * var object = { 'a': 1, 'b': 2 };
  22630. * var other = { 'c': 3, 'd': 4 };
  22631. *
  22632. * var values = _.memoize(_.values);
  22633. * values(object);
  22634. * // => [1, 2]
  22635. *
  22636. * values(other);
  22637. * // => [3, 4]
  22638. *
  22639. * object.a = 2;
  22640. * values(object);
  22641. * // => [1, 2]
  22642. *
  22643. * // Modify the result cache.
  22644. * values.cache.set(object, ['a', 'b']);
  22645. * values(object);
  22646. * // => ['a', 'b']
  22647. *
  22648. * // Replace `_.memoize.Cache`.
  22649. * _.memoize.Cache = WeakMap;
  22650. */
  22651. function memoize(func, resolver) {
  22652. if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
  22653. throw new TypeError(FUNC_ERROR_TEXT);
  22654. }
  22655. var memoized = function() {
  22656. var args = arguments,
  22657. key = resolver ? resolver.apply(this, args) : args[0],
  22658. cache = memoized.cache;
  22659. if (cache.has(key)) {
  22660. return cache.get(key);
  22661. }
  22662. var result = func.apply(this, args);
  22663. memoized.cache = cache.set(key, result);
  22664. return result;
  22665. };
  22666. memoized.cache = new (memoize.Cache || MapCache);
  22667. return memoized;
  22668. }
  22669. // Assign cache to `_.memoize`.
  22670. memoize.Cache = MapCache;
  22671. /**
  22672. * Performs a
  22673. * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
  22674. * comparison between two values to determine if they are equivalent.
  22675. *
  22676. * @static
  22677. * @memberOf _
  22678. * @since 4.0.0
  22679. * @category Lang
  22680. * @param {*} value The value to compare.
  22681. * @param {*} other The other value to compare.
  22682. * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
  22683. * @example
  22684. *
  22685. * var object = { 'a': 1 };
  22686. * var other = { 'a': 1 };
  22687. *
  22688. * _.eq(object, object);
  22689. * // => true
  22690. *
  22691. * _.eq(object, other);
  22692. * // => false
  22693. *
  22694. * _.eq('a', 'a');
  22695. * // => true
  22696. *
  22697. * _.eq('a', Object('a'));
  22698. * // => false
  22699. *
  22700. * _.eq(NaN, NaN);
  22701. * // => true
  22702. */
  22703. function eq(value, other) {
  22704. return value === other || (value !== value && other !== other);
  22705. }
  22706. /**
  22707. * Checks if `value` is classified as an `Array` object.
  22708. *
  22709. * @static
  22710. * @memberOf _
  22711. * @since 0.1.0
  22712. * @category Lang
  22713. * @param {*} value The value to check.
  22714. * @returns {boolean} Returns `true` if `value` is an array, else `false`.
  22715. * @example
  22716. *
  22717. * _.isArray([1, 2, 3]);
  22718. * // => true
  22719. *
  22720. * _.isArray(document.body.children);
  22721. * // => false
  22722. *
  22723. * _.isArray('abc');
  22724. * // => false
  22725. *
  22726. * _.isArray(_.noop);
  22727. * // => false
  22728. */
  22729. var isArray = Array.isArray;
  22730. /**
  22731. * Checks if `value` is classified as a `Function` object.
  22732. *
  22733. * @static
  22734. * @memberOf _
  22735. * @since 0.1.0
  22736. * @category Lang
  22737. * @param {*} value The value to check.
  22738. * @returns {boolean} Returns `true` if `value` is a function, else `false`.
  22739. * @example
  22740. *
  22741. * _.isFunction(_);
  22742. * // => true
  22743. *
  22744. * _.isFunction(/abc/);
  22745. * // => false
  22746. */
  22747. function isFunction(value) {
  22748. // The use of `Object#toString` avoids issues with the `typeof` operator
  22749. // in Safari 8-9 which returns 'object' for typed array and other constructors.
  22750. var tag = isObject(value) ? objectToString.call(value) : '';
  22751. return tag == funcTag || tag == genTag;
  22752. }
  22753. /**
  22754. * Checks if `value` is the
  22755. * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
  22756. * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
  22757. *
  22758. * @static
  22759. * @memberOf _
  22760. * @since 0.1.0
  22761. * @category Lang
  22762. * @param {*} value The value to check.
  22763. * @returns {boolean} Returns `true` if `value` is an object, else `false`.
  22764. * @example
  22765. *
  22766. * _.isObject({});
  22767. * // => true
  22768. *
  22769. * _.isObject([1, 2, 3]);
  22770. * // => true
  22771. *
  22772. * _.isObject(_.noop);
  22773. * // => true
  22774. *
  22775. * _.isObject(null);
  22776. * // => false
  22777. */
  22778. function isObject(value) {
  22779. var type = typeof value;
  22780. return !!value && (type == 'object' || type == 'function');
  22781. }
  22782. /**
  22783. * Checks if `value` is object-like. A value is object-like if it's not `null`
  22784. * and has a `typeof` result of "object".
  22785. *
  22786. * @static
  22787. * @memberOf _
  22788. * @since 4.0.0
  22789. * @category Lang
  22790. * @param {*} value The value to check.
  22791. * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
  22792. * @example
  22793. *
  22794. * _.isObjectLike({});
  22795. * // => true
  22796. *
  22797. * _.isObjectLike([1, 2, 3]);
  22798. * // => true
  22799. *
  22800. * _.isObjectLike(_.noop);
  22801. * // => false
  22802. *
  22803. * _.isObjectLike(null);
  22804. * // => false
  22805. */
  22806. function isObjectLike(value) {
  22807. return !!value && typeof value == 'object';
  22808. }
  22809. /**
  22810. * Checks if `value` is classified as a `Symbol` primitive or object.
  22811. *
  22812. * @static
  22813. * @memberOf _
  22814. * @since 4.0.0
  22815. * @category Lang
  22816. * @param {*} value The value to check.
  22817. * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
  22818. * @example
  22819. *
  22820. * _.isSymbol(Symbol.iterator);
  22821. * // => true
  22822. *
  22823. * _.isSymbol('abc');
  22824. * // => false
  22825. */
  22826. function isSymbol(value) {
  22827. return typeof value == 'symbol' ||
  22828. (isObjectLike(value) && objectToString.call(value) == symbolTag);
  22829. }
  22830. /**
  22831. * Converts `value` to a string. An empty string is returned for `null`
  22832. * and `undefined` values. The sign of `-0` is preserved.
  22833. *
  22834. * @static
  22835. * @memberOf _
  22836. * @since 4.0.0
  22837. * @category Lang
  22838. * @param {*} value The value to process.
  22839. * @returns {string} Returns the string.
  22840. * @example
  22841. *
  22842. * _.toString(null);
  22843. * // => ''
  22844. *
  22845. * _.toString(-0);
  22846. * // => '-0'
  22847. *
  22848. * _.toString([1, 2, 3]);
  22849. * // => '1,2,3'
  22850. */
  22851. function toString(value) {
  22852. return value == null ? '' : baseToString(value);
  22853. }
  22854. /**
  22855. * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
  22856. * it's created. Arrays are created for missing index properties while objects
  22857. * are created for all other missing properties. Use `_.setWith` to customize
  22858. * `path` creation.
  22859. *
  22860. * **Note:** This method mutates `object`.
  22861. *
  22862. * @static
  22863. * @memberOf _
  22864. * @since 3.7.0
  22865. * @category Object
  22866. * @param {Object} object The object to modify.
  22867. * @param {Array|string} path The path of the property to set.
  22868. * @param {*} value The value to set.
  22869. * @returns {Object} Returns `object`.
  22870. * @example
  22871. *
  22872. * var object = { 'a': [{ 'b': { 'c': 3 } }] };
  22873. *
  22874. * _.set(object, 'a[0].b.c', 4);
  22875. * console.log(object.a[0].b.c);
  22876. * // => 4
  22877. *
  22878. * _.set(object, ['x', '0', 'y', 'z'], 5);
  22879. * console.log(object.x[0].y.z);
  22880. * // => 5
  22881. */
  22882. function set(object, path, value) {
  22883. return object == null ? object : baseSet(object, path, value);
  22884. }
  22885. module.exports = set;
  22886. /***/ }),
  22887. /***/ 898:
  22888. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  22889. "use strict";
  22890. Object.defineProperty(exports, '__esModule', { value: true });
  22891. var request = __webpack_require__(753);
  22892. var universalUserAgent = __webpack_require__(796);
  22893. const VERSION = "4.5.0";
  22894. class GraphqlError extends Error {
  22895. constructor(request, response) {
  22896. const message = response.data.errors[0].message;
  22897. super(message);
  22898. Object.assign(this, response.data);
  22899. this.name = "GraphqlError";
  22900. this.request = request; // Maintains proper stack trace (only available on V8)
  22901. /* istanbul ignore next */
  22902. if (Error.captureStackTrace) {
  22903. Error.captureStackTrace(this, this.constructor);
  22904. }
  22905. }
  22906. }
  22907. const NON_VARIABLE_OPTIONS = ["method", "baseUrl", "url", "headers", "request", "query", "mediaType"];
  22908. function graphql(request, query, options) {
  22909. options = typeof query === "string" ? options = Object.assign({
  22910. query
  22911. }, options) : options = query;
  22912. const requestOptions = Object.keys(options).reduce((result, key) => {
  22913. if (NON_VARIABLE_OPTIONS.includes(key)) {
  22914. result[key] = options[key];
  22915. return result;
  22916. }
  22917. if (!result.variables) {
  22918. result.variables = {};
  22919. }
  22920. result.variables[key] = options[key];
  22921. return result;
  22922. }, {});
  22923. return request(requestOptions).then(response => {
  22924. if (response.data.errors) {
  22925. throw new GraphqlError(requestOptions, {
  22926. data: response.data
  22927. });
  22928. }
  22929. return response.data.data;
  22930. });
  22931. }
  22932. function withDefaults(request$1, newDefaults) {
  22933. const newRequest = request$1.defaults(newDefaults);
  22934. const newApi = (query, options) => {
  22935. return graphql(newRequest, query, options);
  22936. };
  22937. return Object.assign(newApi, {
  22938. defaults: withDefaults.bind(null, newRequest),
  22939. endpoint: request.request.endpoint
  22940. });
  22941. }
  22942. const graphql$1 = withDefaults(request.request, {
  22943. headers: {
  22944. "user-agent": `octokit-graphql.js/${VERSION} ${universalUserAgent.getUserAgent()}`
  22945. },
  22946. method: "POST",
  22947. url: "/graphql"
  22948. });
  22949. function withCustomRequest(customRequest) {
  22950. return withDefaults(customRequest, {
  22951. method: "POST",
  22952. url: "/graphql"
  22953. });
  22954. }
  22955. exports.graphql = graphql$1;
  22956. exports.withCustomRequest = withCustomRequest;
  22957. //# sourceMappingURL=index.js.map
  22958. /***/ }),
  22959. /***/ 916:
  22960. /***/ (function(__unusedmodule, exports) {
  22961. "use strict";
  22962. Object.defineProperty(exports, '__esModule', { value: true });
  22963. const VERSION = "1.0.0";
  22964. /**
  22965. * @param octokit Octokit instance
  22966. * @param options Options passed to Octokit constructor
  22967. */
  22968. function requestLog(octokit) {
  22969. octokit.hook.wrap("request", (request, options) => {
  22970. octokit.log.debug("request", options);
  22971. const start = Date.now();
  22972. const requestOptions = octokit.request.endpoint.parse(options);
  22973. const path = requestOptions.url.replace(options.baseUrl, "");
  22974. return request(options).then(response => {
  22975. octokit.log.info(`${requestOptions.method} ${path} - ${response.status} in ${Date.now() - start}ms`);
  22976. return response;
  22977. }).catch(error => {
  22978. octokit.log.info(`${requestOptions.method} ${path} - ${error.status} in ${Date.now() - start}ms`);
  22979. throw error;
  22980. });
  22981. });
  22982. }
  22983. requestLog.VERSION = VERSION;
  22984. exports.requestLog = requestLog;
  22985. //# sourceMappingURL=index.js.map
  22986. /***/ }),
  22987. /***/ 929:
  22988. /***/ (function(module, __unusedexports, __webpack_require__) {
  22989. module.exports = hasNextPage
  22990. const deprecate = __webpack_require__(370)
  22991. const getPageLinks = __webpack_require__(577)
  22992. function hasNextPage (link) {
  22993. deprecate(`octokit.hasNextPage() – You can use octokit.paginate or async iterators instead: https://github.com/octokit/rest.js#pagination.`)
  22994. return getPageLinks(link).next
  22995. }
  22996. /***/ }),
  22997. /***/ 948:
  22998. /***/ (function(module) {
  22999. "use strict";
  23000. /**
  23001. * Tries to execute a function and discards any error that occurs.
  23002. * @param {Function} fn - Function that might or might not throw an error.
  23003. * @returns {?*} Return-value of the function when no error occurred.
  23004. */
  23005. module.exports = function(fn) {
  23006. try { return fn() } catch (e) {}
  23007. }
  23008. /***/ }),
  23009. /***/ 950:
  23010. /***/ (function(__unusedmodule, exports, __webpack_require__) {
  23011. "use strict";
  23012. Object.defineProperty(exports, "__esModule", { value: true });
  23013. const url = __webpack_require__(835);
  23014. function getProxyUrl(reqUrl) {
  23015. let usingSsl = reqUrl.protocol === 'https:';
  23016. let proxyUrl;
  23017. if (checkBypass(reqUrl)) {
  23018. return proxyUrl;
  23019. }
  23020. let proxyVar;
  23021. if (usingSsl) {
  23022. proxyVar = process.env['https_proxy'] || process.env['HTTPS_PROXY'];
  23023. }
  23024. else {
  23025. proxyVar = process.env['http_proxy'] || process.env['HTTP_PROXY'];
  23026. }
  23027. if (proxyVar) {
  23028. proxyUrl = url.parse(proxyVar);
  23029. }
  23030. return proxyUrl;
  23031. }
  23032. exports.getProxyUrl = getProxyUrl;
  23033. function checkBypass(reqUrl) {
  23034. if (!reqUrl.hostname) {
  23035. return false;
  23036. }
  23037. let noProxy = process.env['no_proxy'] || process.env['NO_PROXY'] || '';
  23038. if (!noProxy) {
  23039. return false;
  23040. }
  23041. // Determine the request port
  23042. let reqPort;
  23043. if (reqUrl.port) {
  23044. reqPort = Number(reqUrl.port);
  23045. }
  23046. else if (reqUrl.protocol === 'http:') {
  23047. reqPort = 80;
  23048. }
  23049. else if (reqUrl.protocol === 'https:') {
  23050. reqPort = 443;
  23051. }
  23052. // Format the request hostname and hostname with port
  23053. let upperReqHosts = [reqUrl.hostname.toUpperCase()];
  23054. if (typeof reqPort === 'number') {
  23055. upperReqHosts.push(`${upperReqHosts[0]}:${reqPort}`);
  23056. }
  23057. // Compare request host against noproxy
  23058. for (let upperNoProxyItem of noProxy
  23059. .split(',')
  23060. .map(x => x.trim().toUpperCase())
  23061. .filter(x => x)) {
  23062. if (upperReqHosts.some(x => x === upperNoProxyItem)) {
  23063. return true;
  23064. }
  23065. }
  23066. return false;
  23067. }
  23068. exports.checkBypass = checkBypass;
  23069. /***/ }),
  23070. /***/ 954:
  23071. /***/ (function(module) {
  23072. module.exports = validateAuth;
  23073. function validateAuth(auth) {
  23074. if (typeof auth === "string") {
  23075. return;
  23076. }
  23077. if (typeof auth === "function") {
  23078. return;
  23079. }
  23080. if (auth.username && auth.password) {
  23081. return;
  23082. }
  23083. if (auth.clientId && auth.clientSecret) {
  23084. return;
  23085. }
  23086. throw new Error(`Invalid "auth" option: ${JSON.stringify(auth)}`);
  23087. }
  23088. /***/ }),
  23089. /***/ 955:
  23090. /***/ (function(module, __unusedexports, __webpack_require__) {
  23091. "use strict";
  23092. const path = __webpack_require__(622);
  23093. const childProcess = __webpack_require__(129);
  23094. const crossSpawn = __webpack_require__(20);
  23095. const stripEof = __webpack_require__(768);
  23096. const npmRunPath = __webpack_require__(621);
  23097. const isStream = __webpack_require__(323);
  23098. const _getStream = __webpack_require__(145);
  23099. const pFinally = __webpack_require__(697);
  23100. const onExit = __webpack_require__(260);
  23101. const errname = __webpack_require__(427);
  23102. const stdio = __webpack_require__(168);
  23103. const TEN_MEGABYTES = 1000 * 1000 * 10;
  23104. function handleArgs(cmd, args, opts) {
  23105. let parsed;
  23106. opts = Object.assign({
  23107. extendEnv: true,
  23108. env: {}
  23109. }, opts);
  23110. if (opts.extendEnv) {
  23111. opts.env = Object.assign({}, process.env, opts.env);
  23112. }
  23113. if (opts.__winShell === true) {
  23114. delete opts.__winShell;
  23115. parsed = {
  23116. command: cmd,
  23117. args,
  23118. options: opts,
  23119. file: cmd,
  23120. original: {
  23121. cmd,
  23122. args
  23123. }
  23124. };
  23125. } else {
  23126. parsed = crossSpawn._parse(cmd, args, opts);
  23127. }
  23128. opts = Object.assign({
  23129. maxBuffer: TEN_MEGABYTES,
  23130. buffer: true,
  23131. stripEof: true,
  23132. preferLocal: true,
  23133. localDir: parsed.options.cwd || process.cwd(),
  23134. encoding: 'utf8',
  23135. reject: true,
  23136. cleanup: true
  23137. }, parsed.options);
  23138. opts.stdio = stdio(opts);
  23139. if (opts.preferLocal) {
  23140. opts.env = npmRunPath.env(Object.assign({}, opts, {cwd: opts.localDir}));
  23141. }
  23142. if (opts.detached) {
  23143. // #115
  23144. opts.cleanup = false;
  23145. }
  23146. if (process.platform === 'win32' && path.basename(parsed.command) === 'cmd.exe') {
  23147. // #116
  23148. parsed.args.unshift('/q');
  23149. }
  23150. return {
  23151. cmd: parsed.command,
  23152. args: parsed.args,
  23153. opts,
  23154. parsed
  23155. };
  23156. }
  23157. function handleInput(spawned, input) {
  23158. if (input === null || input === undefined) {
  23159. return;
  23160. }
  23161. if (isStream(input)) {
  23162. input.pipe(spawned.stdin);
  23163. } else {
  23164. spawned.stdin.end(input);
  23165. }
  23166. }
  23167. function handleOutput(opts, val) {
  23168. if (val && opts.stripEof) {
  23169. val = stripEof(val);
  23170. }
  23171. return val;
  23172. }
  23173. function handleShell(fn, cmd, opts) {
  23174. let file = '/bin/sh';
  23175. let args = ['-c', cmd];
  23176. opts = Object.assign({}, opts);
  23177. if (process.platform === 'win32') {
  23178. opts.__winShell = true;
  23179. file = process.env.comspec || 'cmd.exe';
  23180. args = ['/s', '/c', `"${cmd}"`];
  23181. opts.windowsVerbatimArguments = true;
  23182. }
  23183. if (opts.shell) {
  23184. file = opts.shell;
  23185. delete opts.shell;
  23186. }
  23187. return fn(file, args, opts);
  23188. }
  23189. function getStream(process, stream, {encoding, buffer, maxBuffer}) {
  23190. if (!process[stream]) {
  23191. return null;
  23192. }
  23193. let ret;
  23194. if (!buffer) {
  23195. // TODO: Use `ret = util.promisify(stream.finished)(process[stream]);` when targeting Node.js 10
  23196. ret = new Promise((resolve, reject) => {
  23197. process[stream]
  23198. .once('end', resolve)
  23199. .once('error', reject);
  23200. });
  23201. } else if (encoding) {
  23202. ret = _getStream(process[stream], {
  23203. encoding,
  23204. maxBuffer
  23205. });
  23206. } else {
  23207. ret = _getStream.buffer(process[stream], {maxBuffer});
  23208. }
  23209. return ret.catch(err => {
  23210. err.stream = stream;
  23211. err.message = `${stream} ${err.message}`;
  23212. throw err;
  23213. });
  23214. }
  23215. function makeError(result, options) {
  23216. const {stdout, stderr} = result;
  23217. let err = result.error;
  23218. const {code, signal} = result;
  23219. const {parsed, joinedCmd} = options;
  23220. const timedOut = options.timedOut || false;
  23221. if (!err) {
  23222. let output = '';
  23223. if (Array.isArray(parsed.opts.stdio)) {
  23224. if (parsed.opts.stdio[2] !== 'inherit') {
  23225. output += output.length > 0 ? stderr : `\n${stderr}`;
  23226. }
  23227. if (parsed.opts.stdio[1] !== 'inherit') {
  23228. output += `\n${stdout}`;
  23229. }
  23230. } else if (parsed.opts.stdio !== 'inherit') {
  23231. output = `\n${stderr}${stdout}`;
  23232. }
  23233. err = new Error(`Command failed: ${joinedCmd}${output}`);
  23234. err.code = code < 0 ? errname(code) : code;
  23235. }
  23236. err.stdout = stdout;
  23237. err.stderr = stderr;
  23238. err.failed = true;
  23239. err.signal = signal || null;
  23240. err.cmd = joinedCmd;
  23241. err.timedOut = timedOut;
  23242. return err;
  23243. }
  23244. function joinCmd(cmd, args) {
  23245. let joinedCmd = cmd;
  23246. if (Array.isArray(args) && args.length > 0) {
  23247. joinedCmd += ' ' + args.join(' ');
  23248. }
  23249. return joinedCmd;
  23250. }
  23251. module.exports = (cmd, args, opts) => {
  23252. const parsed = handleArgs(cmd, args, opts);
  23253. const {encoding, buffer, maxBuffer} = parsed.opts;
  23254. const joinedCmd = joinCmd(cmd, args);
  23255. let spawned;
  23256. try {
  23257. spawned = childProcess.spawn(parsed.cmd, parsed.args, parsed.opts);
  23258. } catch (err) {
  23259. return Promise.reject(err);
  23260. }
  23261. let removeExitHandler;
  23262. if (parsed.opts.cleanup) {
  23263. removeExitHandler = onExit(() => {
  23264. spawned.kill();
  23265. });
  23266. }
  23267. let timeoutId = null;
  23268. let timedOut = false;
  23269. const cleanup = () => {
  23270. if (timeoutId) {
  23271. clearTimeout(timeoutId);
  23272. timeoutId = null;
  23273. }
  23274. if (removeExitHandler) {
  23275. removeExitHandler();
  23276. }
  23277. };
  23278. if (parsed.opts.timeout > 0) {
  23279. timeoutId = setTimeout(() => {
  23280. timeoutId = null;
  23281. timedOut = true;
  23282. spawned.kill(parsed.opts.killSignal);
  23283. }, parsed.opts.timeout);
  23284. }
  23285. const processDone = new Promise(resolve => {
  23286. spawned.on('exit', (code, signal) => {
  23287. cleanup();
  23288. resolve({code, signal});
  23289. });
  23290. spawned.on('error', err => {
  23291. cleanup();
  23292. resolve({error: err});
  23293. });
  23294. if (spawned.stdin) {
  23295. spawned.stdin.on('error', err => {
  23296. cleanup();
  23297. resolve({error: err});
  23298. });
  23299. }
  23300. });
  23301. function destroy() {
  23302. if (spawned.stdout) {
  23303. spawned.stdout.destroy();
  23304. }
  23305. if (spawned.stderr) {
  23306. spawned.stderr.destroy();
  23307. }
  23308. }
  23309. const handlePromise = () => pFinally(Promise.all([
  23310. processDone,
  23311. getStream(spawned, 'stdout', {encoding, buffer, maxBuffer}),
  23312. getStream(spawned, 'stderr', {encoding, buffer, maxBuffer})
  23313. ]).then(arr => {
  23314. const result = arr[0];
  23315. result.stdout = arr[1];
  23316. result.stderr = arr[2];
  23317. if (result.error || result.code !== 0 || result.signal !== null) {
  23318. const err = makeError(result, {
  23319. joinedCmd,
  23320. parsed,
  23321. timedOut
  23322. });
  23323. // TODO: missing some timeout logic for killed
  23324. // https://github.com/nodejs/node/blob/master/lib/child_process.js#L203
  23325. // err.killed = spawned.killed || killed;
  23326. err.killed = err.killed || spawned.killed;
  23327. if (!parsed.opts.reject) {
  23328. return err;
  23329. }
  23330. throw err;
  23331. }
  23332. return {
  23333. stdout: handleOutput(parsed.opts, result.stdout),
  23334. stderr: handleOutput(parsed.opts, result.stderr),
  23335. code: 0,
  23336. failed: false,
  23337. killed: false,
  23338. signal: null,
  23339. cmd: joinedCmd,
  23340. timedOut: false
  23341. };
  23342. }), destroy);
  23343. crossSpawn._enoent.hookChildProcess(spawned, parsed.parsed);
  23344. handleInput(spawned, parsed.opts.input);
  23345. spawned.then = (onfulfilled, onrejected) => handlePromise().then(onfulfilled, onrejected);
  23346. spawned.catch = onrejected => handlePromise().catch(onrejected);
  23347. return spawned;
  23348. };
  23349. // TODO: set `stderr: 'ignore'` when that option is implemented
  23350. module.exports.stdout = (...args) => module.exports(...args).then(x => x.stdout);
  23351. // TODO: set `stdout: 'ignore'` when that option is implemented
  23352. module.exports.stderr = (...args) => module.exports(...args).then(x => x.stderr);
  23353. module.exports.shell = (cmd, opts) => handleShell(module.exports, cmd, opts);
  23354. module.exports.sync = (cmd, args, opts) => {
  23355. const parsed = handleArgs(cmd, args, opts);
  23356. const joinedCmd = joinCmd(cmd, args);
  23357. if (isStream(parsed.opts.input)) {
  23358. throw new TypeError('The `input` option cannot be a stream in sync mode');
  23359. }
  23360. const result = childProcess.spawnSync(parsed.cmd, parsed.args, parsed.opts);
  23361. result.code = result.status;
  23362. if (result.error || result.status !== 0 || result.signal !== null) {
  23363. const err = makeError(result, {
  23364. joinedCmd,
  23365. parsed
  23366. });
  23367. if (!parsed.opts.reject) {
  23368. return err;
  23369. }
  23370. throw err;
  23371. }
  23372. return {
  23373. stdout: handleOutput(parsed.opts, result.stdout),
  23374. stderr: handleOutput(parsed.opts, result.stderr),
  23375. code: 0,
  23376. failed: false,
  23377. signal: null,
  23378. cmd: joinedCmd,
  23379. timedOut: false
  23380. };
  23381. };
  23382. module.exports.shellSync = (cmd, opts) => handleShell(module.exports.sync, cmd, opts);
  23383. /***/ }),
  23384. /***/ 966:
  23385. /***/ (function(module, __unusedexports, __webpack_require__) {
  23386. "use strict";
  23387. const {PassThrough} = __webpack_require__(413);
  23388. module.exports = options => {
  23389. options = Object.assign({}, options);
  23390. const {array} = options;
  23391. let {encoding} = options;
  23392. const buffer = encoding === 'buffer';
  23393. let objectMode = false;
  23394. if (array) {
  23395. objectMode = !(encoding || buffer);
  23396. } else {
  23397. encoding = encoding || 'utf8';
  23398. }
  23399. if (buffer) {
  23400. encoding = null;
  23401. }
  23402. let len = 0;
  23403. const ret = [];
  23404. const stream = new PassThrough({objectMode});
  23405. if (encoding) {
  23406. stream.setEncoding(encoding);
  23407. }
  23408. stream.on('data', chunk => {
  23409. ret.push(chunk);
  23410. if (objectMode) {
  23411. len = ret.length;
  23412. } else {
  23413. len += chunk.length;
  23414. }
  23415. });
  23416. stream.getBufferedValue = () => {
  23417. if (array) {
  23418. return ret;
  23419. }
  23420. return buffer ? Buffer.concat(ret, len) : ret.join('');
  23421. };
  23422. stream.getBufferedLength = () => len;
  23423. return stream;
  23424. };
  23425. /***/ }),
  23426. /***/ 969:
  23427. /***/ (function(module, __unusedexports, __webpack_require__) {
  23428. var wrappy = __webpack_require__(11)
  23429. module.exports = wrappy(once)
  23430. module.exports.strict = wrappy(onceStrict)
  23431. once.proto = once(function () {
  23432. Object.defineProperty(Function.prototype, 'once', {
  23433. value: function () {
  23434. return once(this)
  23435. },
  23436. configurable: true
  23437. })
  23438. Object.defineProperty(Function.prototype, 'onceStrict', {
  23439. value: function () {
  23440. return onceStrict(this)
  23441. },
  23442. configurable: true
  23443. })
  23444. })
  23445. function once (fn) {
  23446. var f = function () {
  23447. if (f.called) return f.value
  23448. f.called = true
  23449. return f.value = fn.apply(this, arguments)
  23450. }
  23451. f.called = false
  23452. return f
  23453. }
  23454. function onceStrict (fn) {
  23455. var f = function () {
  23456. if (f.called)
  23457. throw new Error(f.onceError)
  23458. f.called = true
  23459. return f.value = fn.apply(this, arguments)
  23460. }
  23461. var name = fn.name || 'Function wrapped with `once`'
  23462. f.onceError = name + " shouldn't be called more than once"
  23463. f.called = false
  23464. return f
  23465. }
  23466. /***/ })
  23467. /******/ });