diff --git a/lib/index.js b/lib/index.js new file mode 100644 index 00000000..f562d897 --- /dev/null +++ b/lib/index.js @@ -0,0 +1,20 @@ +(()=>{var __webpack_modules__={351:function(e,t,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){if(o===undefined)o=r;Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,o){if(o===undefined)o=r;e[o]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))o(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issue=t.issueCommand=void 0;const i=n(r(87));const a=r(278);function issueCommand(e,t,r){const o=new Command(e,t,r);process.stdout.write(o.toString()+i.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const c="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=c+this.command;if(this.properties&&Object.keys(this.properties).length>0){e+=" ";let t=true;for(const r in this.properties){if(this.properties.hasOwnProperty(r)){const o=this.properties[r];if(o){if(t){t=false}else{e+=","}e+=`${r}=${escapeProperty(o)}`}}}}e+=`${c}${escapeData(this.message)}`;return e}}function escapeData(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return a.toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},186:function(e,t,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){if(o===undefined)o=r;Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,o){if(o===undefined)o=r;e[o]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))o(t,e,r);s(t,e);return t};var i=this&&this.__awaiter||function(e,t,r,o){function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function fulfilled(e){try{step(o.next(e))}catch(e){s(e)}}function rejected(e){try{step(o["throw"](e))}catch(e){s(e)}}function step(e){e.done?r(e.value):adopt(e.value).then(fulfilled,rejected)}step((o=o.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:true});t.getState=t.saveState=t.group=t.endGroup=t.startGroup=t.info=t.warning=t.error=t.debug=t.isDebug=t.setFailed=t.setCommandEcho=t.setOutput=t.getBooleanInput=t.getMultilineInput=t.getInput=t.addPath=t.setSecret=t.exportVariable=t.ExitCode=void 0;const a=r(351);const c=r(717);const u=r(278);const l=n(r(87));const p=n(r(622));var d;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(d=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=u.toCommandValue(t);process.env[e]=r;const o=process.env["GITHUB_ENV"]||"";if(o){const t="_GitHubActionsFileCommandDelimeter_";const o=`${e}<<${t}${l.EOL}${r}${l.EOL}${t}`;c.issueCommand("ENV",o)}else{a.issueCommand("set-env",{name:e},r)}}t.exportVariable=exportVariable;function setSecret(e){a.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){const t=process.env["GITHUB_PATH"]||"";if(t){c.issueCommand("PATH",e)}else{a.issueCommand("add-path",{},e)}process.env["PATH"]=`${e}${p.delimiter}${process.env["PATH"]}`}t.addPath=addPath;function getInput(e,t){const r=process.env[`INPUT_${e.replace(/ /g,"_").toUpperCase()}`]||"";if(t&&t.required&&!r){throw new Error(`Input required and not supplied: ${e}`)}if(t&&t.trimWhitespace===false){return r}return r.trim()}t.getInput=getInput;function getMultilineInput(e,t){const r=getInput(e,t).split("\n").filter((e=>e!==""));return r}t.getMultilineInput=getMultilineInput;function getBooleanInput(e,t){const r=["true","True","TRUE"];const o=["false","False","FALSE"];const s=getInput(e,t);if(r.includes(s))return true;if(o.includes(s))return false;throw new TypeError(`Input does not meet YAML 1.2 "Core Schema" specification: ${e}\n`+`Support boolean input list: \`true | True | TRUE | false | False | FALSE\``)}t.getBooleanInput=getBooleanInput;function setOutput(e,t){process.stdout.write(l.EOL);a.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){a.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=d.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){a.issueCommand("debug",{},e)}t.debug=debug;function error(e){a.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){a.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+l.EOL)}t.info=info;function startGroup(e){a.issue("group",e)}t.startGroup=startGroup;function endGroup(){a.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return i(this,void 0,void 0,(function*(){startGroup(e);let r;try{r=yield t()}finally{endGroup()}return r}))}t.group=group;function saveState(e,t){a.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},717:function(e,t,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){if(o===undefined)o=r;Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,o){if(o===undefined)o=r;e[o]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))o(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.issueCommand=void 0;const i=n(r(747));const a=n(r(87));const c=r(278);function issueCommand(e,t){const r=process.env[`GITHUB_${e}`];if(!r){throw new Error(`Unable to find environment variable for file command ${e}`)}if(!i.existsSync(r)){throw new Error(`Missing file at path: ${r}`)}i.appendFileSync(r,`${c.toCommandValue(t)}${a.EOL}`,{encoding:"utf8"})}t.issueCommand=issueCommand},278:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.toCommandValue=void 0;function toCommandValue(e){if(e===null||e===undefined){return""}else if(typeof e==="string"||e instanceof String){return e}return JSON.stringify(e)}t.toCommandValue=toCommandValue},53:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Context=void 0;const o=r(747);const s=r(87);class Context{constructor(){var e,t,r;this.payload={};if(process.env.GITHUB_EVENT_PATH){if(o.existsSync(process.env.GITHUB_EVENT_PATH)){this.payload=JSON.parse(o.readFileSync(process.env.GITHUB_EVENT_PATH,{encoding:"utf8"}))}else{const e=process.env.GITHUB_EVENT_PATH;process.stdout.write(`GITHUB_EVENT_PATH ${e} does not exist${s.EOL}`)}}this.eventName=process.env.GITHUB_EVENT_NAME;this.sha=process.env.GITHUB_SHA;this.ref=process.env.GITHUB_REF;this.workflow=process.env.GITHUB_WORKFLOW;this.action=process.env.GITHUB_ACTION;this.actor=process.env.GITHUB_ACTOR;this.job=process.env.GITHUB_JOB;this.runNumber=parseInt(process.env.GITHUB_RUN_NUMBER,10);this.runId=parseInt(process.env.GITHUB_RUN_ID,10);this.apiUrl=(e=process.env.GITHUB_API_URL)!==null&&e!==void 0?e:`https://api.github.com`;this.serverUrl=(t=process.env.GITHUB_SERVER_URL)!==null&&t!==void 0?t:`https://github.com`;this.graphqlUrl=(r=process.env.GITHUB_GRAPHQL_URL)!==null&&r!==void 0?r:`https://api.github.com/graphql`}get issue(){const e=this.payload;return Object.assign(Object.assign({},this.repo),{number:(e.issue||e.pull_request||e).number})}get repo(){if(process.env.GITHUB_REPOSITORY){const[e,t]=process.env.GITHUB_REPOSITORY.split("/");return{owner:e,repo:t}}if(this.payload.repository){return{owner:this.payload.repository.owner.login,repo:this.payload.repository.name}}throw new Error("context.repo requires a GITHUB_REPOSITORY environment variable like 'owner/repo'")}}t.Context=Context},438:function(e,t,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){if(o===undefined)o=r;Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,o){if(o===undefined)o=r;e[o]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))o(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOctokit=t.context=void 0;const i=n(r(53));const a=r(30);t.context=new i.Context;function getOctokit(e,t){return new a.GitHub(a.getOctokitOptions(e,t))}t.getOctokit=getOctokit},914:function(e,t,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){if(o===undefined)o=r;Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,o){if(o===undefined)o=r;e[o]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))o(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getApiBaseUrl=t.getProxyAgent=t.getAuthString=void 0;const i=n(r(925));function getAuthString(e,t){if(!e&&!t.auth){throw new Error("Parameter token or opts.auth is required")}else if(e&&t.auth){throw new Error("Parameters token and opts.auth may not both be specified")}return typeof t.auth==="string"?t.auth:`token ${e}`}t.getAuthString=getAuthString;function getProxyAgent(e){const t=new i.HttpClient;return t.getAgent(e)}t.getProxyAgent=getProxyAgent;function getApiBaseUrl(){return process.env["GITHUB_API_URL"]||"https://api.github.com"}t.getApiBaseUrl=getApiBaseUrl},30:function(e,t,r){"use strict";var o=this&&this.__createBinding||(Object.create?function(e,t,r,o){if(o===undefined)o=r;Object.defineProperty(e,o,{enumerable:true,get:function(){return t[r]}})}:function(e,t,r,o){if(o===undefined)o=r;e[o]=t[r]});var s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:true,value:t})}:function(e,t){e["default"]=t});var n=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(r!=="default"&&Object.hasOwnProperty.call(e,r))o(t,e,r);s(t,e);return t};Object.defineProperty(t,"__esModule",{value:true});t.getOctokitOptions=t.GitHub=t.context=void 0;const i=n(r(53));const a=n(r(914));const c=r(762);const u=r(44);const l=r(193);t.context=new i.Context;const p=a.getApiBaseUrl();const d={baseUrl:p,request:{agent:a.getProxyAgent(p)}};t.GitHub=c.Octokit.plugin(u.restEndpointMethods,l.paginateRest).defaults(d);function getOctokitOptions(e,t){const r=Object.assign({},t||{});const o=a.getAuthString(e,r);if(o){r.auth=o}return r}t.getOctokitOptions=getOctokitOptions},925:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const o=r(605);const s=r(211);const n=r(443);let i;var a;(function(e){e[e["OK"]=200]="OK";e[e["MultipleChoices"]=300]="MultipleChoices";e[e["MovedPermanently"]=301]="MovedPermanently";e[e["ResourceMoved"]=302]="ResourceMoved";e[e["SeeOther"]=303]="SeeOther";e[e["NotModified"]=304]="NotModified";e[e["UseProxy"]=305]="UseProxy";e[e["SwitchProxy"]=306]="SwitchProxy";e[e["TemporaryRedirect"]=307]="TemporaryRedirect";e[e["PermanentRedirect"]=308]="PermanentRedirect";e[e["BadRequest"]=400]="BadRequest";e[e["Unauthorized"]=401]="Unauthorized";e[e["PaymentRequired"]=402]="PaymentRequired";e[e["Forbidden"]=403]="Forbidden";e[e["NotFound"]=404]="NotFound";e[e["MethodNotAllowed"]=405]="MethodNotAllowed";e[e["NotAcceptable"]=406]="NotAcceptable";e[e["ProxyAuthenticationRequired"]=407]="ProxyAuthenticationRequired";e[e["RequestTimeout"]=408]="RequestTimeout";e[e["Conflict"]=409]="Conflict";e[e["Gone"]=410]="Gone";e[e["TooManyRequests"]=429]="TooManyRequests";e[e["InternalServerError"]=500]="InternalServerError";e[e["NotImplemented"]=501]="NotImplemented";e[e["BadGateway"]=502]="BadGateway";e[e["ServiceUnavailable"]=503]="ServiceUnavailable";e[e["GatewayTimeout"]=504]="GatewayTimeout"})(a=t.HttpCodes||(t.HttpCodes={}));var c;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(c=t.Headers||(t.Headers={}));var u;(function(e){e["ApplicationJson"]="application/json"})(u=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=n.getProxyUrl(new URL(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const l=[a.MovedPermanently,a.ResourceMoved,a.SeeOther,a.TemporaryRedirect,a.PermanentRedirect];const p=[a.BadGateway,a.ServiceUnavailable,a.GatewayTimeout];const d=["OPTIONS","GET","DELETE","HEAD"];const m=10;const g=5;class HttpClientError extends Error{constructor(e,t){super(e);this.name="HttpClientError";this.statusCode=t;Object.setPrototypeOf(this,HttpClientError.prototype)}}t.HttpClientError=HttpClientError;class HttpClientResponse{constructor(e){this.message=e}readBody(){return new Promise((async(e,t)=>{let r=Buffer.alloc(0);this.message.on("data",(e=>{r=Buffer.concat([r,e])}));this.message.on("end",(()=>{e(r.toString())}))}))}}t.HttpClientResponse=HttpClientResponse;function isHttps(e){let t=new URL(e);return t.protocol==="https:"}t.isHttps=isHttps;class HttpClient{constructor(e,t,r){this._ignoreSslError=false;this._allowRedirects=true;this._allowRedirectDowngrade=false;this._maxRedirects=50;this._allowRetries=false;this._maxRetries=1;this._keepAlive=false;this._disposed=false;this.userAgent=e;this.handlers=t||[];this.requestOptions=r;if(r){if(r.ignoreSslError!=null){this._ignoreSslError=r.ignoreSslError}this._socketTimeout=r.socketTimeout;if(r.allowRedirects!=null){this._allowRedirects=r.allowRedirects}if(r.allowRedirectDowngrade!=null){this._allowRedirectDowngrade=r.allowRedirectDowngrade}if(r.maxRedirects!=null){this._maxRedirects=Math.max(r.maxRedirects,0)}if(r.keepAlive!=null){this._keepAlive=r.keepAlive}if(r.allowRetries!=null){this._allowRetries=r.allowRetries}if(r.maxRetries!=null){this._maxRetries=r.maxRetries}}}options(e,t){return this.request("OPTIONS",e,null,t||{})}get(e,t){return this.request("GET",e,null,t||{})}del(e,t){return this.request("DELETE",e,null,t||{})}post(e,t,r){return this.request("POST",e,t,r||{})}patch(e,t,r){return this.request("PATCH",e,t,r||{})}put(e,t,r){return this.request("PUT",e,t,r||{})}head(e,t){return this.request("HEAD",e,null,t||{})}sendStream(e,t,r,o){return this.request(e,t,r,o)}async getJson(e,t={}){t[c.Accept]=this._getExistingOrDefaultHeader(t,c.Accept,u.ApplicationJson);let r=await this.get(e,t);return this._processResponse(r,this.requestOptions)}async postJson(e,t,r={}){let o=JSON.stringify(t,null,2);r[c.Accept]=this._getExistingOrDefaultHeader(r,c.Accept,u.ApplicationJson);r[c.ContentType]=this._getExistingOrDefaultHeader(r,c.ContentType,u.ApplicationJson);let s=await this.post(e,o,r);return this._processResponse(s,this.requestOptions)}async putJson(e,t,r={}){let o=JSON.stringify(t,null,2);r[c.Accept]=this._getExistingOrDefaultHeader(r,c.Accept,u.ApplicationJson);r[c.ContentType]=this._getExistingOrDefaultHeader(r,c.ContentType,u.ApplicationJson);let s=await this.put(e,o,r);return this._processResponse(s,this.requestOptions)}async patchJson(e,t,r={}){let o=JSON.stringify(t,null,2);r[c.Accept]=this._getExistingOrDefaultHeader(r,c.Accept,u.ApplicationJson);r[c.ContentType]=this._getExistingOrDefaultHeader(r,c.ContentType,u.ApplicationJson);let s=await this.patch(e,o,r);return this._processResponse(s,this.requestOptions)}async request(e,t,r,o){if(this._disposed){throw new Error("Client has already been disposed.")}let s=new URL(t);let n=this._prepareRequest(e,s,o);let i=this._allowRetries&&d.indexOf(e)!=-1?this._maxRetries+1:1;let c=0;let u;while(c0){const i=u.message.headers["location"];if(!i){break}let a=new URL(i);if(s.protocol=="https:"&&s.protocol!=a.protocol&&!this._allowRedirectDowngrade){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.")}await u.readBody();if(a.hostname!==s.hostname){for(let e in o){if(e.toLowerCase()==="authorization"){delete o[e]}}}n=this._prepareRequest(e,a,o);u=await this.requestRaw(n,r);t--}if(p.indexOf(u.message.statusCode)==-1){return u}c+=1;if(c{let callbackForResult=function(e,t){if(e){o(e)}r(t)};this.requestRawWithCallback(e,t,callbackForResult)}))}requestRawWithCallback(e,t,r){let o;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;let handleResult=(e,t)=>{if(!s){s=true;r(e,t)}};let n=e.httpModule.request(e.options,(e=>{let t=new HttpClientResponse(e);handleResult(null,t)}));n.on("socket",(e=>{o=e}));n.setTimeout(this._socketTimeout||3*6e4,(()=>{if(o){o.end()}handleResult(new Error("Request timeout: "+e.options.path),null)}));n.on("error",(function(e){handleResult(e,null)}));if(t&&typeof t==="string"){n.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",(function(){n.end()}));t.pipe(n)}else{n.end()}}getAgent(e){let t=new URL(e);return this._getAgent(t)}_prepareRequest(e,t,r){const n={};n.parsedUrl=t;const i=n.parsedUrl.protocol==="https:";n.httpModule=i?s:o;const a=i?443:80;n.options={};n.options.host=n.parsedUrl.hostname;n.options.port=n.parsedUrl.port?parseInt(n.parsedUrl.port):a;n.options.path=(n.parsedUrl.pathname||"")+(n.parsedUrl.search||"");n.options.method=e;n.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){n.options.headers["user-agent"]=this.userAgent}n.options.agent=this._getAgent(n.parsedUrl);if(this.handlers){this.handlers.forEach((e=>{e.prepareRequest(n.options)}))}return n}_mergeHeaders(e){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},lowercaseKeys(this.requestOptions.headers),lowercaseKeys(e))}return lowercaseKeys(e||{})}_getExistingOrDefaultHeader(e,t,r){const lowercaseKeys=e=>Object.keys(e).reduce(((t,r)=>(t[r.toLowerCase()]=e[r],t)),{});let o;if(this.requestOptions&&this.requestOptions.headers){o=lowercaseKeys(this.requestOptions.headers)[t]}return e[t]||o||r}_getAgent(e){let t;let a=n.getProxyUrl(e);let c=a&&a.hostname;if(this._keepAlive&&c){t=this._proxyAgent}if(this._keepAlive&&!c){t=this._agent}if(!!t){return t}const u=e.protocol==="https:";let l=100;if(!!this.requestOptions){l=this.requestOptions.maxSockets||o.globalAgent.maxSockets}if(c){if(!i){i=r(294)}const e={maxSockets:l,keepAlive:this._keepAlive,proxy:{...(a.username||a.password)&&{proxyAuth:`${a.username}:${a.password}`},host:a.hostname,port:a.port}};let o;const s=a.protocol==="https:";if(u){o=s?i.httpsOverHttps:i.httpsOverHttp}else{o=s?i.httpOverHttps:i.httpOverHttp}t=o(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:l};t=u?new s.Agent(e):new o.Agent(e);this._agent=t}if(!t){t=u?s.globalAgent:o.globalAgent}if(u&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(m,e);const t=g*Math.pow(2,e);return new Promise((e=>setTimeout((()=>e()),t)))}static dateTimeDeserializer(e,t){if(typeof t==="string"){let e=new Date(t);if(!isNaN(e.valueOf())){return e}}return t}async _processResponse(e,t){return new Promise((async(r,o)=>{const s=e.message.statusCode;const n={statusCode:s,result:null,headers:{}};if(s==a.NotFound){r(n)}let i;let c;try{c=await e.readBody();if(c&&c.length>0){if(t&&t.deserializeDates){i=JSON.parse(c,HttpClient.dateTimeDeserializer)}else{i=JSON.parse(c)}n.result=i}n.headers=e.message.headers}catch(e){}if(s>299){let e;if(i&&i.message){e=i.message}else if(c&&c.length>0){e=c}else{e="Failed request: ("+s+")"}let t=new HttpClientError(e,s);t.result=n.result;o(t)}else{r(n)}}))}}t.HttpClient=HttpClient},443:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let o;if(t){o=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{o=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(o){r=new URL(o)}return r}t.getProxyUrl=getProxyUrl;function checkBypass(e){if(!e.hostname){return false}let t=process.env["no_proxy"]||process.env["NO_PROXY"]||"";if(!t){return false}let r;if(e.port){r=Number(e.port)}else if(e.protocol==="http:"){r=80}else if(e.protocol==="https:"){r=443}let o=[e.hostname.toUpperCase()];if(typeof r==="number"){o.push(`${o[0]}:${r}`)}for(let e of t.split(",").map((e=>e.trim().toUpperCase())).filter((e=>e))){if(o.some((t=>t===e))){return true}}return false}t.checkBypass=checkBypass},334:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});async function auth(e){const t=e.split(/\./).length===3?"app":/^v\d+\./.test(e)?"installation":"oauth";return{type:"token",token:e,tokenType:t}}function withAuthorizationPrefix(e){if(e.split(/\./).length===3){return`bearer ${e}`}return`token ${e}`}async function hook(e,t,r,o){const s=t.endpoint.merge(r,o);s.headers.authorization=withAuthorizationPrefix(e);return t(s)}const r=function createTokenAuth(e){if(!e){throw new Error("[@octokit/auth-token] No token passed to createTokenAuth")}if(typeof e!=="string"){throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string")}e=e.replace(/^(token|bearer) +/i,"");return Object.assign(auth.bind(null,e),{hook:hook.bind(null,e)})};t.createTokenAuth=r},762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var o=r(429);var s=r(682);var n=r(234);var i=r(668);var a=r(334);function _objectWithoutPropertiesLoose(e,t){if(e==null)return{};var r={};var o=Object.keys(e);var s,n;for(n=0;n=0)continue;r[s]=e[s]}return r}function _objectWithoutProperties(e,t){if(e==null)return{};var r=_objectWithoutPropertiesLoose(e,t);var o,s;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(s=0;s=0)continue;if(!Object.prototype.propertyIsEnumerable.call(e,o))continue;r[o]=e[o]}}return r}const c="3.5.1";const u=["authStrategy"];class Octokit{constructor(e={}){const t=new s.Collection;const r={baseUrl:n.request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:t.bind(null,"request")}),mediaType:{previews:[],format:""}};r.headers["user-agent"]=[e.userAgent,`octokit-core.js/${c} ${o.getUserAgent()}`].filter(Boolean).join(" ");if(e.baseUrl){r.baseUrl=e.baseUrl}if(e.previews){r.mediaType.previews=e.previews}if(e.timeZone){r.headers["time-zone"]=e.timeZone}this.request=n.request.defaults(r);this.graphql=i.withCustomRequest(this.request).defaults(r);this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},e.log);this.hook=t;if(!e.authStrategy){if(!e.auth){this.auth=async()=>({type:"unauthenticated"})}else{const r=a.createTokenAuth(e.auth);t.wrap("request",r.hook);this.auth=r}}else{const{authStrategy:r}=e,o=_objectWithoutProperties(e,u);const s=r(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:o},e.auth));t.wrap("request",s.hook);this.auth=s}const l=this.constructor;l.plugins.forEach((t=>{Object.assign(this,t(this,e))}))}static defaults(e){const t=class extends(this){constructor(...t){const r=t[0]||{};if(typeof e==="function"){super(e(r));return}super(Object.assign({},e,r,r.userAgent&&e.userAgent?{userAgent:`${r.userAgent} ${e.userAgent}`}:null))}};return t}static plugin(...e){var t;const r=this.plugins;const o=(t=class extends(this){},t.plugins=r.concat(e.filter((e=>!r.includes(e)))),t);return o}}Octokit.VERSION=c;Octokit.plugins=[];t.Octokit=Octokit},440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var o=r(558);var s=r(429);function lowercaseKeys(e){if(!e){return{}}return Object.keys(e).reduce(((t,r)=>{t[r.toLowerCase()]=e[r];return t}),{})}function mergeDeep(e,t){const r=Object.assign({},e);Object.keys(t).forEach((s=>{if(o.isPlainObject(t[s])){if(!(s in e))Object.assign(r,{[s]:t[s]});else r[s]=mergeDeep(e[s],t[s])}else{Object.assign(r,{[s]:t[s]})}}));return r}function removeUndefinedProperties(e){for(const t in e){if(e[t]===undefined){delete e[t]}}return e}function merge(e,t,r){if(typeof t==="string"){let[e,o]=t.split(" ");r=Object.assign(o?{method:e,url:o}:{url:e},r)}else{r=Object.assign({},t)}r.headers=lowercaseKeys(r.headers);removeUndefinedProperties(r);removeUndefinedProperties(r.headers);const o=mergeDeep(e||{},r);if(e&&e.mediaType.previews.length){o.mediaType.previews=e.mediaType.previews.filter((e=>!o.mediaType.previews.includes(e))).concat(o.mediaType.previews)}o.mediaType.previews=o.mediaType.previews.map((e=>e.replace(/-preview/,"")));return o}function addQueryParameters(e,t){const r=/\?/.test(e)?"&":"?";const o=Object.keys(t);if(o.length===0){return e}return e+r+o.map((e=>{if(e==="q"){return"q="+t.q.split("+").map(encodeURIComponent).join("+")}return`${e}=${encodeURIComponent(t[e])}`})).join("&")}const n=/\{[^}]+\}/g;function removeNonChars(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function extractUrlVariableNames(e){const t=e.match(n);if(!t){return[]}return t.map(removeNonChars).reduce(((e,t)=>e.concat(t)),[])}function omit(e,t){return Object.keys(e).filter((e=>!t.includes(e))).reduce(((t,r)=>{t[r]=e[r];return t}),{})}function encodeReserved(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){if(!/%[0-9A-Fa-f]/.test(e)){e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")}return e})).join("")}function encodeUnreserved(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function encodeValue(e,t,r){t=e==="+"||e==="#"?encodeReserved(t):encodeUnreserved(t);if(r){return encodeUnreserved(r)+"="+t}else{return t}}function isDefined(e){return e!==undefined&&e!==null}function isKeyOperator(e){return e===";"||e==="&"||e==="?"}function getValues(e,t,r,o){var s=e[r],n=[];if(isDefined(s)&&s!==""){if(typeof s==="string"||typeof s==="number"||typeof s==="boolean"){s=s.toString();if(o&&o!=="*"){s=s.substring(0,parseInt(o,10))}n.push(encodeValue(t,s,isKeyOperator(t)?r:""))}else{if(o==="*"){if(Array.isArray(s)){s.filter(isDefined).forEach((function(e){n.push(encodeValue(t,e,isKeyOperator(t)?r:""))}))}else{Object.keys(s).forEach((function(e){if(isDefined(s[e])){n.push(encodeValue(t,s[e],e))}}))}}else{const e=[];if(Array.isArray(s)){s.filter(isDefined).forEach((function(r){e.push(encodeValue(t,r))}))}else{Object.keys(s).forEach((function(r){if(isDefined(s[r])){e.push(encodeUnreserved(r));e.push(encodeValue(t,s[r].toString()))}}))}if(isKeyOperator(t)){n.push(encodeUnreserved(r)+"="+e.join(","))}else if(e.length!==0){n.push(e.join(","))}}}}else{if(t===";"){if(isDefined(s)){n.push(encodeUnreserved(r))}}else if(s===""&&(t==="&"||t==="?")){n.push(encodeUnreserved(r)+"=")}else if(s===""){n.push("")}}return n}function parseUrl(e){return{expand:expand.bind(null,e)}}function expand(e,t){var r=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,o,s){if(o){let e="";const s=[];if(r.indexOf(o.charAt(0))!==-1){e=o.charAt(0);o=o.substr(1)}o.split(/,/g).forEach((function(r){var o=/([^:\*]*)(?::(\d+)|(\*))?/.exec(r);s.push(getValues(t,e,o[1],o[2]||o[3]))}));if(e&&e!=="+"){var n=",";if(e==="?"){n="&"}else if(e!=="#"){n=e}return(s.length!==0?e:"")+s.join(n)}else{return s.join(",")}}else{return encodeReserved(s)}}))}function parse(e){let t=e.method.toUpperCase();let r=(e.url||"/").replace(/:([a-z]\w+)/g,"{$1}");let o=Object.assign({},e.headers);let s;let n=omit(e,["method","baseUrl","url","headers","request","mediaType"]);const i=extractUrlVariableNames(r);r=parseUrl(r).expand(n);if(!/^http/.test(r)){r=e.baseUrl+r}const a=Object.keys(e).filter((e=>i.includes(e))).concat("baseUrl");const c=omit(n,a);const u=/application\/octet-stream/i.test(o.accept);if(!u){if(e.mediaType.format){o.accept=o.accept.split(/,/).map((t=>t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${e.mediaType.format}`))).join(",")}if(e.mediaType.previews.length){const t=o.accept.match(/[\w-]+(?=-preview)/g)||[];o.accept=t.concat(e.mediaType.previews).map((t=>{const r=e.mediaType.format?`.${e.mediaType.format}`:"+json";return`application/vnd.github.${t}-preview${r}`})).join(",")}}if(["GET","HEAD"].includes(t)){r=addQueryParameters(r,c)}else{if("data"in c){s=c.data}else{if(Object.keys(c).length){s=c}else{o["content-length"]=0}}}if(!o["content-type"]&&typeof s!=="undefined"){o["content-type"]="application/json; charset=utf-8"}if(["PATCH","PUT"].includes(t)&&typeof s==="undefined"){s=""}return Object.assign({method:t,url:r,headers:o},typeof s!=="undefined"?{body:s}:null,e.request?{request:e.request}:null)}function endpointWithDefaults(e,t,r){return parse(merge(e,t,r))}function withDefaults(e,t){const r=merge(e,t);const o=endpointWithDefaults.bind(null,r);return Object.assign(o,{DEFAULTS:r,defaults:withDefaults.bind(null,r),merge:merge.bind(null,r),parse:parse})}const i="6.0.12";const a=`octokit-endpoint.js/${i} ${s.getUserAgent()}`;const c={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":a},mediaType:{format:"",previews:[]}};const u=withDefaults(null,c);t.endpoint=u},558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true}); +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,r;if(isObject(e)===false)return false;t=e.constructor;if(t===undefined)return true;r=t.prototype;if(isObject(r)===false)return false;if(r.hasOwnProperty("isPrototypeOf")===false){return false}return true}t.isPlainObject=isPlainObject},668:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});var o=r(234);var s=r(429);const n="4.6.4";class GraphqlError extends Error{constructor(e,t){const r=t.data.errors[0].message;super(r);Object.assign(this,t.data);Object.assign(this,{headers:t.headers});this.name="GraphqlError";this.request=e;if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}}const i=["method","baseUrl","url","headers","request","query","mediaType"];const a=["query","method","url"];const c=/\/api\/v3\/?$/;function graphql(e,t,r){if(r){if(typeof t==="string"&&"query"in r){return Promise.reject(new Error(`[@octokit/graphql] "query" cannot be used as variable name`))}for(const e in r){if(!a.includes(e))continue;return Promise.reject(new Error(`[@octokit/graphql] "${e}" cannot be used as variable name`))}}const o=typeof t==="string"?Object.assign({query:t},r):t;const s=Object.keys(o).reduce(((e,t)=>{if(i.includes(t)){e[t]=o[t];return e}if(!e.variables){e.variables={}}e.variables[t]=o[t];return e}),{});const n=o.baseUrl||e.endpoint.DEFAULTS.baseUrl;if(c.test(n)){s.url=n.replace(c,"/api/graphql")}return e(s).then((e=>{if(e.data.errors){const t={};for(const r of Object.keys(e.headers)){t[r]=e.headers[r]}throw new GraphqlError(s,{headers:t,data:e.data})}return e.data.data}))}function withDefaults(e,t){const r=e.defaults(t);const newApi=(e,t)=>graphql(r,e,t);return Object.assign(newApi,{defaults:withDefaults.bind(null,r),endpoint:o.request.endpoint})}const u=withDefaults(o.request,{headers:{"user-agent":`octokit-graphql.js/${n} ${s.getUserAgent()}`},method:"POST",url:"/graphql"});function withCustomRequest(e){return withDefaults(e,{method:"POST",url:"/graphql"})}t.graphql=u;t.withCustomRequest=withCustomRequest},193:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});const r="2.13.5";function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);if(t){o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.push.apply(r,o)}return r}function _objectSpread2(e){for(var t=1;t({async next(){if(!a)return{done:true};try{const e=await s({method:n,url:a,headers:i});const t=normalizePaginatedListResponse(e);a=((t.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1];return{value:t}}catch(e){if(e.status!==409)throw e;a="";return{value:{status:200,headers:{},data:[]}}}}})}}function paginate(e,t,r,o){if(typeof r==="function"){o=r;r=undefined}return gather(e,[],iterator(e,t,r)[Symbol.asyncIterator](),o)}function gather(e,t,r,o){return r.next().then((s=>{if(s.done){return t}let n=false;function done(){n=true}t=t.concat(o?o(s.value,done):s.value.data);if(n){return t}return gather(e,t,r,o)}))}const o=Object.assign(paginate,{iterator:iterator});const s=["GET /app/installations","GET /applications/grants","GET /authorizations","GET /enterprises/{enterprise}/actions/permissions/organizations","GET /enterprises/{enterprise}/actions/runner-groups","GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations","GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners","GET /enterprises/{enterprise}/actions/runners","GET /enterprises/{enterprise}/actions/runners/downloads","GET /events","GET /gists","GET /gists/public","GET /gists/starred","GET /gists/{gist_id}/comments","GET /gists/{gist_id}/commits","GET /gists/{gist_id}/forks","GET /installation/repositories","GET /issues","GET /marketplace_listing/plans","GET /marketplace_listing/plans/{plan_id}/accounts","GET /marketplace_listing/stubbed/plans","GET /marketplace_listing/stubbed/plans/{plan_id}/accounts","GET /networks/{owner}/{repo}/events","GET /notifications","GET /organizations","GET /orgs/{org}/actions/permissions/repositories","GET /orgs/{org}/actions/runner-groups","GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories","GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners","GET /orgs/{org}/actions/runners","GET /orgs/{org}/actions/runners/downloads","GET /orgs/{org}/actions/secrets","GET /orgs/{org}/actions/secrets/{secret_name}/repositories","GET /orgs/{org}/blocks","GET /orgs/{org}/credential-authorizations","GET /orgs/{org}/events","GET /orgs/{org}/failed_invitations","GET /orgs/{org}/hooks","GET /orgs/{org}/installations","GET /orgs/{org}/invitations","GET /orgs/{org}/invitations/{invitation_id}/teams","GET /orgs/{org}/issues","GET /orgs/{org}/members","GET /orgs/{org}/migrations","GET /orgs/{org}/migrations/{migration_id}/repositories","GET /orgs/{org}/outside_collaborators","GET /orgs/{org}/projects","GET /orgs/{org}/public_members","GET /orgs/{org}/repos","GET /orgs/{org}/team-sync/groups","GET /orgs/{org}/teams","GET /orgs/{org}/teams/{team_slug}/discussions","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions","GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions","GET /orgs/{org}/teams/{team_slug}/invitations","GET /orgs/{org}/teams/{team_slug}/members","GET /orgs/{org}/teams/{team_slug}/projects","GET /orgs/{org}/teams/{team_slug}/repos","GET /orgs/{org}/teams/{team_slug}/team-sync/group-mappings","GET /orgs/{org}/teams/{team_slug}/teams","GET /projects/columns/{column_id}/cards","GET /projects/{project_id}/collaborators","GET /projects/{project_id}/columns","GET /repos/{owner}/{repo}/actions/artifacts","GET /repos/{owner}/{repo}/actions/runners","GET /repos/{owner}/{repo}/actions/runners/downloads","GET /repos/{owner}/{repo}/actions/runs","GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts","GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs","GET /repos/{owner}/{repo}/actions/secrets","GET /repos/{owner}/{repo}/actions/workflows","GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs","GET /repos/{owner}/{repo}/assignees","GET /repos/{owner}/{repo}/branches","GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations","GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs","GET /repos/{owner}/{repo}/code-scanning/alerts","GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances","GET /repos/{owner}/{repo}/code-scanning/analyses","GET /repos/{owner}/{repo}/collaborators","GET /repos/{owner}/{repo}/comments","GET /repos/{owner}/{repo}/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/commits","GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head","GET /repos/{owner}/{repo}/commits/{commit_sha}/comments","GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls","GET /repos/{owner}/{repo}/commits/{ref}/check-runs","GET /repos/{owner}/{repo}/commits/{ref}/check-suites","GET /repos/{owner}/{repo}/commits/{ref}/statuses","GET /repos/{owner}/{repo}/contributors","GET /repos/{owner}/{repo}/deployments","GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses","GET /repos/{owner}/{repo}/events","GET /repos/{owner}/{repo}/forks","GET /repos/{owner}/{repo}/git/matching-refs/{ref}","GET /repos/{owner}/{repo}/hooks","GET /repos/{owner}/{repo}/invitations","GET /repos/{owner}/{repo}/issues","GET /repos/{owner}/{repo}/issues/comments","GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/issues/events","GET /repos/{owner}/{repo}/issues/{issue_number}/comments","GET /repos/{owner}/{repo}/issues/{issue_number}/events","GET /repos/{owner}/{repo}/issues/{issue_number}/labels","GET /repos/{owner}/{repo}/issues/{issue_number}/reactions","GET /repos/{owner}/{repo}/issues/{issue_number}/timeline","GET /repos/{owner}/{repo}/keys","GET /repos/{owner}/{repo}/labels","GET /repos/{owner}/{repo}/milestones","GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels","GET /repos/{owner}/{repo}/notifications","GET /repos/{owner}/{repo}/pages/builds","GET /repos/{owner}/{repo}/projects","GET /repos/{owner}/{repo}/pulls","GET /repos/{owner}/{repo}/pulls/comments","GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions","GET /repos/{owner}/{repo}/pulls/{pull_number}/comments","GET /repos/{owner}/{repo}/pulls/{pull_number}/commits","GET /repos/{owner}/{repo}/pulls/{pull_number}/files","GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers","GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews","GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments","GET /repos/{owner}/{repo}/releases","GET /repos/{owner}/{repo}/releases/{release_id}/assets","GET /repos/{owner}/{repo}/secret-scanning/alerts","GET /repos/{owner}/{repo}/stargazers","GET /repos/{owner}/{repo}/subscribers","GET /repos/{owner}/{repo}/tags","GET /repos/{owner}/{repo}/teams","GET /repositories","GET /repositories/{repository_id}/environments/{environment_name}/secrets","GET /scim/v2/enterprises/{enterprise}/Groups","GET /scim/v2/enterprises/{enterprise}/Users","GET /scim/v2/organizations/{org}/Users","GET /search/code","GET /search/commits","GET /search/issues","GET /search/labels","GET /search/repositories","GET /search/topics","GET /search/users","GET /teams/{team_id}/discussions","GET /teams/{team_id}/discussions/{discussion_number}/comments","GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions","GET /teams/{team_id}/discussions/{discussion_number}/reactions","GET /teams/{team_id}/invitations","GET /teams/{team_id}/members","GET /teams/{team_id}/projects","GET /teams/{team_id}/repos","GET /teams/{team_id}/team-sync/group-mappings","GET /teams/{team_id}/teams","GET /user/blocks","GET /user/emails","GET /user/followers","GET /user/following","GET /user/gpg_keys","GET /user/installations","GET /user/installations/{installation_id}/repositories","GET /user/issues","GET /user/keys","GET /user/marketplace_purchases","GET /user/marketplace_purchases/stubbed","GET /user/memberships/orgs","GET /user/migrations","GET /user/migrations/{migration_id}/repositories","GET /user/orgs","GET /user/public_emails","GET /user/repos","GET /user/repository_invitations","GET /user/starred","GET /user/subscriptions","GET /user/teams","GET /users","GET /users/{username}/events","GET /users/{username}/events/orgs/{org}","GET /users/{username}/events/public","GET /users/{username}/followers","GET /users/{username}/following","GET /users/{username}/gists","GET /users/{username}/gpg_keys","GET /users/{username}/keys","GET /users/{username}/orgs","GET /users/{username}/projects","GET /users/{username}/received_events","GET /users/{username}/received_events/public","GET /users/{username}/repos","GET /users/{username}/starred","GET /users/{username}/subscriptions"];function isPaginatingEndpoint(e){if(typeof e==="string"){return s.includes(e)}else{return false}}function paginateRest(e){return{paginate:Object.assign(paginate.bind(null,e),{iterator:iterator.bind(null,e)})}}paginateRest.VERSION=r;t.composePaginateRest=o;t.isPaginatingEndpoint=isPaginatingEndpoint;t.paginateRest=paginateRest;t.paginatingEndpoints=s},44:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);if(t){o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))}r.push.apply(r,o)}return r}function _objectSpread2(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=r(932);var s=_interopDefault(r(223));const n=s((e=>console.warn(e)));const i=s((e=>console.warn(e)));class RequestError extends Error{constructor(e,t,r){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="HttpError";this.status=t;let s;if("headers"in r&&typeof r.headers!=="undefined"){s=r.headers}if("response"in r){this.response=r.response;s=r.response.headers}const a=Object.assign({},r.request);if(r.request.headers.authorization){a.headers=Object.assign({},r.request.headers,{authorization:r.request.headers.authorization.replace(/ .*$/," [REDACTED]")})}a.url=a.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]");this.request=a;Object.defineProperty(this,"code",{get(){n(new o.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));return t}});Object.defineProperty(this,"headers",{get(){i(new o.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));return s||{}}})}}t.RequestError=RequestError},234:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=r(440);var s=r(429);var n=r(62);var i=_interopDefault(r(467));var a=r(537);const c="5.6.0";function getBufferResponse(e){return e.arrayBuffer()}function fetchWrapper(e){const t=e.request&&e.request.log?e.request.log:console;if(n.isPlainObject(e.body)||Array.isArray(e.body)){e.body=JSON.stringify(e.body)}let r={};let o;let s;const c=e.request&&e.request.fetch||i;return c(e.url,Object.assign({method:e.method,body:e.body,headers:e.headers,redirect:e.redirect},e.request)).then((async n=>{s=n.url;o=n.status;for(const e of n.headers){r[e[0]]=e[1]}if("deprecation"in r){const o=r.link&&r.link.match(/<([^>]+)>; rel="deprecation"/);const s=o&&o.pop();t.warn(`[@octokit/request] "${e.method} ${e.url}" is deprecated. It is scheduled to be removed on ${r.sunset}${s?`. See ${s}`:""}`)}if(o===204||o===205){return}if(e.method==="HEAD"){if(o<400){return}throw new a.RequestError(n.statusText,o,{response:{url:s,status:o,headers:r,data:undefined},request:e})}if(o===304){throw new a.RequestError("Not modified",o,{response:{url:s,status:o,headers:r,data:await getResponseData(n)},request:e})}if(o>=400){const t=await getResponseData(n);const i=new a.RequestError(toErrorMessage(t),o,{response:{url:s,status:o,headers:r,data:t},request:e});throw i}return getResponseData(n)})).then((e=>({status:o,url:s,headers:r,data:e}))).catch((t=>{if(t instanceof a.RequestError)throw t;throw new a.RequestError(t.message,500,{request:e})}))}async function getResponseData(e){const t=e.headers.get("content-type");if(/application\/json/.test(t)){return e.json()}if(!t||/^text\/|charset=utf-8$/.test(t)){return e.text()}return getBufferResponse(e)}function toErrorMessage(e){if(typeof e==="string")return e;if("message"in e){if(Array.isArray(e.errors)){return`${e.message}: ${e.errors.map(JSON.stringify).join(", ")}`}return e.message}return`Unknown error: ${JSON.stringify(e)}`}function withDefaults(e,t){const r=e.defaults(t);const newApi=function(e,t){const o=r.merge(e,t);if(!o.request||!o.request.hook){return fetchWrapper(r.parse(o))}const request=(e,t)=>fetchWrapper(r.parse(r.merge(e,t)));Object.assign(request,{endpoint:r,defaults:withDefaults.bind(null,r)});return o.request.hook(request,o)};return Object.assign(newApi,{endpoint:r,defaults:withDefaults.bind(null,r)})}const u=withDefaults(o.endpoint,{headers:{"user-agent":`octokit-request.js/${c} ${s.getUserAgent()}`}});t.request=u},62:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true}); +/*! + * is-plain-object + * + * Copyright (c) 2014-2017, Jon Schlinkert. + * Released under the MIT License. + */function isObject(e){return Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,r;if(isObject(e)===false)return false;t=e.constructor;if(t===undefined)return true;r=t.prototype;if(isObject(r)===false)return false;if(r.hasOwnProperty("isPrototypeOf")===false){return false}return true}t.isPlainObject=isPlainObject},682:(e,t,r)=>{var o=r(670);var s=r(549);var n=r(819);var i=Function.bind;var a=i.bind(i);function bindApi(e,t,r){var o=a(n,null).apply(null,r?[t,r]:[t]);e.api={remove:o};e.remove=o;["before","error","after","wrap"].forEach((function(o){var n=r?[t,o,r]:[t,o];e[o]=e.api[o]=a(s,null).apply(null,n)}))}function HookSingular(){var e="h";var t={registry:{}};var r=o.bind(null,t,e);bindApi(r,t,e);return r}function HookCollection(){var e={registry:{}};var t=o.bind(null,e);bindApi(t,e);return t}var c=false;function Hook(){if(!c){console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4');c=true}return HookCollection()}Hook.Singular=HookSingular.bind();Hook.Collection=HookCollection.bind();e.exports=Hook;e.exports.Hook=Hook;e.exports.Singular=Hook.Singular;e.exports.Collection=Hook.Collection},549:e=>{e.exports=addHook;function addHook(e,t,r,o){var s=o;if(!e.registry[r]){e.registry[r]=[]}if(t==="before"){o=function(e,t){return Promise.resolve().then(s.bind(null,t)).then(e.bind(null,t))}}if(t==="after"){o=function(e,t){var r;return Promise.resolve().then(e.bind(null,t)).then((function(e){r=e;return s(r,t)})).then((function(){return r}))}}if(t==="error"){o=function(e,t){return Promise.resolve().then(e.bind(null,t)).catch((function(e){return s(e,t)}))}}e.registry[r].push({hook:o,orig:s})}},670:e=>{e.exports=register;function register(e,t,r,o){if(typeof r!=="function"){throw new Error("method for before hook must be a function")}if(!o){o={}}if(Array.isArray(t)){return t.reverse().reduce((function(t,r){return register.bind(null,e,r,t,o)}),r)()}return Promise.resolve().then((function(){if(!e.registry[t]){return r(o)}return e.registry[t].reduce((function(e,t){return t.hook.bind(null,e,o)}),r)()}))}},819:e=>{e.exports=removeHook;function removeHook(e,t,r){if(!e.registry[t]){return}var o=e.registry[t].map((function(e){return e.orig})).indexOf(r);if(o===-1){return}e.registry[t].splice(o,1)}},932:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});class Deprecation extends Error{constructor(e){super(e);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}this.name="Deprecation"}}t.Deprecation=Deprecation},467:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});function _interopDefault(e){return e&&typeof e==="object"&&"default"in e?e["default"]:e}var o=_interopDefault(r(413));var s=_interopDefault(r(605));var n=_interopDefault(r(835));var i=_interopDefault(r(211));var a=_interopDefault(r(761));const c=o.Readable;const u=Symbol("buffer");const l=Symbol("type");class Blob{constructor(){this[l]="";const e=arguments[0];const t=arguments[1];const r=[];let o=0;if(e){const t=e;const s=Number(t.length);for(let e=0;e1&&arguments[1]!==undefined?arguments[1]:{},s=r.size;let n=s===undefined?0:s;var i=r.timeout;let a=i===undefined?0:i;if(e==null){e=null}else if(isURLSearchParams(e)){e=Buffer.from(e.toString())}else if(isBlob(e));else if(Buffer.isBuffer(e));else if(Object.prototype.toString.call(e)==="[object ArrayBuffer]"){e=Buffer.from(e)}else if(ArrayBuffer.isView(e)){e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)}else if(e instanceof o);else{e=Buffer.from(String(e))}this[d]={body:e,disturbed:false,error:null};this.size=n;this.timeout=a;if(e instanceof o){e.on("error",(function(e){const r=e.name==="AbortError"?e:new FetchError(`Invalid response body while trying to fetch ${t.url}: ${e.message}`,"system",e);t[d].error=r}))}}Body.prototype={get body(){return this[d].body},get bodyUsed(){return this[d].disturbed},arrayBuffer(){return consumeBody.call(this).then((function(e){return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}))},blob(){let e=this.headers&&this.headers.get("content-type")||"";return consumeBody.call(this).then((function(t){return Object.assign(new Blob([],{type:e.toLowerCase()}),{[u]:t})}))},json(){var e=this;return consumeBody.call(this).then((function(t){try{return JSON.parse(t.toString())}catch(t){return Body.Promise.reject(new FetchError(`invalid json response body at ${e.url} reason: ${t.message}`,"invalid-json"))}}))},text(){return consumeBody.call(this).then((function(e){return e.toString()}))},buffer(){return consumeBody.call(this)},textConverted(){var e=this;return consumeBody.call(this).then((function(t){return convertBody(t,e.headers)}))}};Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true}});Body.mixIn=function(e){for(const t of Object.getOwnPropertyNames(Body.prototype)){if(!(t in e)){const r=Object.getOwnPropertyDescriptor(Body.prototype,t);Object.defineProperty(e,t,r)}}};function consumeBody(){var e=this;if(this[d].disturbed){return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`))}this[d].disturbed=true;if(this[d].error){return Body.Promise.reject(this[d].error)}let t=this.body;if(t===null){return Body.Promise.resolve(Buffer.alloc(0))}if(isBlob(t)){t=t.stream()}if(Buffer.isBuffer(t)){return Body.Promise.resolve(t)}if(!(t instanceof o)){return Body.Promise.resolve(Buffer.alloc(0))}let r=[];let s=0;let n=false;return new Body.Promise((function(o,i){let a;if(e.timeout){a=setTimeout((function(){n=true;i(new FetchError(`Response timeout while trying to fetch ${e.url} (over ${e.timeout}ms)`,"body-timeout"))}),e.timeout)}t.on("error",(function(t){if(t.name==="AbortError"){n=true;i(t)}else{i(new FetchError(`Invalid response body while trying to fetch ${e.url}: ${t.message}`,"system",t))}}));t.on("data",(function(t){if(n||t===null){return}if(e.size&&s+t.length>e.size){n=true;i(new FetchError(`content size at ${e.url} over limit: ${e.size}`,"max-size"));return}s+=t.length;r.push(t)}));t.on("end",(function(){if(n){return}clearTimeout(a);try{o(Buffer.concat(r,s))}catch(t){i(new FetchError(`Could not create Buffer from response body for ${e.url}: ${t.message}`,"system",t))}}))}))}function convertBody(e,t){if(typeof p!=="function"){throw new Error("The package `encoding` must be installed to use the textConverted() function")}const r=t.get("content-type");let o="utf-8";let s,n;if(r){s=/charset=([^;]*)/i.exec(r)}n=e.slice(0,1024).toString();if(!s&&n){s=/0&&arguments[0]!==undefined?arguments[0]:undefined;this[w]=Object.create(null);if(e instanceof Headers){const t=e.raw();const r=Object.keys(t);for(const e of r){for(const r of t[e]){this.append(e,r)}}return}if(e==null);else if(typeof e==="object"){const t=e[Symbol.iterator];if(t!=null){if(typeof t!=="function"){throw new TypeError("Header pairs must be iterable")}const r=[];for(const t of e){if(typeof t!=="object"||typeof t[Symbol.iterator]!=="function"){throw new TypeError("Each header pair must be iterable")}r.push(Array.from(t))}for(const e of r){if(e.length!==2){throw new TypeError("Each header pair must be a name/value tuple")}this.append(e[0],e[1])}}else{for(const t of Object.keys(e)){const r=e[t];this.append(t,r)}}}else{throw new TypeError("Provided initializer must be an object")}}get(e){e=`${e}`;validateName(e);const t=find(this[w],e);if(t===undefined){return null}return this[w][t].join(", ")}forEach(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:undefined;let r=getHeaders(this);let o=0;while(o1&&arguments[1]!==undefined?arguments[1]:"key+value";const r=Object.keys(e[w]).sort();return r.map(t==="key"?function(e){return e.toLowerCase()}:t==="value"?function(t){return e[w][t].join(", ")}:function(t){return[t.toLowerCase(),e[w][t].join(", ")]})}const b=Symbol("internal");function createHeadersIterator(e,t){const r=Object.create(E);r[b]={target:e,kind:t,index:0};return r}const E=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==E){throw new TypeError("Value of `this` is not a HeadersIterator")}var e=this[b];const t=e.target,r=e.kind,o=e.index;const s=getHeaders(t,r);const n=s.length;if(o>=n){return{value:undefined,done:true}}this[b].index=o+1;return{value:s[o],done:false}}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(E,Symbol.toStringTag,{value:"HeadersIterator",writable:false,enumerable:false,configurable:true});function exportNodeCompatibleHeaders(e){const t=Object.assign({__proto__:null},e[w]);const r=find(e[w],"Host");if(r!==undefined){t[r]=t[r][0]}return t}function createHeadersLenient(e){const t=new Headers;for(const r of Object.keys(e)){if(g.test(r)){continue}if(Array.isArray(e[r])){for(const o of e[r]){if(h.test(o)){continue}if(t[w][r]===undefined){t[w][r]=[o]}else{t[w][r].push(o)}}}else if(!h.test(e[r])){t[w][r]=[e[r]]}}return t}const T=Symbol("Response internals");const y=s.STATUS_CODES;class Response{constructor(){let e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:null;let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};Body.call(this,e,t);const r=t.status||200;const o=new Headers(t.headers);if(e!=null&&!o.has("Content-Type")){const t=extractContentType(e);if(t){o.append("Content-Type",t)}}this[T]={url:t.url,status:r,statusText:t.statusText||y[r],headers:o,counter:t.counter}}get url(){return this[T].url||""}get status(){return this[T].status}get ok(){return this[T].status>=200&&this[T].status<300}get redirected(){return this[T].counter>0}get statusText(){return this[T].statusText}get headers(){return this[T].headers}clone(){return new Response(clone(this),{url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected})}}Body.mixIn(Response.prototype);Object.defineProperties(Response.prototype,{url:{enumerable:true},status:{enumerable:true},ok:{enumerable:true},redirected:{enumerable:true},statusText:{enumerable:true},headers:{enumerable:true},clone:{enumerable:true}});Object.defineProperty(Response.prototype,Symbol.toStringTag,{value:"Response",writable:false,enumerable:false,configurable:true});const v=Symbol("Request internals");const _=n.parse;const k=n.format;const O="destroy"in o.Readable.prototype;function isRequest(e){return typeof e==="object"&&typeof e[v]==="object"}function isAbortSignal(e){const t=e&&typeof e==="object"&&Object.getPrototypeOf(e);return!!(t&&t.constructor.name==="AbortSignal")}class Request{constructor(e){let t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};let r;if(!isRequest(e)){if(e&&e.href){r=_(e.href)}else{r=_(`${e}`)}e={}}else{r=_(e.url)}let o=t.method||e.method||"GET";o=o.toUpperCase();if((t.body!=null||isRequest(e)&&e.body!==null)&&(o==="GET"||o==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}let s=t.body!=null?t.body:isRequest(e)&&e.body!==null?clone(e):null;Body.call(this,s,{timeout:t.timeout||e.timeout||0,size:t.size||e.size||0});const n=new Headers(t.headers||e.headers||{});if(s!=null&&!n.has("Content-Type")){const e=extractContentType(s);if(e){n.append("Content-Type",e)}}let i=isRequest(e)?e.signal:null;if("signal"in t)i=t.signal;if(i!=null&&!isAbortSignal(i)){throw new TypeError("Expected signal to be an instanceof AbortSignal")}this[v]={method:o,redirect:t.redirect||e.redirect||"follow",headers:n,parsedURL:r,signal:i};this.follow=t.follow!==undefined?t.follow:e.follow!==undefined?e.follow:20;this.compress=t.compress!==undefined?t.compress:e.compress!==undefined?e.compress:true;this.counter=t.counter||e.counter||0;this.agent=t.agent||e.agent}get method(){return this[v].method}get url(){return k(this[v].parsedURL)}get headers(){return this[v].headers}get redirect(){return this[v].redirect}get signal(){return this[v].signal}clone(){return new Request(this)}}Body.mixIn(Request.prototype);Object.defineProperty(Request.prototype,Symbol.toStringTag,{value:"Request",writable:false,enumerable:false,configurable:true});Object.defineProperties(Request.prototype,{method:{enumerable:true},url:{enumerable:true},headers:{enumerable:true},redirect:{enumerable:true},clone:{enumerable:true},signal:{enumerable:true}});function getNodeRequestOptions(e){const t=e[v].parsedURL;const r=new Headers(e[v].headers);if(!r.has("Accept")){r.set("Accept","*/*")}if(!t.protocol||!t.hostname){throw new TypeError("Only absolute URLs are supported")}if(!/^https?:$/.test(t.protocol)){throw new TypeError("Only HTTP(S) protocols are supported")}if(e.signal&&e.body instanceof o.Readable&&!O){throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8")}let s=null;if(e.body==null&&/^(POST|PUT)$/i.test(e.method)){s="0"}if(e.body!=null){const t=getTotalBytes(e);if(typeof t==="number"){s=String(t)}}if(s){r.set("Content-Length",s)}if(!r.has("User-Agent")){r.set("User-Agent","node-fetch/1.0 (+https://github.com/bitinn/node-fetch)")}if(e.compress&&!r.has("Accept-Encoding")){r.set("Accept-Encoding","gzip,deflate")}let n=e.agent;if(typeof n==="function"){n=n(t)}if(!r.has("Connection")&&!n){r.set("Connection","close")}return Object.assign({},t,{method:e.method,headers:exportNodeCompatibleHeaders(r),agent:n})}function AbortError(e){Error.call(this,e);this.type="aborted";this.message=e;Error.captureStackTrace(this,this.constructor)}AbortError.prototype=Object.create(Error.prototype);AbortError.prototype.constructor=AbortError;AbortError.prototype.name="AbortError";const S=o.PassThrough;const A=n.resolve;function fetch(e,t){if(!fetch.Promise){throw new Error("native promise missing, set fetch.Promise to your favorite alternative")}Body.Promise=fetch.Promise;return new fetch.Promise((function(r,n){const c=new Request(e,t);const u=getNodeRequestOptions(c);const l=(u.protocol==="https:"?i:s).request;const p=c.signal;let d=null;const m=function abort(){let e=new AbortError("The user aborted a request.");n(e);if(c.body&&c.body instanceof o.Readable){c.body.destroy(e)}if(!d||!d.body)return;d.body.emit("error",e)};if(p&&p.aborted){m();return}const g=function abortAndFinalize(){m();finalize()};const h=l(u);let w;if(p){p.addEventListener("abort",g)}function finalize(){h.abort();if(p)p.removeEventListener("abort",g);clearTimeout(w)}if(c.timeout){h.once("socket",(function(e){w=setTimeout((function(){n(new FetchError(`network timeout at: ${c.url}`,"request-timeout"));finalize()}),c.timeout)}))}h.on("error",(function(e){n(new FetchError(`request to ${c.url} failed, reason: ${e.message}`,"system",e));finalize()}));h.on("response",(function(e){clearTimeout(w);const t=createHeadersLenient(e.headers);if(fetch.isRedirect(e.statusCode)){const o=t.get("Location");const s=o===null?null:A(c.url,o);switch(c.redirect){case"error":n(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${c.url}`,"no-redirect"));finalize();return;case"manual":if(s!==null){try{t.set("Location",s)}catch(e){n(e)}}break;case"follow":if(s===null){break}if(c.counter>=c.follow){n(new FetchError(`maximum redirect reached at: ${c.url}`,"max-redirect"));finalize();return}const o={headers:new Headers(c.headers),follow:c.follow,counter:c.counter+1,agent:c.agent,compress:c.compress,method:c.method,body:c.body,signal:c.signal,timeout:c.timeout,size:c.size};if(e.statusCode!==303&&c.body&&getTotalBytes(c)===null){n(new FetchError("Cannot follow redirect with body being a readable stream","unsupported-redirect"));finalize();return}if(e.statusCode===303||(e.statusCode===301||e.statusCode===302)&&c.method==="POST"){o.method="GET";o.body=undefined;o.headers.delete("content-length")}r(fetch(new Request(s,o)));finalize();return}}e.once("end",(function(){if(p)p.removeEventListener("abort",g)}));let o=e.pipe(new S);const s={url:c.url,status:e.statusCode,statusText:e.statusMessage,headers:t,size:c.size,timeout:c.timeout,counter:c.counter};const i=t.get("Content-Encoding");if(!c.compress||c.method==="HEAD"||i===null||e.statusCode===204||e.statusCode===304){d=new Response(o,s);r(d);return}const u={flush:a.Z_SYNC_FLUSH,finishFlush:a.Z_SYNC_FLUSH};if(i=="gzip"||i=="x-gzip"){o=o.pipe(a.createGunzip(u));d=new Response(o,s);r(d);return}if(i=="deflate"||i=="x-deflate"){const t=e.pipe(new S);t.once("data",(function(e){if((e[0]&15)===8){o=o.pipe(a.createInflate())}else{o=o.pipe(a.createInflateRaw())}d=new Response(o,s);r(d)}));return}if(i=="br"&&typeof a.createBrotliDecompress==="function"){o=o.pipe(a.createBrotliDecompress());d=new Response(o,s);r(d);return}d=new Response(o,s);r(d)}));writeToStream(h,c)}))}fetch.isRedirect=function(e){return e===301||e===302||e===303||e===307||e===308};fetch.Promise=global.Promise;e.exports=t=fetch;Object.defineProperty(t,"__esModule",{value:true});t.default=t;t.Headers=Headers;t.Request=Request;t.Response=Response;t.FetchError=FetchError},223:(e,t,r)=>{var o=r(940);e.exports=o(once);e.exports.strict=o(onceStrict);once.proto=once((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:true});Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:true})}));function once(e){var f=function(){if(f.called)return f.value;f.called=true;return f.value=e.apply(this,arguments)};f.called=false;return f}function onceStrict(e){var f=function(){if(f.called)throw new Error(f.onceError);f.called=true;return f.value=e.apply(this,arguments)};var t=e.name||"Function wrapped with `once`";f.onceError=t+" shouldn't be called more than once";f.called=false;return f}},294:(e,t,r)=>{e.exports=r(219)},219:(e,t,r)=>{"use strict";var o=r(631);var s=r(16);var n=r(605);var i=r(211);var a=r(614);var c=r(357);var u=r(669);t.httpOverHttp=httpOverHttp;t.httpsOverHttp=httpsOverHttp;t.httpOverHttps=httpOverHttps;t.httpsOverHttps=httpsOverHttps;function httpOverHttp(e){var t=new TunnelingAgent(e);t.request=n.request;return t}function httpsOverHttp(e){var t=new TunnelingAgent(e);t.request=n.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function httpOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;return t}function httpsOverHttps(e){var t=new TunnelingAgent(e);t.request=i.request;t.createSocket=createSecureSocket;t.defaultPort=443;return t}function TunnelingAgent(e){var t=this;t.options=e||{};t.proxyOptions=t.options.proxy||{};t.maxSockets=t.options.maxSockets||n.Agent.defaultMaxSockets;t.requests=[];t.sockets=[];t.on("free",(function onFree(e,r,o,s){var n=toOptions(r,o,s);for(var i=0,a=t.requests.length;i=this.maxSockets){s.requests.push(n);return}s.createSocket(n,(function(t){t.on("free",onFree);t.on("close",onCloseOrRemove);t.on("agentRemove",onCloseOrRemove);e.onSocket(t);function onFree(){s.emit("free",t,n)}function onCloseOrRemove(e){s.removeSocket(t);t.removeListener("free",onFree);t.removeListener("close",onCloseOrRemove);t.removeListener("agentRemove",onCloseOrRemove)}}))};TunnelingAgent.prototype.createSocket=function createSocket(e,t){var r=this;var o={};r.sockets.push(o);var s=mergeOptions({},r.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:false,headers:{host:e.host+":"+e.port}});if(e.localAddress){s.localAddress=e.localAddress}if(s.proxyAuth){s.headers=s.headers||{};s.headers["Proxy-Authorization"]="Basic "+new Buffer(s.proxyAuth).toString("base64")}l("making CONNECT request");var n=r.request(s);n.useChunkedEncodingByDefault=false;n.once("response",onResponse);n.once("upgrade",onUpgrade);n.once("connect",onConnect);n.once("error",onError);n.end();function onResponse(e){e.upgrade=true}function onUpgrade(e,t,r){process.nextTick((function(){onConnect(e,t,r)}))}function onConnect(s,i,a){n.removeAllListeners();i.removeAllListeners();if(s.statusCode!==200){l("tunneling socket could not be established, statusCode=%d",s.statusCode);i.destroy();var c=new Error("tunneling socket could not be established, "+"statusCode="+s.statusCode);c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(o);return}if(a.length>0){l("got illegal response body from proxy");i.destroy();var c=new Error("got illegal response body from proxy");c.code="ECONNRESET";e.request.emit("error",c);r.removeSocket(o);return}l("tunneling connection has established");r.sockets[r.sockets.indexOf(o)]=i;return t(i)}function onError(t){n.removeAllListeners();l("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var s=new Error("tunneling socket could not be established, "+"cause="+t.message);s.code="ECONNRESET";e.request.emit("error",s);r.removeSocket(o)}};TunnelingAgent.prototype.removeSocket=function removeSocket(e){var t=this.sockets.indexOf(e);if(t===-1){return}this.sockets.splice(t,1);var r=this.requests.shift();if(r){this.createSocket(r,(function(e){r.request.onSocket(e)}))}};function createSecureSocket(e,t){var r=this;TunnelingAgent.prototype.createSocket.call(r,e,(function(o){var n=e.request.getHeader("host");var i=mergeOptions({},r.options,{socket:o,servername:n?n.replace(/:.*$/,""):e.host});var a=s.connect(0,i);r.sockets[r.sockets.indexOf(o)]=a;t(a)}))}function toOptions(e,t,r){if(typeof e==="string"){return{host:e,port:t,localAddress:r}}return e}function mergeOptions(e){for(var t=1,r=arguments.length;t{"use strict";Object.defineProperty(t,"__esModule",{value:true});function getUserAgent(){if(typeof navigator==="object"&&"userAgent"in navigator){return navigator.userAgent}if(typeof process==="object"&&"version"in process){return`Node.js/${process.version.substr(1)} (${process.platform}; ${process.arch})`}return""}t.getUserAgent=getUserAgent},940:e=>{e.exports=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if(typeof e!=="function")throw new TypeError("need wrapper function");Object.keys(e).forEach((function(t){wrapper[t]=e[t]}));return wrapper;function wrapper(){var t=new Array(arguments.length);for(var r=0;r{module.exports=eval("require")("encoding")},357:e=>{"use strict";e.exports=require("assert")},614:e=>{"use strict";e.exports=require("events")},747:e=>{"use strict";e.exports=require("fs")},605:e=>{"use strict";e.exports=require("http")},211:e=>{"use strict";e.exports=require("https")},631:e=>{"use strict";e.exports=require("net")},87:e=>{"use strict";e.exports=require("os")},622:e=>{"use strict";e.exports=require("path")},413:e=>{"use strict";e.exports=require("stream")},16:e=>{"use strict";e.exports=require("tls")},835:e=>{"use strict";e.exports=require("url")},669:e=>{"use strict";e.exports=require("util")},761:e=>{"use strict";e.exports=require("zlib")}};var __webpack_module_cache__={};function __nccwpck_require__(e){var t=__webpack_module_cache__[e];if(t!==undefined){return t.exports}var r=__webpack_module_cache__[e]={exports:{}};var o=true;try{__webpack_modules__[e].call(r.exports,r,r.exports,__nccwpck_require__);o=false}finally{if(o)delete __webpack_module_cache__[e]}return r.exports}(()=>{__nccwpck_require__.n=e=>{var t=e&&e.__esModule?()=>e["default"]:()=>e;__nccwpck_require__.d(t,{a:t});return t}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var r in t){if(__nccwpck_require__.o(t,r)&&!__nccwpck_require__.o(e,r)){Object.defineProperty(e,r,{enumerable:true,get:t[r]})}}}})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var __webpack_exports__={};(()=>{"use strict";__nccwpck_require__.r(__webpack_exports__);var e=__nccwpck_require__(186);var t=__nccwpck_require__(747);var r=__nccwpck_require__.n(t);var o=__nccwpck_require__(438); +/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */ +function isNothing(e){return typeof e==="undefined"||e===null}function isObject(e){return typeof e==="object"&&e!==null}function toArray(e){if(Array.isArray(e))return e;else if(isNothing(e))return[];return[e]}function extend(e,t){var r,o,s,n;if(t){n=Object.keys(t);for(r=0,o=n.length;ra){n=" ... ";t=o-a+n.length}if(r-o>a){i=" ...";r=o+a-i.length}return{str:n+e.slice(t,r).replace(/\t/g,"→")+i,pos:o-t+n.length}}function padStart(e,t){return l.repeat(" ",t-e.length)+e}function makeSnippet(e,t){t=Object.create(t||null);if(!e.buffer)return null;if(!t.maxLength)t.maxLength=79;if(typeof t.indent!=="number")t.indent=1;if(typeof t.linesBefore!=="number")t.linesBefore=3;if(typeof t.linesAfter!=="number")t.linesAfter=2;var r=/\r?\n|\r|\0/g;var o=[0];var s=[];var n;var i=-1;while(n=r.exec(e.buffer)){s.push(n.index);o.push(n.index+n[0].length);if(e.position<=n.index&&i<0){i=o.length-2}}if(i<0)i=o.length-1;var a="",c,u;var p=Math.min(e.line+t.linesAfter,s.length).toString().length;var d=t.maxLength-(t.indent+p+3);for(c=1;c<=t.linesBefore;c++){if(i-c<0)break;u=getLine(e.buffer,o[i-c],s[i-c],e.position-(o[i]-o[i-c]),d);a=l.repeat(" ",t.indent)+padStart((e.line-c+1).toString(),p)+" | "+u.str+"\n"+a}u=getLine(e.buffer,o[i],s[i],e.position,d);a+=l.repeat(" ",t.indent)+padStart((e.line+1).toString(),p)+" | "+u.str+"\n";a+=l.repeat("-",t.indent+p+3+u.pos)+"^"+"\n";for(c=1;c<=t.linesAfter;c++){if(i+c>=s.length)break;u=getLine(e.buffer,o[i+c],s[i+c],e.position-(o[i]-o[i+c]),d);a+=l.repeat(" ",t.indent)+padStart((e.line+c+1).toString(),p)+" | "+u.str+"\n"}return a.replace(/\n$/,"")}var d=makeSnippet;var m=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"];var g=["scalar","sequence","mapping"];function compileStyleAliases(e){var t={};if(e!==null){Object.keys(e).forEach((function(r){e[r].forEach((function(e){t[String(e)]=r}))}))}return t}function Type$1(e,t){t=t||{};Object.keys(t).forEach((function(t){if(m.indexOf(t)===-1){throw new p('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}}));this.options=t;this.tag=e;this.kind=t["kind"]||null;this.resolve=t["resolve"]||function(){return true};this.construct=t["construct"]||function(e){return e};this.instanceOf=t["instanceOf"]||null;this.predicate=t["predicate"]||null;this.represent=t["represent"]||null;this.representName=t["representName"]||null;this.defaultStyle=t["defaultStyle"]||null;this.multi=t["multi"]||false;this.styleAliases=compileStyleAliases(t["styleAliases"]||null);if(g.indexOf(this.kind)===-1){throw new p('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}}var h=Type$1;function compileList(e,t){var r=[];e[t].forEach((function(e){var t=r.length;r.forEach((function(r,o){if(r.tag===e.tag&&r.kind===e.kind&&r.multi===e.multi){t=o}}));r[t]=e}));return r}function compileMap(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,r;function collectType(t){if(t.multi){e.multi[t.kind].push(t);e.multi["fallback"].push(t)}else{e[t.kind][t.tag]=e["fallback"][t.tag]=t}}for(t=0,r=arguments.length;t=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}});var O=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?"+"|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?"+"|[-+]?\\.(?:inf|Inf|INF)"+"|\\.(?:nan|NaN|NAN))$");function resolveYamlFloat(e){if(e===null)return false;if(!O.test(e)||e[e.length-1]==="_"){return false}return true}function constructYamlFloat(e){var t,r;t=e.replace(/_/g,"").toLowerCase();r=t[0]==="-"?-1:1;if("+-".indexOf(t[0])>=0){t=t.slice(1)}if(t===".inf"){return r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY}else if(t===".nan"){return NaN}return r*parseFloat(t,10)}var S=/^[-+]?[0-9]+e/;function representYamlFloat(e,t){var r;if(isNaN(e)){switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}}else if(Number.POSITIVE_INFINITY===e){switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}}else if(Number.NEGATIVE_INFINITY===e){switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}}else if(l.isNegativeZero(e)){return"-0.0"}r=e.toString(10);return S.test(r)?r.replace("e",".e"):r}function isFloat(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||l.isNegativeZero(e))}var A=new h("tag:yaml.org,2002:float",{kind:"scalar",resolve:resolveYamlFloat,construct:constructYamlFloat,predicate:isFloat,represent:representYamlFloat,defaultStyle:"lowercase"});var G=y.extend({implicit:[v,_,k,A]});var P=G;var C=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9])"+"-([0-9][0-9])$");var R=new RegExp("^([0-9][0-9][0-9][0-9])"+"-([0-9][0-9]?)"+"-([0-9][0-9]?)"+"(?:[Tt]|[ \\t]+)"+"([0-9][0-9]?)"+":([0-9][0-9])"+":([0-9][0-9])"+"(?:\\.([0-9]*))?"+"(?:[ \\t]*(Z|([-+])([0-9][0-9]?)"+"(?::([0-9][0-9]))?))?$");function resolveYamlTimestamp(e){if(e===null)return false;if(C.exec(e)!==null)return true;if(R.exec(e)!==null)return true;return false}function constructYamlTimestamp(e){var t,r,o,s,n,i,a,c=0,u=null,l,p,d;t=C.exec(e);if(t===null)t=R.exec(e);if(t===null)throw new Error("Date resolve error");r=+t[1];o=+t[2]-1;s=+t[3];if(!t[4]){return new Date(Date.UTC(r,o,s))}n=+t[4];i=+t[5];a=+t[6];if(t[7]){c=t[7].slice(0,3);while(c.length<3){c+="0"}c=+c}if(t[9]){l=+t[10];p=+(t[11]||0);u=(l*60+p)*6e4;if(t[9]==="-")u=-u}d=new Date(Date.UTC(r,o,s,n,i,a,c));if(u)d.setTime(d.getTime()-u);return d}function representYamlTimestamp(e){return e.toISOString()}var j=new h("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:resolveYamlTimestamp,construct:constructYamlTimestamp,instanceOf:Date,represent:representYamlTimestamp});function resolveYamlMerge(e){return e==="<<"||e===null}var x=new h("tag:yaml.org,2002:merge",{kind:"scalar",resolve:resolveYamlMerge});var F="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function resolveYamlBinary(e){if(e===null)return false;var t,r,o=0,s=e.length,n=F;for(r=0;r64)continue;if(t<0)return false;o+=6}return o%8===0}function constructYamlBinary(e){var t,r,o=e.replace(/[\r\n=]/g,""),s=o.length,n=F,i=0,a=[];for(t=0;t>16&255);a.push(i>>8&255);a.push(i&255)}i=i<<6|n.indexOf(o.charAt(t))}r=s%4*6;if(r===0){a.push(i>>16&255);a.push(i>>8&255);a.push(i&255)}else if(r===18){a.push(i>>10&255);a.push(i>>2&255)}else if(r===12){a.push(i>>4&255)}return new Uint8Array(a)}function representYamlBinary(e){var t="",r=0,o,s,n=e.length,i=F;for(o=0;o>18&63];t+=i[r>>12&63];t+=i[r>>6&63];t+=i[r&63]}r=(r<<8)+e[o]}s=n%3;if(s===0){t+=i[r>>18&63];t+=i[r>>12&63];t+=i[r>>6&63];t+=i[r&63]}else if(s===2){t+=i[r>>10&63];t+=i[r>>4&63];t+=i[r<<2&63];t+=i[64]}else if(s===1){t+=i[r>>2&63];t+=i[r<<4&63];t+=i[64];t+=i[64]}return t}function isBinary(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var U=new h("tag:yaml.org,2002:binary",{kind:"scalar",resolve:resolveYamlBinary,construct:constructYamlBinary,predicate:isBinary,represent:representYamlBinary});var L=Object.prototype.hasOwnProperty;var I=Object.prototype.toString;function resolveYamlOmap(e){if(e===null)return true;var t=[],r,o,s,n,i,a=e;for(r=0,o=a.length;r>10)+55296,(e-65536&1023)+56320)}var oe=new Array(256);var se=new Array(256);for(var ne=0;ne<256;ne++){oe[ne]=simpleEscapeSequence(ne)?1:0;se[ne]=simpleEscapeSequence(ne)}function State$1(e,t){this.input=e;this.filename=t["filename"]||null;this.schema=t["schema"]||$;this.onWarning=t["onWarning"]||null;this.legacy=t["legacy"]||false;this.json=t["json"]||false;this.listener=t["listener"]||null;this.implicitTypes=this.schema.compiledImplicit;this.typeMap=this.schema.compiledTypeMap;this.length=e.length;this.position=0;this.line=0;this.lineStart=0;this.lineIndent=0;this.firstTabInLine=-1;this.documents=[]}function generateError(e,t){var r={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};r.snippet=d(r);return new p(t,r)}function throwError(e,t){throw generateError(e,t)}function throwWarning(e,t){if(e.onWarning){e.onWarning.call(null,generateError(e,t))}}var ie={YAML:function handleYamlDirective(e,t,r){var o,s,n;if(e.version!==null){throwError(e,"duplication of %YAML directive")}if(r.length!==1){throwError(e,"YAML directive accepts exactly one argument")}o=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);if(o===null){throwError(e,"ill-formed argument of the YAML directive")}s=parseInt(o[1],10);n=parseInt(o[2],10);if(s!==1){throwError(e,"unacceptable YAML version of the document")}e.version=r[0];e.checkLineBreaks=n<2;if(n!==1&&n!==2){throwWarning(e,"unsupported YAML version of the document")}},TAG:function handleTagDirective(e,t,r){var o,s;if(r.length!==2){throwError(e,"TAG directive accepts exactly two arguments")}o=r[0];s=r[1];if(!te.test(o)){throwError(e,"ill-formed tag handle (first argument) of the TAG directive")}if(M.call(e.tagMap,o)){throwError(e,'there is a previously declared suffix for "'+o+'" tag handle')}if(!re.test(s)){throwError(e,"ill-formed tag prefix (second argument) of the TAG directive")}try{s=decodeURIComponent(s)}catch(t){throwError(e,"tag prefix is malformed: "+s)}e.tagMap[o]=s}};function captureSegment(e,t,r,o){var s,n,i,a;if(t1){e.result+=l.repeat("\n",t-1)}}function readPlainScalar(e,t,r){var o,s,n,i,a,c,u,l,p=e.kind,d=e.result,m;m=e.input.charCodeAt(e.position);if(is_WS_OR_EOL(m)||is_FLOW_INDICATOR(m)||m===35||m===38||m===42||m===33||m===124||m===62||m===39||m===34||m===37||m===64||m===96){return false}if(m===63||m===45){s=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(s)||r&&is_FLOW_INDICATOR(s)){return false}}e.kind="scalar";e.result="";n=i=e.position;a=false;while(m!==0){if(m===58){s=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(s)||r&&is_FLOW_INDICATOR(s)){break}}else if(m===35){o=e.input.charCodeAt(e.position-1);if(is_WS_OR_EOL(o)){break}}else if(e.position===e.lineStart&&testDocumentSeparator(e)||r&&is_FLOW_INDICATOR(m)){break}else if(is_EOL(m)){c=e.line;u=e.lineStart;l=e.lineIndent;skipSeparationSpace(e,false,-1);if(e.lineIndent>=t){a=true;m=e.input.charCodeAt(e.position);continue}else{e.position=i;e.line=c;e.lineStart=u;e.lineIndent=l;break}}if(a){captureSegment(e,n,i,false);writeFoldedLines(e,e.line-c);n=i=e.position;a=false}if(!is_WHITE_SPACE(m)){i=e.position+1}m=e.input.charCodeAt(++e.position)}captureSegment(e,n,i,false);if(e.result){return true}e.kind=p;e.result=d;return false}function readSingleQuotedScalar(e,t){var r,o,s;r=e.input.charCodeAt(e.position);if(r!==39){return false}e.kind="scalar";e.result="";e.position++;o=s=e.position;while((r=e.input.charCodeAt(e.position))!==0){if(r===39){captureSegment(e,o,e.position,true);r=e.input.charCodeAt(++e.position);if(r===39){o=e.position;e.position++;s=e.position}else{return true}}else if(is_EOL(r)){captureSegment(e,o,s,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));o=s=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a single quoted scalar")}else{e.position++;s=e.position}}throwError(e,"unexpected end of the stream within a single quoted scalar")}function readDoubleQuotedScalar(e,t){var r,o,s,n,i,a;a=e.input.charCodeAt(e.position);if(a!==34){return false}e.kind="scalar";e.result="";e.position++;r=o=e.position;while((a=e.input.charCodeAt(e.position))!==0){if(a===34){captureSegment(e,r,e.position,true);e.position++;return true}else if(a===92){captureSegment(e,r,e.position,true);a=e.input.charCodeAt(++e.position);if(is_EOL(a)){skipSeparationSpace(e,false,t)}else if(a<256&&oe[a]){e.result+=se[a];e.position++}else if((i=escapedHexLen(a))>0){s=i;n=0;for(;s>0;s--){a=e.input.charCodeAt(++e.position);if((i=fromHexCode(a))>=0){n=(n<<4)+i}else{throwError(e,"expected hexadecimal character")}}e.result+=charFromCodepoint(n);e.position++}else{throwError(e,"unknown escape sequence")}r=o=e.position}else if(is_EOL(a)){captureSegment(e,r,o,true);writeFoldedLines(e,skipSeparationSpace(e,false,t));r=o=e.position}else if(e.position===e.lineStart&&testDocumentSeparator(e)){throwError(e,"unexpected end of the document within a double quoted scalar")}else{e.position++;o=e.position}}throwError(e,"unexpected end of the stream within a double quoted scalar")}function readFlowCollection(e,t){var r=true,o,s,n,i=e.tag,a,c=e.anchor,u,l,p,d,m,g=Object.create(null),h,w,b,E;E=e.input.charCodeAt(e.position);if(E===91){l=93;m=false;a=[]}else if(E===123){l=125;m=true;a={}}else{return false}if(e.anchor!==null){e.anchorMap[e.anchor]=a}E=e.input.charCodeAt(++e.position);while(E!==0){skipSeparationSpace(e,true,t);E=e.input.charCodeAt(e.position);if(E===l){e.position++;e.tag=i;e.anchor=c;e.kind=m?"mapping":"sequence";e.result=a;return true}else if(!r){throwError(e,"missed comma between flow collection entries")}else if(E===44){throwError(e,"expected the node content, but found ','")}w=h=b=null;p=d=false;if(E===63){u=e.input.charCodeAt(e.position+1);if(is_WS_OR_EOL(u)){p=d=true;e.position++;skipSeparationSpace(e,true,t)}}o=e.line;s=e.lineStart;n=e.position;composeNode(e,t,W,false,true);w=e.tag;h=e.result;skipSeparationSpace(e,true,t);E=e.input.charCodeAt(e.position);if((d||e.line===o)&&E===58){p=true;E=e.input.charCodeAt(++e.position);skipSeparationSpace(e,true,t);composeNode(e,t,W,false,true);b=e.result}if(m){storeMappingPair(e,a,g,w,h,b,o,s,n)}else if(p){a.push(storeMappingPair(e,null,g,w,h,b,o,s,n))}else{a.push(h)}skipSeparationSpace(e,true,t);E=e.input.charCodeAt(e.position);if(E===44){r=true;E=e.input.charCodeAt(++e.position)}else{r=false}}throwError(e,"unexpected end of the stream within a flow collection")}function readBlockScalar(e,t){var r,o,s=K,n=false,i=false,a=t,c=0,u=false,p,d;d=e.input.charCodeAt(e.position);if(d===124){o=false}else if(d===62){o=true}else{return false}e.kind="scalar";e.result="";while(d!==0){d=e.input.charCodeAt(++e.position);if(d===43||d===45){if(K===s){s=d===43?Z:J}else{throwError(e,"repeat of a chomping mode identifier")}}else if((p=fromDecimalCode(d))>=0){if(p===0){throwError(e,"bad explicit indentation width of a block scalar; it cannot be less than one")}else if(!i){a=t+p-1;i=true}else{throwError(e,"repeat of an indentation width identifier")}}else{break}}if(is_WHITE_SPACE(d)){do{d=e.input.charCodeAt(++e.position)}while(is_WHITE_SPACE(d));if(d===35){do{d=e.input.charCodeAt(++e.position)}while(!is_EOL(d)&&d!==0)}}while(d!==0){readLineBreak(e);e.lineIndent=0;d=e.input.charCodeAt(e.position);while((!i||e.lineIndenta){a=e.lineIndent}if(is_EOL(d)){c++;continue}if(e.lineIndentt)&&c!==0){throwError(e,"bad indentation of a sequence entry")}else if(e.lineIndentt){if(w){i=e.line;a=e.lineStart;c=e.position}if(composeNode(e,t,V,true,s)){if(w){g=e.result}else{h=e.result}}if(!w){storeMappingPair(e,p,d,m,g,h,i,a,c);m=g=h=null}skipSeparationSpace(e,true,-1);E=e.input.charCodeAt(e.position)}if((e.line===n||e.lineIndent>t)&&E!==0){throwError(e,"bad indentation of a mapping entry")}else if(e.lineIndentt){c=1}else if(e.lineIndent===t){c=0}else if(e.lineIndentt){c=1}else if(e.lineIndent===t){c=0}else if(e.lineIndent tag; it should be "scalar", not "'+e.kind+'"')}for(p=0,d=e.implicitTypes.length;p")}if(e.result!==null&&g.kind!==e.kind){throwError(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+g.kind+'", not "'+e.kind+'"')}if(!g.resolve(e.result,e.tag)){throwError(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}else{e.result=g.construct(e.result,e.tag);if(e.anchor!==null){e.anchorMap[e.anchor]=e.result}}}if(e.listener!==null){e.listener("close",e)}return e.tag!==null||e.anchor!==null||l}function readDocument(e){var t=e.position,r,o,s,n=false,i;e.version=null;e.checkLineBreaks=e.legacy;e.tagMap=Object.create(null);e.anchorMap=Object.create(null);while((i=e.input.charCodeAt(e.position))!==0){skipSeparationSpace(e,true,-1);i=e.input.charCodeAt(e.position);if(e.lineIndent>0||i!==37){break}n=true;i=e.input.charCodeAt(++e.position);r=e.position;while(i!==0&&!is_WS_OR_EOL(i)){i=e.input.charCodeAt(++e.position)}o=e.input.slice(r,e.position);s=[];if(o.length<1){throwError(e,"directive name must not be less than one character in length")}while(i!==0){while(is_WHITE_SPACE(i)){i=e.input.charCodeAt(++e.position)}if(i===35){do{i=e.input.charCodeAt(++e.position)}while(i!==0&&!is_EOL(i));break}if(is_EOL(i))break;r=e.position;while(i!==0&&!is_WS_OR_EOL(i)){i=e.input.charCodeAt(++e.position)}s.push(e.input.slice(r,e.position))}if(i!==0)readLineBreak(e);if(M.call(ie,o)){ie[o](e,o,s)}else{throwWarning(e,'unknown document directive "'+o+'"')}}skipSeparationSpace(e,true,-1);if(e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45){e.position+=3;skipSeparationSpace(e,true,-1)}else if(n){throwError(e,"directives end mark is expected")}composeNode(e,e.lineIndent-1,V,false,true);skipSeparationSpace(e,true,-1);if(e.checkLineBreaks&&X.test(e.input.slice(t,e.position))){throwWarning(e,"non-ASCII line breaks are interpreted as content")}e.documents.push(e.result);if(e.position===e.lineStart&&testDocumentSeparator(e)){if(e.input.charCodeAt(e.position)===46){e.position+=3;skipSeparationSpace(e,true,-1)}return}if(e.position=55296&&r<=56319&&t+1=56320&&o<=57343){return(r-55296)*1024+o-56320+65536}}return r}function needIndentIndicator(e){var t=/^\n* /;return t.test(e)}var Ne=1,$e=2,Me=3,We=4,ze=5;function chooseScalarStyle(e,t,r,o,s,n,i,a){var c;var u=0;var l=null;var p=false;var d=false;var m=o!==-1;var g=-1;var h=isPlainSafeFirst(codePointAt(e,0))&&isPlainSafeLast(codePointAt(e,e.length-1));if(t||i){for(c=0;c=65536?c+=2:c++){u=codePointAt(e,c);if(!isPrintable(u)){return ze}h=h&&isPlainSafe(u,l,a);l=u}}else{for(c=0;c=65536?c+=2:c++){u=codePointAt(e,c);if(u===me){p=true;if(m){d=d||c-g-1>o&&e[g+1]!==" ";g=c}}else if(!isPrintable(u)){return ze}h=h&&isPlainSafe(u,l,a);l=u}d=d||m&&(c-g-1>o&&e[g+1]!==" ")}if(!p&&!d){if(h&&!i&&!s(e)){return Ne}return n===He?ze:$e}if(r>9&&needIndentIndicator(e)){return ze}if(!i){return d?We:Me}return n===He?ze:$e}function writeScalar(e,t,r,o,s){e.dump=function(){if(t.length===0){return e.quotingType===He?'""':"''"}if(!e.noCompatMode){if(De.indexOf(t)!==-1||qe.test(t)){return e.quotingType===He?'"'+t+'"':"'"+t+"'"}}var n=e.indent*Math.max(1,r);var i=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-n);var a=o||e.flowLevel>-1&&r>=e.flowLevel;function testAmbiguity(t){return testImplicitResolving(e,t)}switch(chooseScalarStyle(t,a,e.indent,i,testAmbiguity,e.quotingType,e.forceQuotes&&!o,s)){case Ne:return t;case $e:return"'"+t.replace(/'/g,"''")+"'";case Me:return"|"+blockHeader(t,e.indent)+dropEndingNewline(indentString(t,n));case We:return">"+blockHeader(t,e.indent)+dropEndingNewline(indentString(foldString(t,i),n));case ze:return'"'+escapeString(t)+'"';default:throw new p("impossible error: invalid scalar style")}}()}function blockHeader(e,t){var r=needIndentIndicator(e)?String(t):"";var o=e[e.length-1]==="\n";var s=o&&(e[e.length-2]==="\n"||e==="\n");var n=s?"+":o?"":"-";return r+n+"\n"}function dropEndingNewline(e){return e[e.length-1]==="\n"?e.slice(0,-1):e}function foldString(e,t){var r=/(\n+)([^\n]*)/g;var o=function(){var o=e.indexOf("\n");o=o!==-1?o:e.length;r.lastIndex=o;return foldLine(e.slice(0,o),t)}();var s=e[0]==="\n"||e[0]===" ";var n;var i;while(i=r.exec(e)){var a=i[1],c=i[2];n=c[0]===" ";o+=a+(!s&&!n&&c!==""?"\n":"")+foldLine(c,t);s=n}return o}function foldLine(e,t){if(e===""||e[0]===" ")return e;var r=/ [^ ]/g;var o;var s=0,n,i=0,a=0;var c="";while(o=r.exec(e)){a=o.index;if(a-s>t){n=i>s?i:a;c+="\n"+e.slice(s,n);s=n+1}i=a}c+="\n";if(e.length-s>t&&i>s){c+=e.slice(s,i)+"\n"+e.slice(i+1)}else{c+=e.slice(s)}return c.slice(1)}function escapeString(e){var t="";var r=0;var o;for(var s=0;s=65536?s+=2:s++){r=codePointAt(e,s);o=Ie[r];if(!o&&isPrintable(r)){t+=e[s];if(r>=65536)t+=e[s+1]}else{t+=o||encodeHex(r)}}return t}function writeFlowSequence(e,t,r){var o="",s=e.tag,n,i,a;for(n=0,i=r.length;n1024)l+="? ";l+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" ");if(!writeNode(e,t,u,false,false)){continue}l+=e.dump;o+=l}e.tag=s;e.dump="{"+o+"}"}function writeBlockMapping(e,t,r,o){var s="",n=e.tag,i=Object.keys(r),a,c,u,l,d,m;if(e.sortKeys===true){i.sort()}else if(typeof e.sortKeys==="function"){i.sort(e.sortKeys)}else if(e.sortKeys){throw new p("sortKeys must be a boolean or a function")}for(a=0,c=i.length;a1024;if(d){if(e.dump&&me===e.dump.charCodeAt(0)){m+="?"}else{m+="? "}}m+=e.dump;if(d){m+=generateNextLine(e,t)}if(!writeNode(e,t+1,l,true,d)){continue}if(e.dump&&me===e.dump.charCodeAt(0)){m+=":"}else{m+=": "}m+=e.dump;s+=m}e.tag=n;e.dump=s||"{}"}function detectType(e,t,r){var o,s,n,i,a,c;s=r?e.explicitTypes:e.implicitTypes;for(n=0,i=s.length;n tag resolver accepts not "'+c+'" style')}e.dump=o}return true}}return false}function writeNode(e,t,r,o,s,n,i){e.tag=null;e.dump=r;if(!detectType(e,r,false)){detectType(e,r,true)}var a=le.call(e.dump);var c=o;var u;if(o){o=e.flowLevel<0||e.flowLevel>t}var l=a==="[object Object]"||a==="[object Array]",d,m;if(l){d=e.duplicates.indexOf(r);m=d!==-1}if(e.tag!==null&&e.tag!=="?"||m||e.indent!==2&&t>0){s=false}if(m&&e.usedDuplicates[d]){e.dump="*ref_"+d}else{if(l&&m&&!e.usedDuplicates[d]){e.usedDuplicates[d]=true}if(a==="[object Object]"){if(o&&Object.keys(e.dump).length!==0){writeBlockMapping(e,t,e.dump,s);if(m){e.dump="&ref_"+d+e.dump}}else{writeFlowMapping(e,t,e.dump);if(m){e.dump="&ref_"+d+" "+e.dump}}}else if(a==="[object Array]"){if(o&&e.dump.length!==0){if(e.noArrayIndent&&!i&&t>0){writeBlockSequence(e,t-1,e.dump,s)}else{writeBlockSequence(e,t,e.dump,s)}if(m){e.dump="&ref_"+d+e.dump}}else{writeFlowSequence(e,t,e.dump);if(m){e.dump="&ref_"+d+" "+e.dump}}}else if(a==="[object String]"){if(e.tag!=="?"){writeScalar(e,e.dump,t,n,c)}}else if(a==="[object Undefined]"){return false}else{if(e.skipInvalid)return false;throw new p("unacceptable kind of an object to dump "+a)}if(e.tag!==null&&e.tag!=="?"){u=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21");if(e.tag[0]==="!"){u="!"+u}else if(u.slice(0,18)==="tag:yaml.org,2002:"){u="!!"+u.slice(18)}else{u="!<"+u+">"}e.dump=u+" "+e.dump}}return true}function getDuplicateReferences(e,t){var r=[],o=[],s,n;inspectNode(e,r,o);for(s=0,n=o.length;s":">",'"':""","'":"'","/":"/","`":"`","=":"="};function escapeHtml(e){return String(e).replace(/[&<>"'`=\/]/g,(function fromEntityMap(e){return gt[e]}))}var ht=/\s*/;var wt=/\s+/;var bt=/\s*=/;var Et=/\s*\}/;var Tt=/#|\^|\/|>|\{|&|=|!/;function parseTemplate(e,t){if(!e)return[];var r=false;var o=[];var s=[];var n=[];var i=false;var a=false;var c="";var u=0;function stripSpace(){if(i&&!a){while(n.length)delete s[n.pop()]}else{n=[]}i=false;a=false}var l,p,d;function compileTags(e){if(typeof e==="string")e=e.split(wt,2);if(!dt(e)||e.length!==2)throw new Error("Invalid tags: "+e);l=new RegExp(escapeRegExp(e[0])+"\\s*");p=new RegExp("\\s*"+escapeRegExp(e[1]));d=new RegExp("\\s*"+escapeRegExp("}"+e[1]))}compileTags(t||yt.tags);var m=new Scanner(e);var g,h,w,b,E,T;while(!m.eos()){g=m.pos;w=m.scanUntil(l);if(w){for(var y=0,v=w.length;y"){E=[h,w,g,m.pos,c,u,r]}else{E=[h,w,g,m.pos]}u++;s.push(E);if(h==="#"||h==="^"){o.push(E)}else if(h==="/"){T=o.pop();if(!T)throw new Error('Unopened section "'+w+'" at '+g);if(T[1]!==w)throw new Error('Unclosed section "'+T[1]+'" at '+g)}else if(h==="name"||h==="{"||h==="&"){a=true}else if(h==="="){compileTags(w)}}stripSpace();T=o.pop();if(T)throw new Error('Unclosed section "'+T[1]+'" at '+m.pos);return nestTokens(squashTokens(s))}function squashTokens(e){var t=[];var r,o;for(var s=0,n=e.length;s0?o[o.length-1][4]:t;break;default:r.push(s)}}return t}function Scanner(e){this.string=e;this.tail=e;this.pos=0}Scanner.prototype.eos=function eos(){return this.tail===""};Scanner.prototype.scan=function scan(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var r=t[0];this.tail=this.tail.substring(r.length);this.pos+=r.length;return r};Scanner.prototype.scanUntil=function scanUntil(e){var t=this.tail.search(e),r;switch(t){case-1:r=this.tail;this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,t);this.tail=this.tail.substring(t)}this.pos+=r.length;return r};function Context(e,t){this.view=e;this.cache={".":this.view};this.parent=t}Context.prototype.push=function push(e){return new Context(e,this)};Context.prototype.lookup=function lookup(e){var t=this.cache;var r;if(t.hasOwnProperty(e)){r=t[e]}else{var o=this,s,n,i,a=false;while(o){if(e.indexOf(".")>0){s=o.view;n=e.split(".");i=0;while(s!=null&&i")c=this.renderPartial(i,t,r,s);else if(a==="&")c=this.unescapedValue(i,t);else if(a==="name")c=this.escapedValue(i,t,s);else if(a==="text")c=this.rawValue(i);if(c!==undefined)n+=c}return n};Writer.prototype.renderSection=function renderSection(e,t,r,o,s){var n=this;var i="";var a=t.lookup(e[1]);function subRender(e){return n.render(e,t,r,s)}if(!a)return;if(dt(a)){for(var c=0,u=a.length;c0||!r)){s[n]=o+s[n]}}return s.join("\n")};Writer.prototype.renderPartial=function renderPartial(e,t,r,o){if(!r)return;var s=this.getConfigTags(o);var n=isFunction(r)?r(e[1]):r[e[1]];if(n!=null){var i=e[6];var a=e[5];var c=e[4];var u=n;if(a==0&&c){u=this.indentPartial(n,c,i)}var l=this.parse(u,s);return this.renderTokens(l,t,r,u,o)}};Writer.prototype.unescapedValue=function unescapedValue(e,t){var r=t.lookup(e[1]);if(r!=null)return r};Writer.prototype.escapedValue=function escapedValue(e,t,r){var o=this.getConfigEscape(r)||yt.escape;var s=t.lookup(e[1]);if(s!=null)return typeof s==="number"&&o===yt.escape?String(s):o(s)};Writer.prototype.rawValue=function rawValue(e){return e[1]};Writer.prototype.getConfigTags=function getConfigTags(e){if(dt(e)){return e}else if(e&&typeof e==="object"){return e.tags}else{return undefined}};Writer.prototype.getConfigEscape=function getConfigEscape(e){if(e&&typeof e==="object"&&!dt(e)){return e.escape}else{return undefined}};var yt={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:undefined,escape:undefined,parse:undefined,render:undefined,Scanner:undefined,Context:undefined,Writer:undefined,set templateCache(e){vt.templateCache=e},get templateCache(){return vt.templateCache}};var vt=new Writer;yt.clearCache=function clearCache(){return vt.clearCache()};yt.parse=function parse(e,t){return vt.parse(e,t)};yt.render=function render(e,t,r,o){if(typeof e!=="string"){throw new TypeError('Invalid template! Template should be a "string" '+'but "'+typeStr(e)+'" was given as the first '+"argument for mustache#render(template, view, partials)")}return vt.render(e,t,r,o)};yt.escape=escapeHtml;yt.Scanner=Scanner;yt.Context=Context;yt.Writer=Writer;const _t=yt;const kt={Version:"1.10.0",Name:"actions-label-commenter",Owner:"peaceiris"};function getInputs(){const t={GithubToken:(0,e.getInput)("github_token"),ConfigFilePath:(0,e.getInput)("config_file")};return t}async function closeIssue(e,t){await e.rest.issues.update({owner:o.context.repo.owner,repo:o.context.repo.repo,issue_number:t,state:"closed"});return}async function openIssue(e,t){await e.rest.issues.update({owner:o.context.repo.owner,repo:o.context.repo.repo,issue_number:t,state:"open"});return}async function lockIssue(e,t,r){const s=(()=>{switch(r){case"off-topic":return"off-topic";case"too heated":return"too heated";case"resolved":return"resolved";case"spam":return"spam";default:return"resolved"}})();return await e.rest.issues.lock({owner:o.context.repo.owner,repo:o.context.repo.repo,issue_number:t,lock_reason:s})}async function unlockIssue(e,t){return await e.rest.issues.unlock({owner:o.context.repo.owner,repo:o.context.repo.repo,issue_number:t})}function groupConsoleLog(t,r,o){if(!o)return;(0,e.startGroup)(t);console.log(r);(0,e.endGroup)()}async function run(){var t,s,n,i;try{(0,e.info)(`[INFO] Version ${kt.Version}`);const a=`https://github.com/${kt.Owner}/${kt.Name}#readme`;(0,e.info)(`[INFO] Usage ${a}`);const c=getInputs();groupConsoleLog("Dump GitHub context",o.context,(0,e.isDebug)());const u=o.context.eventName;(0,e.info)(`[INFO] event name: ${u}`);if(u!=="issues"&&u!=="pull_request"&&u!=="pull_request_target"){(0,e.info)(`[INFO] unsupported event: ${u}`);return}const l=o.context.payload;const p=l.action;const d=(()=>{var e,t;if(u==="issues"){return(e=l.label)===null||e===void 0?void 0:e.name}else{return(t=l.label)===null||t===void 0?void 0:t.name}})();const m=(()=>{if(u==="issues"){return l.issue.number}else{return l.number}})();(0,e.info)(`[INFO] config file path: ${c.ConfigFilePath}\n[INFO] label name: ${d}\n[INFO] label event: ${p}\n[INFO] issue number: ${m} `);const g=c.ConfigFilePath;if(!r().existsSync(g)){throw new Error(`not found ${g}`)}const h=lt.load(r().readFileSync(g,"utf8"));if((0,e.isDebug)()){(0,e.startGroup)("Dump config");console.log(h);(0,e.endGroup)()}let w=false;let b="";Object.keys(h.labels).forEach((e=>{if(h.labels[e].name===d){w=true;if(b===""){b=e}}}));if(!w){(0,e.info)(`[INFO] no configuration labels.${d}`);return}if(h.labels[b][`${p}`]===void 0){(0,e.info)(`[INFO] no configuration labels.${d}.${p}`);return}if(h.labels[b][`${p}`].issue===void 0&&h.labels[b][`${p}`].pr===void 0){throw new Error(`not found any definition labels.${d}.${p}`)}let E="";if(u==="issues"){E="issue";if(h.labels[b][`${p}`].issue===void 0){(0,e.info)(`[INFO] no configuration labels.${d}.${p}.${E}`);return}}else if(u==="pull_request"||u==="pull_request_target"){E="pr";if(h.labels[b][`${p}`].pr===void 0){(0,e.info)(`[INFO] no configuration labels.${d}.${p}.${E}`);return}}const T=`labels.${d}.${p}.${E}`;const y=`${process.env["GITHUB_SERVER_URL"]}/${process.env["GITHUB_REPOSITORY"]}/actions/runs/${process.env["GITHUB_RUN_ID"]}`;const v=h.labels[b][`${p}`][`${E}`].body;const _=(s=(t=h.comment)===null||t===void 0?void 0:t.header)!==null&&s!==void 0?s:"";const k=(i=(n=h.comment)===null||n===void 0?void 0:n.footer)!==null&&i!==void 0?i:"";const O=`
`+`Log`+` | `+`Bot Usage`+`
\n`+`\n\x3c!-- ${kt.Owner}/${kt.Name} --\x3e\n`;const S=(()=>{if((0,e.isDebug)()){return`${_}\n\n${v}\n\n${k}\n\n${O}`}return`${_}\n\n${v}\n\n${k}`})();if(v===""||v===void 0){(0,e.info)(`[INFO] no configuration ${T}.body`)}else{groupConsoleLog("commentMain",v,(0,e.isDebug)());groupConsoleLog("commentHeader",_,(0,e.isDebug)());groupConsoleLog("commentFooter",k,(0,e.isDebug)());groupConsoleLog("commentFooterLinks",O,(0,e.isDebug)());groupConsoleLog("rawCommentBody",S,(0,e.isDebug)())}const A=(()=>{if(u==="issues"){return{issue:{user:{login:l.issue.user.login}},sender:{login:l.sender.login}}}else if(u==="pull_request"||u==="pull_request_target"){return{pull_request:{user:{login:l.pull_request.user.login}},sender:{login:l.sender.login}}}else{return{}}})();const G=_t.render(S,A);groupConsoleLog("commentBodyRendered",G,(0,e.isDebug)());const P=c.GithubToken;const C=(0,o.getOctokit)(P);const R=h.labels[b][`${p}`][`${E}`].locking;if(R==="lock"||R==="unlock"){(0,e.info)(`[INFO] ${T}.locking is ${R}`)}else if(R===""||R===void 0){(0,e.info)(`[INFO] no configuration ${T}.locking`)}else{throw new Error(`invalid value "${R}" ${T}.locking`)}if(R==="unlock"){const t=await unlockIssue(C,m);groupConsoleLog("Unlock issue",t,(0,e.isDebug)())}const j=(()=>{if(R==="unlock"){return false}else if(u==="issues"){return l.issue.locked}else{return l.pull_request.locked}})();if(!j){const t=await C.rest.issues.createComment({issue_number:o.context.issue.number,owner:o.context.repo.owner,repo:o.context.repo.repo,body:G});groupConsoleLog("issuesCreateCommentResponse",t,(0,e.isDebug)());(0,e.info)(`[INFO] comment URL: ${t.data.html_url}`)}const x=h.labels[b][`${p}`][`${E}`].action;if(x==="close"){await closeIssue(C,m)}else if(x==="open"){await openIssue(C,m)}else if(x===""||x===void 0){(0,e.info)(`[INFO] no configuration ${T}.action`)}else{throw new Error(`invalid value "${x}" ${T}.action`)}if(R==="lock"){const t=h.labels[b][`${p}`][`${E}`].lock_reason;const r=await lockIssue(C,m,t);groupConsoleLog("Lock issue",r,(0,e.isDebug)())}return}catch(e){throw new Error(`${e.message}`)}}(async()=>{try{await run()}catch(t){(0,e.setFailed)(`Action failed with error "${t.message}"`)}})()})();module.exports=__webpack_exports__})(); \ No newline at end of file diff --git a/src/constants.ts b/src/constants.ts index f459f4dd..163bcad2 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,5 +1,5 @@ const ActionInfo = { - Version: '1.9.2', + Version: '1.10.0', Name: 'actions-label-commenter', Owner: 'peaceiris' } as const;