From cd9cfa8740bf720624f25d07f95840071770f25f Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Wed, 26 Aug 2020 10:41:14 -0300 Subject: [PATCH] Add flag to allow organization members The new `allowOrganizationMembers` flag will automatically allow all users in the same organization as the repository. It will be as though all organization members are on the `whitelist`. If this is enabled for a repository not in an organization, an error will be thrown. This input parameter defaults to `false`. Tests and documentation have been updated. Fixes #4 --- README.md | 1 + __tests__/claRunner.test.ts | 65 +++++++++++++++++++++++++++++++++-- __tests__/inputHelper.test.ts | 1 + action.yml | 3 ++ lib/index.js | 2 +- src/claRunner.ts | 31 ++++++++++++----- src/inputHelper.ts | 1 + src/inputSettings.ts | 5 +++ 8 files changed, 98 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index f3ba4485..410f0153 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,7 @@ The CLA Signature Bot has the option to additionally store the signatures on the | `path-to-signatures` | _optional_ | Path to the signature file in the repository. Default is `./signatures/cla.json`. | | `branch` | _optional_ | Repository branch to store the signature file. Default is `master` | | `whitelist` | _optional_ | Comma-separated list of accounts to [ignore](https://github.com/roblox/cla-assistant#Whitelist-Accounts). Example: `user1,user2,bot*` | +| `allow-organization-members` | _optional_ | Automatically allows any users in the same organization as the repository. Default is `false`. | | `blockchain-storage-flag` | _optional_ | Whether to store the Contributor's signature data in the Ethereum blockchain. May be `true` or `false`. Default is `false`. | | `blockchain-webhook-endpoint` | _optional_ | The URL to post the blockchain request to. Can be used when running your own [blockchain-services](https://github.com/cla-assistant/blockchain-services) docker container. | | `use-remote-repo` | _optional_ | Whether to use an alternate repository for storing the signature file than the one running the workflow. If `true` the remote repo name and PAT must be provided. Default is `false`. | diff --git a/__tests__/claRunner.test.ts b/__tests__/claRunner.test.ts index 0c3b885f..1d0a98d6 100644 --- a/__tests__/claRunner.test.ts +++ b/__tests__/claRunner.test.ts @@ -90,6 +90,31 @@ function getPullCheckRunnerMock(settings: IInputSettings): [PullCheckRunner, any return [pullCheckRunner, rerunLastCheckSpy]; } +function getMockOrganizationMembers(logins: Array) { + return logins.map(login => { + return { + login, + id: 1, + node_id: '', + avatar_url: '', + gravatar_id: '', + url: '', + html_url: '', + followers_url: '', + following_url: '', + gists_url: '', + starred_url: '', + subscriptions_url: '', + organizations_url: '', + repos_url: '', + events_url: '', + received_events_url: '', + type: 'User', + site_admin: false + } + }) +} + afterEach(() => { jest.resetAllMocks(); }); @@ -115,7 +140,8 @@ it("Successfully constructs with full or empty settings", () => { remoteRepositoryOwner: "owner", signatureRegex: /.*/, signatureText: "signature", - whitelist: "" + whitelist: "", + allowOrganizationMembers: false } as IInputSettings; const runner = new ClaRunner({inputSettings: fullSettings}); @@ -154,7 +180,42 @@ it('Locks the PR when the PR is closed', async () => { expect(lockCommentSpy).toHaveBeenCalledTimes(1); }); -it('Returns early if there are no authors', async () => { +it("Returns early if all authors are organization members and 'allowOrganizationMembers' is enabled", async () => { + const listMembersSpy = jest.spyOn(mockGitHub.orgs, 'listMembers') + .mockImplementation(async (params) => ({ + url: "", + data: getMockOrganizationMembers(['SomeDude', 'SomeDudette', 'SomeEnby']), + status: 200, + headers: { + date: "", + "x-Octokit-media-type": "", + "x-Octokit-request-id": "", + "x-ratelimit-limit": "", + "x-ratelimit-remaining": "", + "x-ratelimit-reset": "", + link: "", + "last-modified": "", + etag: "", + status: "200", + }, + [Symbol.iterator]: () => ({next: () => { return { value: null, done: true}}}), + })); + const settings = getSettings(); + settings.allowOrganizationMembers = true + + const [authors, getAuthorsSpy] = getPullAuthorsMock(settings); + + const runner = new ClaRunner({ + inputSettings: settings, + pullAuthors: authors + }); + const result = await runner.execute(); + + expect(result).toStrictEqual(true); + expect(getAuthorsSpy).toHaveBeenCalledTimes(1); +}); + +it('Returns early if all authors are on whitelist', async () => { const settings = getSettings(); const whitelist = new Whitelist("SomeDude,SomeDudette,SomeEnby"); diff --git a/__tests__/inputHelper.test.ts b/__tests__/inputHelper.test.ts index 01eaf225..024939cf 100644 --- a/__tests__/inputHelper.test.ts +++ b/__tests__/inputHelper.test.ts @@ -67,6 +67,7 @@ it('sets defaults', () => { expect(settings.repositoryAccessToken).toBe(settings.localAccessToken); expect(settings.claFilePath).toBeTruthy(); expect(settings.whitelist).toBeFalsy(); + expect(settings.allowOrganizationMembers).toBeFalsy(); expect(settings.emptyCommitFlag).toBe(false); expect(settings.octokitRemote).toBeTruthy(); diff --git a/action.yml b/action.yml index 4761e196..8632237c 100644 --- a/action.yml +++ b/action.yml @@ -32,6 +32,9 @@ inputs: whitelist: description: "Comma-separated list of users to exclude from CLA requirement. Can use * characters for wildcards." default: "" + allow-organization-members: + description: "(Optional) Automatically allows any users in the same organization as the repository" + default: false signature-text: description: "The text to require as a signature." signature-regex: diff --git a/lib/index.js b/lib/index.js index bc5939e7..545d0452 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1 +1 @@ -module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var o=r[t]={i:t,l:false,exports:{}};e[t].call(o.exports,o,o.exports,__webpack_require__);o.l=true;return o.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(131)}return startup()}({2:function(e,t,r){"use strict";const o=r(87);const s=r(118);const n=r(49);const i=(e,t)=>{if(!e&&t){throw new Error("You can't specify a `release` without specifying `platform`")}e=e||o.platform();let r;if(e==="darwin"){if(!t&&o.platform()==="darwin"){t=o.release()}const e=t?Number(t.split(".")[0])>15?"macOS":"OS X":"macOS";r=t?s(t).name:"";return e+(r?" "+r:"")}if(e==="linux"){if(!t&&o.platform()==="linux"){t=o.release()}r=t?t.replace(/^(\d+\.\d+).*/,"$1"):"";return"Linux"+(r?" "+r:"")}if(e==="win32"){if(!t&&o.platform()==="win32"){t=o.release()}r=t?n(t):"";return"Windows"+(r?" "+r:"")}return e};e.exports=i},9:function(e,t,r){var o=r(969);var s=function(){};var n=function(e){return e.setHeader&&typeof e.abort==="function"};var i=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var a=function(e,t,r){if(typeof t==="function")return a(e,null,t);if(!t)t={};r=o(r||s);var c=e._writableState;var u=e._readableState;var l=t.readable||t.readable!==false&&e.readable;var p=t.writable||t.writable!==false&&e.writable;var d=false;var f=function(){if(!e.writable)m()};var m=function(){p=false;if(!l)r.call(e)};var h=function(){l=false;if(!p)r.call(e)};var g=function(t){r.call(e,t?new Error("exited with error code: "+t):null)};var w=function(t){r.call(e,t)};var y=function(){process.nextTick(b)};var b=function(){if(d)return;if(l&&!(u&&(u.ended&&!u.destroyed)))return r.call(e,new Error("premature close"));if(p&&!(c&&(c.ended&&!c.destroyed)))return r.call(e,new Error("premature close"))};var v=function(){e.req.on("finish",m)};if(n(e)){e.on("complete",m);e.on("abort",y);if(e.req)v();else e.on("request",v)}else if(p&&!c){e.on("end",f);e.on("close",f)}if(i(e))e.on("exit",g);e.on("end",h);e.on("finish",m);if(t.error!==false)e.on("error",w);e.on("close",y);return function(){d=true;e.removeListener("complete",m);e.removeListener("abort",y);e.removeListener("request",v);if(e.req)e.req.removeListener("finish",m);e.removeListener("end",f);e.removeListener("close",f);e.removeListener("finish",m);e.removeListener("exit",g);e.removeListener("end",h);e.removeListener("error",w);e.removeListener("close",y)}};e.exports=a},11:function(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{e=e||{};const t=e.env||process.env;const r=e.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(t).find(e=>e.toUpperCase()==="PATH")||"Path"})},49:function(e,t,r){"use strict";const o=r(87);const s=r(955);const n=new Map([["10.0","10"],["6.3","8.1"],["6.2","8"],["6.1","7"],["6.0","Vista"],["5.2","Server 2003"],["5.1","XP"],["5.0","2000"],["4.9","ME"],["4.1","98"],["4.0","95"]]);const i=e=>{const t=/\d+\.\d/.exec(e||o.release());if(e&&!t){throw new Error("`release` argument doesn't match `n.n`")}const r=(t||[])[0];if((!e||e===o.release())&&["6.1","6.2","6.3","10.0"].includes(r)){let e;try{e=s.sync("powershell",["(Get-CimInstance -ClassName Win32_OperatingSystem).caption"]).stdout||""}catch(t){e=s.sync("wmic",["os","get","Caption"]).stdout||""}const t=(e.match(/2008|2012|2016|2019/)||[])[0];if(t){return`Server ${t}`}}return n.get(r)};e.exports=i},71:function(e,t,r){"use strict";var o=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.PullAuthors=void 0;const s=r(89);class PullAuthors{constructor(e){this.getCommitAuthorsQuery=`\nquery($owner:String! $name:String! $number:Int! $cursor:String!){\n repository(owner: $owner, name: $name) {\n pullRequest(number: $number) {\n commits(first: 100, after: $cursor) {\n totalCount\n edges {\n node {\n commit {\n author {\n email\n name\n user {\n id\n databaseId\n login\n }\n }\n committer {\n name\n user {\n id\n databaseId\n login\n }\n }\n }\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}`.replace(/ /g,"");this.settings=e}getAuthors(){return o(this,void 0,void 0,function*(){const e=yield this.queryForCommitAuthors();return e.repository.pullRequest.commits.edges.map(e=>this.getUserFromCommit(e.node.commit)).filter((e,t,r)=>r.findIndex(t=>t.name===e.name)===t).filter(e=>e.id!==41898282)})}queryForCommitAuthors(){return o(this,void 0,void 0,function*(){try{const e=yield this.settings.octokitLocal.graphql(this.getCommitAuthorsQuery,{owner:this.settings.localRepositoryOwner,name:this.settings.localRepositoryName,number:this.settings.pullRequestNumber,cursor:""});if(e.repository.pullRequest.commits.totalCount>100){throw new Error("Commit query has more than 100 commits and GraphQL pagination isn't supported yet! Can't validate all of the authors of this PR.")}return e}catch(e){throw new Error(`GraphQL query to get commit authors failed: '${e.message}'. Details: ${JSON.stringify(e)} `)}})}getUserFromCommit(e){const t=(e.author||{}).user||(e.committer||{}).user||e.author||e.committer;return new s.Author({name:t.login||t.name,id:t.databaseId||undefined,pullRequestNo:this.settings.pullRequestNumber,signed:false})}}t.PullAuthors=PullAuthors},87:function(e){e.exports=require("os")},89:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Author=t.AuthorMap=void 0;class AuthorMap{constructor(e){this._authors=e}getSigned(){return this._authors.filter(e=>e.signed)}getUnsigned(){return this._authors.filter(e=>!e.signed)}getNonGithubAccounts(){return this._authors.filter(e=>!e.id)}allSigned(){return this._authors.every(e=>e.signed)}get count(){return this._authors.length}}t.AuthorMap=AuthorMap;class Author{constructor({name:e,id:t,pullRequestNo:r,signed:o}){this.name=e;this.id=t;this.pullRequestNo=r;this.signed=o}}t.Author=Author},118:function(e,t,r){"use strict";const o=r(87);const s=new Map([[19,"Catalina"],[18,"Mojave"],[17,"High Sierra"],[16,"Sierra"],[15,"El Capitan"],[14,"Yosemite"],[13,"Mavericks"],[12,"Mountain Lion"],[11,"Lion"],[10,"Snow Leopard"],[9,"Leopard"],[8,"Tiger"],[7,"Panther"],[6,"Jaguar"],[5,"Puma"]]);const n=e=>{e=Number((e||o.release()).split(".")[0]);return{name:s.get(e),version:"10."+(e-4)}};e.exports=n;e.exports.default=n},122: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())})};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.BlockchainPoster=void 0;const c=n(r(470));const u=a(r(454));class BlockchainPoster{constructor(e){this.settings=e}postToBlockchain(e){return i(this,void 0,void 0,function*(){if(!this.settings.blockchainStorageFlag){return}c.debug("Posting signature event to blockchain.");try{const t={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)};c.debug(`Webhook contents: ${JSON.stringify(t)}`);const r=yield u.default(this.settings.blockchainWebhookEndpoint,t);const o=yield r.json();c.debug("the response of the webhook is "+JSON.stringify(o));if(o.success){c.debug("the response2 of the webhook is "+JSON.stringify(o));return o}}catch(e){c.error("The webhook post request for storing signatures in smart contract failed"+e)}})}}t.BlockchainPoster=BlockchainPoster},127: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(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(539));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},129:function(e){e.exports=require("child_process")},131: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.run=void 0;const a=n(r(470));const c=r(207);const u=n(r(973));function run(){return i(this,void 0,void 0,function*(){try{const e=new c.ClaRunner({inputSettings:u.getInputs()});a.info("Starting CLA Assistant GitHub Action");yield e.execute();a.info("CLA processing complete.")}catch(e){a.setFailed(`Error: "${e.message}" Details: "${JSON.stringify(e)}"`)}})}t.run=run;run()},141:function(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{const c=e=>{if(e){e.bufferedData=n.getBufferedValue()}a(e)};n=o(e,s(t),e=>{if(e){c(e);return}i()});n.on("data",()=>{if(n.getBufferedLength()>r){c(new MaxBufferError)}})}).then(()=>n.getBufferedValue())}e.exports=getStream;e.exports.buffer=((e,t)=>getStream(e,Object.assign({},t,{encoding:"buffer"})));e.exports.array=((e,t)=>getStream(e,Object.assign({},t,{array:true})));e.exports.MaxBufferError=MaxBufferError},168:function(e){"use strict";const t=["stdin","stdout","stderr"];const r=e=>t.some(t=>Boolean(e[t]));e.exports=(e=>{if(!e){return null}if(e.stdio&&r(e)){throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map(e=>`\`${e}\``).join(", ")}`)}if(typeof e.stdio==="string"){return e.stdio}const o=e.stdio||[];if(!Array.isArray(o)){throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof o}\``)}const s=[];const n=Math.max(o.length,t.length);for(let r=0;r!this.whitelist.isUserWhitelisted(e));if(e.length===0){a.info("No committers left after whitelisting. Approving pull request.");return true}a.debug(`Found a total of ${e.length} authors after whitelisting.`);a.debug(`Authors: ${e.map(e=>e.name).join(", ")}`);const t=yield this.claFileRepository.getClaFile();let r=t.mapSignedAuthors(e);let o=t.addSignature(yield this.pullComments.getNewSignatures(r));if(o.length>0){const s=o.map(e=>e.name).join(", ");a.debug(`Found new signatures: ${s}.`);r=t.mapSignedAuthors(e);yield Promise.all([this.claFileRepository.commitClaFile(`Add ${s}.`),this.blockchainPoster.postToBlockchain(o),this.pullComments.setClaComment(r),this.pullCheckRunner.rerunLastCheck()])}else{yield this.pullComments.setClaComment(r)}if(!r.allSigned()){a.setFailed("Waiting on additional CLA signatures.");return false}return true})}lockPullRequest(){return i(this,void 0,void 0,function*(){a.info(`Locking pull request #${this.settings.pullRequestNumber} to safe guard the pull request's CLA signatures.`);try{yield this.settings.octokitLocal.issues.lock({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName,issue_number:this.settings.pullRequestNumber});a.info(`Successfully locked pull request #${this.settings.pullRequestNumber}.`)}catch(e){a.error(`Failed to lock pull request #${this.settings.pullRequestNumber}.`)}})}}t.ClaRunner=ClaRunner},211:function(e){e.exports=require("https")},260:function(e,t,r){var o=r(357);var s=r(654);var n=/^win/i.test(process.platform);var i=r(614);if(typeof i!=="function"){i=i.EventEmitter}var a;if(process.__signal_exit_emitter__){a=process.__signal_exit_emitter__}else{a=process.__signal_exit_emitter__=new i;a.count=0;a.emitted={}}if(!a.infinite){a.setMaxListeners(Infinity);a.infinite=true}e.exports=function(e,t){o.equal(typeof e,"function","a callback must be provided for exit handler");if(u===false){load()}var r="exit";if(t&&t.alwaysLast){r="afterexit"}var s=function(){a.removeListener(r,e);if(a.listeners("exit").length===0&&a.listeners("afterexit").length===0){unload()}};a.on(r,e);return s};e.exports.unload=unload;function unload(){if(!u){return}u=false;s.forEach(function(e){try{process.removeListener(e,c[e])}catch(e){}});process.emit=p;process.reallyExit=l;a.count-=1}function emit(e,t,r){if(a.emitted[e]){return}a.emitted[e]=true;a.emit(e,t,r)}var c={};s.forEach(function(e){c[e]=function listener(){var t=process.listeners(e);if(t.length===a.count){unload();emit("exit",null,e);emit("afterexit",null,e);if(n&&e==="SIGHUP"){e="SIGINT"}process.kill(process.pid,e)}}});e.exports.signals=function(){return s};e.exports.load=load;var u=false;function load(){if(u){return}u=true;a.count+=1;s=s.filter(function(e){try{process.on(e,c[e]);return true}catch(e){return false}});process.emit=processEmit;process.reallyExit=processReallyExit}var l=process.reallyExit;function processReallyExit(e){process.exitCode=e||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);l.call(process,process.exitCode)}var p=process.emit;function processEmit(e,t){if(e==="exit"){if(t!==undefined){process.exitCode=t}var r=p.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return r}else{return p.apply(this,arguments)}}},262:function(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(){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}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},280:function(e,t){t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var o=256;var s=Number.MAX_SAFE_INTEGER||9007199254740991;var n=16;var i=t.re=[];var a=t.src=[];var c=0;var u=c++;a[u]="0|[1-9]\\d*";var l=c++;a[l]="[0-9]+";var p=c++;a[p]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=c++;a[d]="("+a[u]+")\\."+"("+a[u]+")\\."+"("+a[u]+")";var f=c++;a[f]="("+a[l]+")\\."+"("+a[l]+")\\."+"("+a[l]+")";var m=c++;a[m]="(?:"+a[u]+"|"+a[p]+")";var h=c++;a[h]="(?:"+a[l]+"|"+a[p]+")";var g=c++;a[g]="(?:-("+a[m]+"(?:\\."+a[m]+")*))";var w=c++;a[w]="(?:-?("+a[h]+"(?:\\."+a[h]+")*))";var y=c++;a[y]="[0-9A-Za-z-]+";var b=c++;a[b]="(?:\\+("+a[y]+"(?:\\."+a[y]+")*))";var v=c++;var T="v?"+a[d]+a[g]+"?"+a[b]+"?";a[v]="^"+T+"$";var E="[v=\\s]*"+a[f]+a[w]+"?"+a[b]+"?";var _=c++;a[_]="^"+E+"$";var O=c++;a[O]="((?:<|>)?=?)";var P=c++;a[P]=a[l]+"|x|X|\\*";var S=c++;a[S]=a[u]+"|x|X|\\*";var R=c++;a[R]="[v=\\s]*("+a[S]+")"+"(?:\\.("+a[S]+")"+"(?:\\.("+a[S]+")"+"(?:"+a[g]+")?"+a[b]+"?"+")?)?";var k=c++;a[k]="[v=\\s]*("+a[P]+")"+"(?:\\.("+a[P]+")"+"(?:\\.("+a[P]+")"+"(?:"+a[w]+")?"+a[b]+"?"+")?)?";var C=c++;a[C]="^"+a[O]+"\\s*"+a[R]+"$";var A=c++;a[A]="^"+a[O]+"\\s*"+a[k]+"$";var x=c++;a[x]="(?:^|[^\\d])"+"(\\d{1,"+n+"})"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:$|[^\\d])";var j=c++;a[j]="(?:~>?)";var G=c++;a[G]="(\\s*)"+a[j]+"\\s+";i[G]=new RegExp(a[G],"g");var U="$1~";var q=c++;a[q]="^"+a[j]+a[R]+"$";var F=c++;a[F]="^"+a[j]+a[k]+"$";var D=c++;a[D]="(?:\\^)";var L=c++;a[L]="(\\s*)"+a[D]+"\\s+";i[L]=new RegExp(a[L],"g");var B="$1^";var I=c++;a[I]="^"+a[D]+a[R]+"$";var H=c++;a[H]="^"+a[D]+a[k]+"$";var N=c++;a[N]="^"+a[O]+"\\s*("+E+")$|^$";var $=c++;a[$]="^"+a[O]+"\\s*("+T+")$|^$";var M=c++;a[M]="(\\s*)"+a[O]+"\\s*("+E+"|"+a[R]+")";i[M]=new RegExp(a[M],"g");var V="$1$2$3";var z=c++;a[z]="^\\s*("+a[R]+")"+"\\s+-\\s+"+"("+a[R]+")"+"\\s*$";var W=c++;a[W]="^\\s*("+a[k]+")"+"\\s+-\\s+"+"("+a[k]+")"+"\\s*$";var J=c++;a[J]="(<|>)?=?\\s*\\*";for(var K=0;Ko){return null}var r=t.loose?i[_]:i[v];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>o){throw new TypeError("version is longer than "+o+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var n=e.trim().match(t.loose?i[_]:i[v]);if(!n){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>s||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>s||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>s||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,o){if(typeof r==="string"){o=r;r=undefined}try{return new SemVer(e,r).inc(t,o).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var o=parse(t);var s="";if(r.prerelease.length||o.prerelease.length){s="pre";var n="prerelease"}for(var i in r){if(i==="major"||i==="minor"||i==="patch"){if(r[i]!==o[i]){return s+i}}}return n}}t.compareIdentifiers=compareIdentifiers;var X=/^[0-9]+$/;function compareIdentifiers(e,t){var r=X.test(e);var o=X.test(t);if(r&&o){e=+e;t=+t}return e===t?0:r&&!o?-1:o&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,o){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,o);case"!=":return neq(e,r,o);case">":return gt(e,r,o);case">=":return gte(e,r,o);case"<":return lt(e,r,o);case"<=":return lte(e,r,o);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===Y){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var Y={};Comparator.prototype.parse=function(e){var t=this.options.loose?i[N]:i[$];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1];if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=Y}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===Y){return true}if(typeof e==="string"){e=new SemVer(e,this.options)}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){r=new Range(this.value,t);return satisfies(e.semver,r,t)}var o=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var n=this.semver.version===e.semver.version;var i=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var c=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return o||s||n&&i||a||c};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var o=t?i[W]:i[z];e=e.replace(o,hyphenReplace);r("hyphen replace",e);e=e.replace(i[M],V);r("comparator trim",e,i[M]);e=e.replace(i[G],U);e=e.replace(i[L],B);e=e.split(/\s+/).join(" ");var s=t?i[N]:i[$];var n=e.split(" ").map(function(e){return parseComparator(e,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){n=n.filter(function(e){return!!e.match(s)})}n=n.map(function(e){return new Comparator(e,this.options)},this);return n};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})};t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map(function(e){return replaceTilde(e,t)}).join(" ")}function replaceTilde(e,t){var o=t.loose?i[F]:i[q];return e.replace(o,function(t,o,s,n,i){r("tilde",e,t,o,s,n,i);var a;if(isX(o)){a=""}else if(isX(s)){a=">="+o+".0.0 <"+(+o+1)+".0.0"}else if(isX(n)){a=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"}else if(i){r("replaceTilde pr",i);a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+(+s+1)+".0"}else{a=">="+o+"."+s+"."+n+" <"+o+"."+(+s+1)+".0"}r("tilde return",a);return a})}function replaceCarets(e,t){return e.trim().split(/\s+/).map(function(e){return replaceCaret(e,t)}).join(" ")}function replaceCaret(e,t){r("caret",e,t);var o=t.loose?i[H]:i[I];return e.replace(o,function(t,o,s,n,i){r("caret",e,t,o,s,n,i);var a;if(isX(o)){a=""}else if(isX(s)){a=">="+o+".0.0 <"+(+o+1)+".0.0"}else if(isX(n)){if(o==="0"){a=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"}else{a=">="+o+"."+s+".0 <"+(+o+1)+".0.0"}}else if(i){r("replaceCaret pr",i);if(o==="0"){if(s==="0"){a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+s+"."+(+n+1)}else{a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+(+s+1)+".0"}}else{a=">="+o+"."+s+"."+n+"-"+i+" <"+(+o+1)+".0.0"}}else{r("no pr");if(o==="0"){if(s==="0"){a=">="+o+"."+s+"."+n+" <"+o+"."+s+"."+(+n+1)}else{a=">="+o+"."+s+"."+n+" <"+o+"."+(+s+1)+".0"}}else{a=">="+o+"."+s+"."+n+" <"+(+o+1)+".0.0"}}r("caret return",a);return a})}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map(function(e){return replaceXRange(e,t)}).join(" ")}function replaceXRange(e,t){e=e.trim();var o=t.loose?i[A]:i[C];return e.replace(o,function(t,o,s,n,i,a){r("xRange",e,t,o,s,n,i,a);var c=isX(s);var u=c||isX(n);var l=u||isX(i);var p=l;if(o==="="&&p){o=""}if(c){if(o===">"||o==="<"){t="<0.0.0"}else{t="*"}}else if(o&&p){if(u){n=0}i=0;if(o===">"){o=">=";if(u){s=+s+1;n=0;i=0}else{n=+n+1;i=0}}else if(o==="<="){o="<";if(u){s=+s+1}else{n=+n+1}}t=o+s+"."+n+"."+i}else if(u){t=">="+s+".0.0 <"+(+s+1)+".0.0"}else if(l){t=">="+s+"."+n+".0 <"+s+"."+(+n+1)+".0"}r("xRange return",t);return t})}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(i[J],"")}function hyphenReplace(e,t,r,o,s,n,i,a,c,u,l,p,d){if(isX(r)){t=""}else if(isX(o)){t=">="+r+".0.0"}else if(isX(s)){t=">="+r+"."+o+".0"}else{t=">="+t}if(isX(c)){a=""}else if(isX(u)){a="<"+(+c+1)+".0.0"}else if(isX(l)){a="<"+c+"."+(+u+1)+".0"}else if(p){a="<="+c+"."+u+"."+l+"-"+p}else{a="<="+a}return(t+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){e=new SemVer(e,this.options)}for(var t=0;t0){var n=e[s].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var o=null;var s=null;try{var n=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(n.test(e)){if(!o||s.compare(e)===-1){o=e;s=new SemVer(o,r)}}});return o}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var o=null;var s=null;try{var n=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(n.test(e)){if(!o||s.compare(e)===1){o=e;s=new SemVer(o,r)}}});return o}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var o=0;o":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,o){e=new SemVer(e,o);t=new Range(t,o);var s,n,i,a,c;switch(r){case">":s=gt;n=lte;i=lt;a=">";c=">=";break;case"<":s=lt;n=gte;i=gt;a="<";c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,o)){return false}for(var u=0;u=0.0.0")}p=p||e;d=d||e;if(s(e.semver,p.semver,o)){p=e}else if(i(e.semver,d.semver,o)){d=e}});if(p.operator===a||p.operator===c){return false}if((!d.operator||d.operator===a)&&n(e,d.semver)){return false}else if(d.operator===c&&i(e,d.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e){if(e instanceof SemVer){return e}if(typeof e!=="string"){return null}var t=e.match(i[x]);if(t==null){return null}return parse(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},299:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});const r="2.2.1";function normalizePaginatedListResponse(e){const t="total_count"in e.data&&!("url"in e.data);if(!t)return e;const r=e.data.incomplete_results;const o=e.data.repository_selection;const s=e.data.total_count;delete e.data.incomplete_results;delete e.data.repository_selection;delete e.data.total_count;const n=Object.keys(e.data)[0];const i=e.data[n];e.data=i;if(typeof r!=="undefined"){e.data.incomplete_results=r}if(typeof o!=="undefined"){e.data.repository_selection=o}e.data.total_count=s;return e}function iterator(e,t,r){const o=typeof t==="function"?t.endpoint(r):e.request.endpoint(t,r);const s=typeof t==="function"?t:e.request;const n=o.method;const i=o.headers;let a=o.url;return{[Symbol.asyncIterator]:()=>({next(){if(!a){return Promise.resolve({done:true})}return s({method:n,url:a,headers:i}).then(normalizePaginatedListResponse).then(e=>{a=((e.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1];return{value:e}})}})}}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)})}function paginateRest(e){return{paginate:Object.assign(paginate.bind(null,e),{iterator:iterator.bind(null,e)})}}paginateRest.VERSION=r;t.paginateRest=paginateRest},323:function(e){"use strict";var t=e.exports=function(e){return e!==null&&typeof e==="object"&&typeof e.pipe==="function"};t.writable=function(e){return t(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object"};t.readable=function(e){return t(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object"};t.duplex=function(e){return t.writable(e)&&t.readable(e)};t.transform=function(e){return t.duplex(e)&&typeof e._transform==="function"&&typeof e._transformState==="object"}},345: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.Whitelist=void 0;const i=n(r(470));class Whitelist{constructor(e){this.reRegExpChar=/[\\^$.*+\-?()[\]{}|]/g;this.reHasRegExpChar=RegExp(this.reRegExpChar.source);this.whitelist=(e||"").split(",").map(e=>e.trim())}isUserWhitelisted(e){return this.whitelist.some(t=>{let r=false;if(t.includes("*")){const o=this.escapeRegExp(t).split("\\*").join(".*");r=new RegExp(o).test(e.name)}else{r=t===e.name}if(r){i.info(`Whitelisted author ${e.name} excluded from CLA requirement.`)}return r})}escapeRegExp(e){return e&&this.reHasRegExpChar.test(e)?e.replace(this.reRegExpChar,"\\$&"):e||""}}t.Whitelist=Whitelist},357:function(e){e.exports=require("assert")},363:function(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)()})}},385:function(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(696));var s=r(796);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(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 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);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.2";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},389:function(e,t,r){"use strict";const o=r(747);const s=r(866);function readShebang(e){const t=150;let r;if(Buffer.alloc){r=Buffer.alloc(t)}else{r=new Buffer(t);r.fill(0)}let n;try{n=o.openSync(e,"r");o.readSync(n,r,0,t,0);o.closeSync(n)}catch(e){}return s(r.toString())}e.exports=readShebang},413:function(e){e.exports=require("stream")},427:function(e,t,r){"use strict";const o=r(669);let s;if(typeof o.getSystemErrorName==="function"){e.exports=o.getSystemErrorName}else{try{s=process.binding("uv");if(typeof s.errname!=="function"){throw new TypeError("uv.errname is not a function")}}catch(e){console.error("execa/lib/errname: unable to establish process.binding('uv')",e);s=null}e.exports=(e=>errname(s,e))}e.exports.__test__=errname;function errname(e,t){if(e){return e.errname(t)}if(!(t<0)){throw new Error("err >= 0")}return`Unknown system error ${t}`}},431:function(e,t,r){"use strict";var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=o(r(87));function issueCommand(e,t,r){const o=new Command(e,t,r);process.stdout.write(o.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const n="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=n+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+=`${n}${escapeData(this.message)}`;return e}}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;function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},448:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var o=r(796);var s=r(523);var n=r(753);var i=r(898);var a=r(813);function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}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{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(_objectSpread2(_objectSpread2({},r),{},{baseUrl:r.baseUrl.replace(/\/api\/v3$/,"/api")}));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 r=e.authStrategy(Object.assign({request:this.request},e.auth));t.wrap("request",r.hook);this.auth=r}const u=this.constructor;u.plugins.forEach(t=>{Object.assign(this,t(this,e))})}static defaults(e){const t=class extends(this){constructor(...t){const r=t[0]||{};super(Object.assign({},e,r,r.userAgent&&e.userAgent?{userAgent:`${r.userAgent} ${e.userAgent}`}:null))}};return t}static plugin(e,...t){var r;if(e instanceof Array){console.warn(["Passing an array of plugins to Octokit.plugin() has been deprecated.","Instead of:"," Octokit.plugin([plugin1, plugin2, ...])","Use:"," Octokit.plugin(plugin1, plugin2, ...)"].join("\n"))}const o=this.plugins;let s=[...e instanceof Array?e:[e],...t];const n=(r=class extends(this){},r.plugins=o.concat(s.filter(e=>!o.includes(e))),r);return n}}Octokit.VERSION=c;Octokit.plugins=[];return Octokit})();t.Octokit=u},453:function(e,t,r){var o=r(969);var s=r(9);var n=r(747);var i=function(){};var a=/^v?\.0/.test(process.version);var c=function(e){return typeof e==="function"};var u=function(e){if(!a)return false;if(!n)return false;return(e instanceof(n.ReadStream||i)||e instanceof(n.WriteStream||i))&&c(e.close)};var l=function(e){return e.setHeader&&c(e.abort)};var p=function(e,t,r,n){n=o(n);var a=false;e.on("close",function(){a=true});s(e,{readable:t,writable:r},function(e){if(e)return n(e);a=true;n()});var p=false;return function(t){if(a)return;if(p)return;p=true;if(u(e))return e.close(i);if(l(e))return e.abort();if(c(e.destroy))return e.destroy();n(t||new Error("stream was destroyed"))}};var d=function(e){e()};var f=function(e,t){return e.pipe(t)};var m=function(){var e=Array.prototype.slice.call(arguments);var t=c(e[e.length-1]||i)&&e.pop()||i;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var r;var o=e.map(function(s,n){var i=n0;return p(s,i,a,function(e){if(!r)r=e;if(e)o.forEach(d);if(i)return;o.forEach(d);t(r)})});return e.reduce(f)};e.exports=m},454:function(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[g]=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[g],e);if(t===undefined){return null}return this[g][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[g]).sort();return r.map(t==="key"?function(e){return e.toLowerCase()}:t==="value"?function(t){return e[g][t].join(", ")}:function(t){return[t.toLowerCase(),e[g][t].join(", ")]})}const w=Symbol("internal");function createHeadersIterator(e,t){const r=Object.create(y);r[w]={target:e,kind:t,index:0};return r}const y=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==y){throw new TypeError("Value of `this` is not a HeadersIterator")}var e=this[w];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[w].index=o+1;return{value:s[o],done:false}}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(y,Symbol.toStringTag,{value:"HeadersIterator",writable:false,enumerable:false,configurable:true});function exportNodeCompatibleHeaders(e){const t=Object.assign({__proto__:null},e[g]);const r=find(e[g],"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(m.test(r)){continue}if(Array.isArray(e[r])){for(const o of e[r]){if(h.test(o)){continue}if(t[g][r]===undefined){t[g][r]=[o]}else{t[g][r].push(o)}}}else if(!h.test(e[r])){t[g][r]=[e[r]]}}return t}const b=Symbol("Response internals");const v=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[b]={url:t.url,status:r,statusText:t.statusText||v[r],headers:o,counter:t.counter}}get url(){return this[b].url||""}get status(){return this[b].status}get ok(){return this[b].status>=200&&this[b].status<300}get redirected(){return this[b].counter>0}get statusText(){return this[b].statusText}get headers(){return this[b].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 T=Symbol("Request internals");const E=n.parse;const _=n.format;const O="destroy"in o.Readable.prototype;function isRequest(e){return typeof e==="object"&&typeof e[T]==="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(e.href)}else{r=E(`${e}`)}e={}}else{r=E(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[T]={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[T].method}get url(){return _(this[T].parsedURL)}get headers(){return this[T].headers}get redirect(){return this[T].redirect}get signal(){return this[T].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[T].parsedURL;const r=new Headers(e[T].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 P=o.PassThrough;const S=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 f=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){f();return}const m=function abortAndFinalize(){f();finalize()};const h=l(u);let g;if(p){p.addEventListener("abort",m)}function finalize(){h.abort();if(p)p.removeEventListener("abort",m);clearTimeout(g)}if(c.timeout){h.once("socket",function(e){g=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(g);const t=createHeadersLenient(e.headers);if(fetch.isRedirect(e.statusCode)){const o=t.get("Location");const s=o===null?null:S(c.url,o);switch(c.redirect){case"error":n(new FetchError(`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};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",m)});let o=e.pipe(new P);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 P);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},462:function(e){"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(e){e=e.replace(t,"^$1");return e}function escapeArgument(e,r){e=`${e}`;e=e.replace(/(\\*)"/g,'$1$1\\"');e=e.replace(/(\\*)$/,"$1$1");e=`"${e}"`;e=e.replace(t,"^$1");if(r){e=e.replace(t,"^$1")}return e}e.exports.command=escapeCommand;e.exports.argument=escapeArgument},463:function(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(692);var s=_interopDefault(r(969));const n=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;Object.defineProperty(this,"code",{get(){n(new o.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));return t}});this.headers=r.headers||{};const s=Object.assign({},r.request);if(r.request.headers.authorization){s.headers=Object.assign({},r.request.headers,{authorization:r.request.headers.authorization.replace(/ .*$/," [REDACTED]")})}s.url=s.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]");this.request=s}}t.RequestError=RequestError},469: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(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(262));const a=r(521);t.context=new i.Context;function getOctokit(e,t){return new a.GitHub(a.getOctokitOptions(e,t))}t.getOctokit=getOctokit},470:function(e,t,r){"use strict";var o=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())})};var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const n=r(431);const i=s(r(87));const a=s(r(622));var c;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(c=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=n.toCommandValue(t);process.env[e]=r;n.issueCommand("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){n.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){n.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${a.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}`)}return r.trim()}t.getInput=getInput;function setOutput(e,t){n.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){n.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=c.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){n.issueCommand("debug",{},e)}t.debug=debug;function error(e){n.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){n.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+i.EOL)}t.info=info;function startGroup(e){n.issue("group",e)}t.startGroup=startGroup;function endGroup(){n.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return o(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){n.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},489:function(e,t,r){"use strict";const o=r(622);const s=r(814);const n=r(39)();function resolveCommandAttempt(e,t){const r=process.cwd();const i=e.options.cwd!=null;if(i){try{process.chdir(e.options.cwd)}catch(e){}}let a;try{a=s.sync(e.command,{path:(e.options.env||process.env)[n],pathExt:t?o.delimiter:undefined})}catch(e){}finally{process.chdir(r)}if(a){a=o.resolve(i?e.options.cwd:"",a)}return a}function resolveCommand(e){return resolveCommandAttempt(e)||resolveCommandAttempt(e,true)}e.exports=resolveCommand},510:function(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})}},521: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(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(262));const a=n(r(127));const c=r(448);const u=r(842);const l=r(299);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},523:function(e,t,r){var o=r(363);var s=r(510);var n=r(763);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},539:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const o=r(835);const s=r(605);const n=r(211);const i=r(950);let a;var c;(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"})(c=t.HttpCodes||(t.HttpCodes={}));var u;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(u=t.Headers||(t.Headers={}));var l;(function(e){e["ApplicationJson"]="application/json"})(l=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=i.getProxyUrl(o.parse(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const p=[c.MovedPermanently,c.ResourceMoved,c.SeeOther,c.TemporaryRedirect,c.PermanentRedirect];const d=[c.BadGateway,c.ServiceUnavailable,c.GatewayTimeout];const f=["OPTIONS","GET","DELETE","HEAD"];const m=10;const h=5;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=o.parse(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[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,l.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[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.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[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.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[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.ApplicationJson);let s=await this.patch(e,o,r);return this._processResponse(s,this.requestOptions)}async request(e,t,r,s){if(this._disposed){throw new Error("Client has already been disposed.")}let n=o.parse(t);let i=this._prepareRequest(e,n,s);let a=this._allowRetries&&f.indexOf(e)!=-1?this._maxRetries+1:1;let u=0;let l;while(u0){const a=l.message.headers["location"];if(!a){break}let c=o.parse(a);if(n.protocol=="https:"&&n.protocol!=c.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 l.readBody();if(c.hostname!==n.hostname){for(let e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}i=this._prepareRequest(e,c,s);l=await this.requestRaw(i,r);t--}if(d.indexOf(l.message.statusCode)==-1){return l}u+=1;if(u{let s=function(e,t){if(e){o(e)}r(t)};this.requestRawWithCallback(e,t,s)})}requestRawWithCallback(e,t,r){let o;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;let n=(e,t)=>{if(!s){s=true;r(e,t)}};let i=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);n(null,t)});i.on("socket",e=>{o=e});i.setTimeout(this._socketTimeout||3*6e4,()=>{if(o){o.end()}n(new Error("Request timeout: "+e.options.path),null)});i.on("error",function(e){n(e,null)});if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",function(){i.end()});t.pipe(i)}else{i.end()}}getAgent(e){let t=o.parse(e);return this._getAgent(t)}_prepareRequest(e,t,r){const o={};o.parsedUrl=t;const i=o.parsedUrl.protocol==="https:";o.httpModule=i?n:s;const a=i?443:80;o.options={};o.options.host=o.parsedUrl.hostname;o.options.port=o.parsedUrl.port?parseInt(o.parsedUrl.port):a;o.options.path=(o.parsedUrl.pathname||"")+(o.parsedUrl.search||"");o.options.method=e;o.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){o.options.headers["user-agent"]=this.userAgent}o.options.agent=this._getAgent(o.parsedUrl);if(this.handlers){this.handlers.forEach(e=>{e.prepareRequest(o.options)})}return o}_mergeHeaders(e){const t=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getExistingOrDefaultHeader(e,t,r){const o=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});let s;if(this.requestOptions&&this.requestOptions.headers){s=o(this.requestOptions.headers)[t]}return e[t]||s||r}_getAgent(e){let t;let o=i.getProxyUrl(e);let c=o&&o.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||s.globalAgent.maxSockets}if(c){if(!a){a=r(856)}const e={maxSockets:l,keepAlive:this._keepAlive,proxy:{proxyAuth:o.auth,host:o.hostname,port:o.port}};let s;const n=o.protocol==="https:";if(u){s=n?a.httpsOverHttps:a.httpsOverHttp}else{s=n?a.httpOverHttps:a.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:l};t=u?new n.Agent(e):new s.Agent(e);this._agent=t}if(!t){t=u?n.globalAgent:s.globalAgent}if(u&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(m,e);const t=h*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==c.NotFound){r(n)}let i;let a;try{a=await e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){i=JSON.parse(a,HttpClient.dateTimeDeserializer)}else{i=JSON.parse(a)}n.result=i}n.headers=e.message.headers}catch(e){}if(s>299){let e;if(i&&i.message){e=i.message}else if(a&&a.length>0){e=a}else{e="Failed request: ("+s+")"}let t=new Error(e);t["statusCode"]=s;if(n.result){t["result"]=n.result}o(t)}else{r(n)}})}}t.HttpClient=HttpClient},568:function(e,t,r){"use strict";const o=r(622);const s=r(948);const n=r(489);const i=r(462);const a=r(389);const c=r(280);const u=process.platform==="win32";const l=/\.(?:com|exe)$/i;const p=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;const d=s(()=>c.satisfies(process.version,"^4.8.0 || ^5.7.0 || >= 6.0.0",true))||false;function detectShebang(e){e.file=n(e);const t=e.file&&a(e.file);if(t){e.args.unshift(e.file);e.command=t;return n(e)}return e.file}function parseNonShell(e){if(!u){return e}const t=detectShebang(e);const r=!l.test(t);if(e.options.forceShell||r){const r=p.test(t);e.command=o.normalize(e.command);e.command=i.command(e.command);e.args=e.args.map(e=>i.argument(e,r));const s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`];e.command=process.env.comspec||"cmd.exe";e.options.windowsVerbatimArguments=true}return e}function parseShell(e){if(d){return e}const t=[e.command].concat(e.args).join(" ");if(u){e.command=typeof e.options.shell==="string"?e.options.shell:process.env.comspec||"cmd.exe";e.args=["/d","/s","/c",`"${t}"`];e.options.windowsVerbatimArguments=true}else{if(typeof e.options.shell==="string"){e.command=e.options.shell}else if(process.platform==="android"){e.command="/system/bin/sh"}else{e.command="/bin/sh"}e.args=["-c",t]}return e}function parse(e,t,r){if(t&&!Array.isArray(t)){r=t;t=null}t=t?t.slice(0):[];r=Object.assign({},r);const o={command:e,args:t,options:r,file:undefined,original:{command:e,args:t}};return r.shell?parseShell(o):parseNonShell(o)}e.exports=parse},605:function(e){e.exports=require("http")},614:function(e){e.exports=require("events")},621:function(e,t,r){"use strict";const o=r(622);const s=r(39);e.exports=(e=>{e=Object.assign({cwd:process.cwd(),path:process.env[s()]},e);let t;let r=o.resolve(e.cwd);const n=[];while(t!==r){n.push(o.join(r,"node_modules/.bin"));t=r;r=o.resolve(r,"..")}n.push(o.dirname(process.execPath));return n.concat(e.path).join(o.delimiter)});e.exports.env=(t=>{t=Object.assign({env:process.env},t);const r=Object.assign({},t.env);const o=s({env:r});t.path=r[o];r[o]=e.exports(t);return r})},622:function(e){e.exports=require("path")},631:function(e){e.exports=require("net")},654:function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},669:function(e){e.exports=require("util")},692:function(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},696:function(e){"use strict";function isObject(e){return e!=null&&typeof e==="object"&&Array.isArray(e)===false}function isObjectObject(e){return isObject(e)===true&&Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,r;if(isObjectObject(e)===false)return false;t=e.constructor;if(typeof t!=="function")return false;r=t.prototype;if(isObjectObject(r)===false)return false;if(r.hasOwnProperty("isPrototypeOf")===false){return false}return true}e.exports=isPlainObject},697:function(e){"use strict";e.exports=((e,t)=>{t=t||(()=>{});return e.then(e=>new Promise(e=>{e(t())}).then(()=>e),e=>new Promise(e=>{e(t())}).then(()=>{throw e}))})},742:function(e,t,r){var o=r(747);var s;if(process.platform==="win32"||global.TESTING_WINDOWS){s=r(818)}else{s=r(197)}e.exports=isexe;isexe.sync=sync;function isexe(e,t,r){if(typeof t==="function"){r=t;t={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise(function(r,o){isexe(e,t||{},function(e,t){if(e){o(e)}else{r(t)}})})}s(e,t||{},function(e,o){if(e){if(e.code==="EACCES"||t&&t.ignoreErrors){e=null;o=false}}r(e,o)})}function sync(e,t){try{return s.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},747:function(e){e.exports=require("fs")},753:function(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(385);var s=r(796);var n=_interopDefault(r(696));var i=_interopDefault(r(454));var a=r(463);const c="5.4.4";function getBufferResponse(e){return e.arrayBuffer()}function fetchWrapper(e){if(n(e.body)||Array.isArray(e.body)){e.body=JSON.stringify(e.body)}let t={};let r;let o;const s=e.request&&e.request.fetch||i;return s(e.url,Object.assign({method:e.method,body:e.body,headers:e.headers,redirect:e.redirect},e.request)).then(s=>{o=s.url;r=s.status;for(const e of s.headers){t[e[0]]=e[1]}if(r===204||r===205){return}if(e.method==="HEAD"){if(r<400){return}throw new a.RequestError(s.statusText,r,{headers:t,request:e})}if(r===304){throw new a.RequestError("Not modified",r,{headers:t,request:e})}if(r>=400){return s.text().then(o=>{const s=new a.RequestError(o,r,{headers:t,request:e});try{let e=JSON.parse(s.message);Object.assign(s,e);let t=e.errors;s.message=s.message+": "+t.map(JSON.stringify).join(", ")}catch(e){}throw s})}const n=s.headers.get("content-type");if(/application\/json/.test(n)){return s.json()}if(!n||/^text\/|charset=utf-8$/.test(n)){return s.text()}return getBufferResponse(s)}).then(e=>{return{status:r,url:o,headers:t,data:e}}).catch(r=>{if(r instanceof a.RequestError){throw r}throw new a.RequestError(r.message,500,{headers:t,request:e})})}function withDefaults(e,t){const r=e.defaults(t);const o=function(e,t){const o=r.merge(e,t);if(!o.request||!o.request.hook){return fetchWrapper(r.parse(o))}const s=(e,t)=>{return fetchWrapper(r.parse(r.merge(e,t)))};Object.assign(s,{endpoint:r,defaults:withDefaults.bind(null,r)});return o.request.hook(s,o)};return Object.assign(o,{endpoint:r,defaults:withDefaults.bind(null,r)})}const u=withDefaults(o.endpoint,{headers:{"user-agent":`octokit-request.js/${c} ${s.getUserAgent()}`}});t.request=u},757: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.ClaFile=void 0;const i=n(r(470));const a=r(89);class ClaFile{constructor(e){if(e){this._records=JSON.parse(Buffer.from(e,"base64").toString()).signedContributors}else{this._records=[]}}mapSignedAuthors(e){return new a.AuthorMap(e.map(e=>new a.Author({name:e.name,id:e.id,pullRequestNo:e.pullRequestNo,signed:this._records.some(t=>t.id===e.id)})))}addSignature(e){i.debug(`Adding signatures: '${e.map(e=>e.name).join(", ")}'`);const t=e.filter(e=>e.id!==undefined&&e.pullRequestNo!==undefined&&!this._records.some(t=>t.id===e.id));i.debug(`Adding valid signatures: ${t.map(e=>e.name).join(", ")}'`);this._records.push(...t);return t}toBase64(){return Buffer.from(JSON.stringify({signedContributors:this._records},null,2)).toString("base64")}}t.ClaFile=ClaFile},761:function(e){e.exports=require("zlib")},763:function(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)}},768:function(e){"use strict";e.exports=function(e){var t=typeof e==="string"?"\n":"\n".charCodeAt();var r=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===t){e=e.slice(0,e.length-1)}if(e[e.length-1]===r){e=e.slice(0,e.length-1)}return e}},776: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.PullCheckRunner=void 0;const a=n(r(470));class PullCheckRunner{constructor(e){this.settings=e}rerunLastCheck(){return i(this,void 0,void 0,function*(){if(this.settings.payloadAction==="pull_request"){return}a.info("Re-running blocking commit check.");const[e,t]=yield Promise.all([yield this.getSelfWorkflowId(),yield this.getBranchOfPullRequest()]);a.debug(`Self workflow ID is ${e}`);a.debug(`PR branch is ${t}`);const r=yield this.settings.octokitLocal.actions.listWorkflowRuns({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName,branch:t,workflow_id:e,event:"pull_request"});a.debug(`Found ${r.data.total_count} previous runs.`);if(r.data.total_count>0){const e=r.data.workflow_runs[0].id;a.debug(`Rerunning build run ${e}`);yield this.settings.octokitLocal.actions.reRunWorkflow({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName,run_id:e})}})}getSelfWorkflowId(){return i(this,void 0,void 0,function*(){const e=yield this.settings.octokitLocal.actions.listRepoWorkflows({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName});const t=e.data.workflows.find(e=>e.name==this.settings.workflowName);if(!t){throw new Error("Unable to locate this workflow's ID in this repository, can't retrigger job..")}return t.id})}getBranchOfPullRequest(){return i(this,void 0,void 0,function*(){const e=yield this.settings.octokitLocal.pulls.get({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName,pull_number:this.settings.pullRequestNumber});return e.data.head.ref})}}t.PullCheckRunner=PullCheckRunner},796:function(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(2));function getUserAgent(){try{return`Node.js/${process.version.substr(1)} (${o()}; ${process.arch})`}catch(e){if(/wmic os get Caption/.test(e.message)){return"Windows "}return""}}t.getUserAgent=getUserAgent},813:function(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},814:function(e,t,r){e.exports=which;which.sync=whichSync;var o=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var s=r(622);var n=o?";":":";var i=r(742);function getNotFoundError(e){var t=new Error("not found: "+e);t.code="ENOENT";return t}function getPathInfo(e,t){var r=t.colon||n;var s=t.path||process.env.PATH||"";var i=[""];s=s.split(r);var a="";if(o){s.unshift(process.cwd());a=t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM";i=a.split(r);if(e.indexOf(".")!==-1&&i[0]!=="")i.unshift("")}if(e.match(/\//)||o&&e.match(/\\/))s=[""];return{env:s,ext:i,extExe:a}}function which(e,t,r){if(typeof t==="function"){r=t;t={}}var o=getPathInfo(e,t);var n=o.env;var a=o.ext;var c=o.extExe;var u=[];(function F(o,l){if(o===l){if(t.all&&u.length)return r(null,u);else return r(getNotFoundError(e))}var p=n[o];if(p.charAt(0)==='"'&&p.slice(-1)==='"')p=p.slice(1,-1);var d=s.join(p,e);if(!p&&/^\.[\\\/]/.test(e)){d=e.slice(0,2)+d}(function E(e,s){if(e===s)return F(o+1,l);var n=a[e];i(d+n,{pathExt:c},function(o,i){if(!o&&i){if(t.all)u.push(d+n);else return r(null,d+n)}return E(e+1,s)})})(0,a.length)})(0,n.length)}function whichSync(e,t){t=t||{};var r=getPathInfo(e,t);var o=r.env;var n=r.ext;var a=r.extExe;var c=[];for(var u=0,l=o.length;ue.body.match(this.BotNameRegex))}catch(e){throw new Error(`Failed to get PR comments: ${e.message}. Details: ${JSON.stringify(e)}`)}})}getCommentContent(e){if(e.allSigned()){return`**${this.BotName}:** All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.`}const t=e.count>1?"you all":"you";const r=this.settings.claDocUrl;const o=this.settings.signatureText;let s="";const n=e.getSigned();const i=e.getUnsigned();s+=`**${n.length}** out of **${e.count}** committers have signed the CLA.\n`;n.forEach(e=>s+=`:white_check_mark: @${e.name}\n`);i.forEach(e=>s+=`:x: @${e.name}\n`);let a=e.getNonGithubAccounts();if(a.length>0){s+="---\n";s+=`GitHub can't find an account for **${a.map(e=>e.name).join(", ")}**.\n`;s+="You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please [add the email address used for this commit to your account](https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user)."}return`**${this.BotName}:**\n\nThank you for your submission, we really appreciate it. Like many open-source projects, we ask that ${t} read and sign our [Contributor License Agreement](${r}) before we can accept your contribution. You can sign the CLA by just by adding a comment to this pull request with this exact sentence:\n\n> ***${o}***\n\nBy commenting with the above message you are agreeing to the terms of the CLA. Your account will be recorded as agreeing to our CLA so you don't need to sign it again for future contributions to our company's repositories.\n\n${s}\n`}getNewSignatures(e){return i(this,void 0,void 0,function*(){const t=e.getUnsigned();if(t.length==0){return[]}const[r,o]=yield Promise.all([this.settings.octokitLocal.issues.listComments({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName,issue_number:this.settings.pullRequestNumber}),this.getRepoId()]);return r.data.filter(e=>t.some(t=>t.id===e.user.id)&&e.body.toUpperCase().match(this.settings.signatureRegex)).map(e=>({id:e.user.id,name:e.user.login,pullRequestNo:this.settings.pullRequestNumber,comment_id:e.id,created_at:e.created_at,repoId:o}))})}getRepoId(){return i(this,void 0,void 0,function*(){return(yield this.settings.octokitLocal.repos.get({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName})).data.id})}}t.PullComments=PullComments},881:function(e){"use strict";const t=process.platform==="win32";function notFoundError(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function hookChildProcess(e,r){if(!t){return}const o=e.emit;e.emit=function(t,s){if(t==="exit"){const t=verifyENOENT(s,r,"spawn");if(t){return o.call(e,"error",t)}}return o.apply(e,arguments)}}function verifyENOENT(e,r){if(t&&e===1&&!r.file){return notFoundError(r.original,"spawn")}return null}function verifyENOENTSync(e,r){if(t&&e===1&&!r.file){return notFoundError(r.original,"spawnSync")}return null}e.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},898:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var o=r(753);var s=r(796);const n="4.5.0";class GraphqlError extends Error{constructor(e,t){const r=t.data.errors[0].message;super(r);Object.assign(this,t.data);this.name="GraphqlError";this.request=e;if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}}const i=["method","baseUrl","url","headers","request","query","mediaType"];function graphql(e,t,r){r=typeof t==="string"?r=Object.assign({query:t},r):r=t;const o=Object.keys(r).reduce((e,t)=>{if(i.includes(t)){e[t]=r[t];return e}if(!e.variables){e.variables={}}e.variables[t]=r[t];return e},{});return e(o).then(e=>{if(e.data.errors){throw new GraphqlError(o,{data:e.data})}return e.data.data})}function withDefaults(e,t){const r=e.defaults(t);const s=(e,t)=>{return graphql(r,e,t)};return Object.assign(s,{defaults:withDefaults.bind(null,r),endpoint:o.request.endpoint})}const a=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=a;t.withCustomRequest=withCustomRequest},948:function(e){"use strict";e.exports=function(e){try{return e()}catch(e){}}},950:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const o=r(835);function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let s;if(t){s=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{s=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(s){r=o.parse(s)}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},955:function(e,t,r){"use strict";const o=r(622);const s=r(129);const n=r(20);const i=r(768);const a=r(621);const c=r(323);const u=r(145);const l=r(697);const p=r(260);const d=r(427);const f=r(168);const m=1e3*1e3*10;function handleArgs(e,t,r){let s;r=Object.assign({extendEnv:true,env:{}},r);if(r.extendEnv){r.env=Object.assign({},process.env,r.env)}if(r.__winShell===true){delete r.__winShell;s={command:e,args:t,options:r,file:e,original:{cmd:e,args:t}}}else{s=n._parse(e,t,r)}r=Object.assign({maxBuffer:m,buffer:true,stripEof:true,preferLocal:true,localDir:s.options.cwd||process.cwd(),encoding:"utf8",reject:true,cleanup:true},s.options);r.stdio=f(r);if(r.preferLocal){r.env=a.env(Object.assign({},r,{cwd:r.localDir}))}if(r.detached){r.cleanup=false}if(process.platform==="win32"&&o.basename(s.command)==="cmd.exe"){s.args.unshift("/q")}return{cmd:s.command,args:s.args,opts:r,parsed:s}}function handleInput(e,t){if(t===null||t===undefined){return}if(c(t)){t.pipe(e.stdin)}else{e.stdin.end(t)}}function handleOutput(e,t){if(t&&e.stripEof){t=i(t)}return t}function handleShell(e,t,r){let o="/bin/sh";let s=["-c",t];r=Object.assign({},r);if(process.platform==="win32"){r.__winShell=true;o=process.env.comspec||"cmd.exe";s=["/s","/c",`"${t}"`];r.windowsVerbatimArguments=true}if(r.shell){o=r.shell;delete r.shell}return e(o,s,r)}function getStream(e,t,{encoding:r,buffer:o,maxBuffer:s}){if(!e[t]){return null}let n;if(!o){n=new Promise((r,o)=>{e[t].once("end",r).once("error",o)})}else if(r){n=u(e[t],{encoding:r,maxBuffer:s})}else{n=u.buffer(e[t],{maxBuffer:s})}return n.catch(e=>{e.stream=t;e.message=`${t} ${e.message}`;throw e})}function makeError(e,t){const{stdout:r,stderr:o}=e;let s=e.error;const{code:n,signal:i}=e;const{parsed:a,joinedCmd:c}=t;const u=t.timedOut||false;if(!s){let e="";if(Array.isArray(a.opts.stdio)){if(a.opts.stdio[2]!=="inherit"){e+=e.length>0?o:`\n${o}`}if(a.opts.stdio[1]!=="inherit"){e+=`\n${r}`}}else if(a.opts.stdio!=="inherit"){e=`\n${o}${r}`}s=new Error(`Command failed: ${c}${e}`);s.code=n<0?d(n):n}s.stdout=r;s.stderr=o;s.failed=true;s.signal=i||null;s.cmd=c;s.timedOut=u;return s}function joinCmd(e,t){let r=e;if(Array.isArray(t)&&t.length>0){r+=" "+t.join(" ")}return r}e.exports=((e,t,r)=>{const o=handleArgs(e,t,r);const{encoding:i,buffer:a,maxBuffer:c}=o.opts;const u=joinCmd(e,t);let d;try{d=s.spawn(o.cmd,o.args,o.opts)}catch(e){return Promise.reject(e)}let f;if(o.opts.cleanup){f=p(()=>{d.kill()})}let m=null;let h=false;const g=()=>{if(m){clearTimeout(m);m=null}if(f){f()}};if(o.opts.timeout>0){m=setTimeout(()=>{m=null;h=true;d.kill(o.opts.killSignal)},o.opts.timeout)}const w=new Promise(e=>{d.on("exit",(t,r)=>{g();e({code:t,signal:r})});d.on("error",t=>{g();e({error:t})});if(d.stdin){d.stdin.on("error",t=>{g();e({error:t})})}});function destroy(){if(d.stdout){d.stdout.destroy()}if(d.stderr){d.stderr.destroy()}}const y=()=>l(Promise.all([w,getStream(d,"stdout",{encoding:i,buffer:a,maxBuffer:c}),getStream(d,"stderr",{encoding:i,buffer:a,maxBuffer:c})]).then(e=>{const t=e[0];t.stdout=e[1];t.stderr=e[2];if(t.error||t.code!==0||t.signal!==null){const e=makeError(t,{joinedCmd:u,parsed:o,timedOut:h});e.killed=e.killed||d.killed;if(!o.opts.reject){return e}throw e}return{stdout:handleOutput(o.opts,t.stdout),stderr:handleOutput(o.opts,t.stderr),code:0,failed:false,killed:false,signal:null,cmd:u,timedOut:false}}),destroy);n._enoent.hookChildProcess(d,o.parsed);handleInput(d,o.opts.input);d.then=((e,t)=>y().then(e,t));d.catch=(e=>y().catch(e));return d});e.exports.stdout=((...t)=>e.exports(...t).then(e=>e.stdout));e.exports.stderr=((...t)=>e.exports(...t).then(e=>e.stderr));e.exports.shell=((t,r)=>handleShell(e.exports,t,r));e.exports.sync=((e,t,r)=>{const o=handleArgs(e,t,r);const n=joinCmd(e,t);if(c(o.opts.input)){throw new TypeError("The `input` option cannot be a stream in sync mode")}const i=s.spawnSync(o.cmd,o.args,o.opts);i.code=i.status;if(i.error||i.status!==0||i.signal!==null){const e=makeError(i,{joinedCmd:n,parsed:o});if(!o.opts.reject){return e}throw e}return{stdout:handleOutput(o.opts,i.stdout),stderr:handleOutput(o.opts,i.stderr),code:0,failed:false,signal:null,cmd:n,timedOut:false}});e.exports.shellSync=((t,r)=>handleShell(e.exports.sync,t,r))},966:function(e,t,r){"use strict";const{PassThrough:o}=r(413);e.exports=(e=>{e=Object.assign({},e);const{array:t}=e;let{encoding:r}=e;const s=r==="buffer";let n=false;if(t){n=!(r||s)}else{r=r||"utf8"}if(s){r=null}let i=0;const a=[];const c=new o({objectMode:n});if(r){c.setEncoding(r)}c.on("data",e=>{a.push(e);if(n){i=a.length}else{i+=e.length}});c.getBufferedValue=(()=>{if(t){return a}return s?Buffer.concat(a,i):a.join("")});c.getBufferedLength=(()=>i);return c})},969:function(e,t,r){var o=r(11);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 t=function(){if(t.called)return t.value;t.called=true;return t.value=e.apply(this,arguments)};t.called=false;return t}function onceStrict(e){var t=function(){if(t.called)throw new Error(t.onceError);t.called=true;return t.value=e.apply(this,arguments)};var r=e.name||"Function wrapped with `once`";t.onceError=r+" shouldn't be called more than once";t.called=false;return t}},973: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.getInputs=void 0;const i=n(r(470));const a=n(r(469));const c=r(469);function ParseRepoName(e){let t=e.split("/");if(t.length!=2){throw new Error(`Unable to parse repository name ${e} into owner/repo-name format. Make sure the remote-repo-name is set correctly.`)}return t}function getInputs(){const e={};e.pullRequestNumber=c.context.issue.number;e.payloadAction=c.context.payload.action;e.workflowName=c.context.workflow;e.localAccessToken=process.env["GITHUB_TOKEN"];e.isRemoteRepo=(i.getInput("use-remote-repo")||"FALSE").toUpperCase()==="TRUE";const t={required:true};[e.remoteRepositoryOwner,e.remoteRepositoryName]=ParseRepoName(i.getInput("remote-repo-name",{required:e.isRemoteRepo})||c.context.repo.owner+"/"+c.context.repo.repo);const r=i.getInput("remote-repo-pat");if(!r){e.isRemoteRepoReadonly=e.isRemoteRepo;e.repositoryAccessToken=e.localAccessToken}else{e.isRemoteRepoReadonly=false;e.repositoryAccessToken=r}e.localRepositoryOwner=c.context.repo.owner;e.localRepositoryName=c.context.repo.repo;e.claFilePath=i.getInput("path-to-signatures")||"signatures/cla.json";e.branch=i.getInput("branch")||"master";e.whitelist=i.getInput("whitelist")||"";e.signatureText=i.getInput("signature-text")||"I have read the CLA Document and I hereby sign the CLA";e.signatureRegex=new RegExp(i.getInput("signature-regex")||/^.*I\s*HAVE\s*READ\s*THE\s*CLA\s*DOCUMENT\s*AND\s*I\s*HEREBY\s*SIGN\s*THE\s*CLA/);if(!e.signatureText.toUpperCase().match(e.signatureRegex)){throw new Error("Signature RegEx does not match against Signature Text. Confirm valid RegEx.")}e.blockchainWebhookEndpoint=i.getInput("blockchain-webhook-endpoint")||"https://u9afh6n36g.execute-api.eu-central-1.amazonaws.com/dev/webhook";e.blockchainStorageFlag=(i.getInput("blockchain-storage-flag")||"FALSE").toUpperCase()==="TRUE";e.emptyCommitFlag=(i.getInput("empty-commit-flag")||"FALSE").toUpperCase()==="TRUE";e.claDocUrl=i.getInput("url-to-cladocument",t);e.octokitLocal=a.getOctokit(e.localAccessToken);e.octokitRemote=a.getOctokit(e.repositoryAccessToken);writeOutSettings(e);return e}t.getInputs=getInputs;function writeOutSettings(e){i.debug("All input settings constructed:");for(var t in e){i.debug(`${t}: ${e[t]}`)}}}}); \ No newline at end of file +module.exports=function(e,t){"use strict";var r={};function __webpack_require__(t){if(r[t]){return r[t].exports}var o=r[t]={i:t,l:false,exports:{}};e[t].call(o.exports,o,o.exports,__webpack_require__);o.l=true;return o.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(131)}return startup()}({2:function(e,t,r){"use strict";const o=r(87);const s=r(118);const n=r(49);const i=(e,t)=>{if(!e&&t){throw new Error("You can't specify a `release` without specifying `platform`")}e=e||o.platform();let r;if(e==="darwin"){if(!t&&o.platform()==="darwin"){t=o.release()}const e=t?Number(t.split(".")[0])>15?"macOS":"OS X":"macOS";r=t?s(t).name:"";return e+(r?" "+r:"")}if(e==="linux"){if(!t&&o.platform()==="linux"){t=o.release()}r=t?t.replace(/^(\d+\.\d+).*/,"$1"):"";return"Linux"+(r?" "+r:"")}if(e==="win32"){if(!t&&o.platform()==="win32"){t=o.release()}r=t?n(t):"";return"Windows"+(r?" "+r:"")}return e};e.exports=i},9:function(e,t,r){var o=r(969);var s=function(){};var n=function(e){return e.setHeader&&typeof e.abort==="function"};var i=function(e){return e.stdio&&Array.isArray(e.stdio)&&e.stdio.length===3};var a=function(e,t,r){if(typeof t==="function")return a(e,null,t);if(!t)t={};r=o(r||s);var c=e._writableState;var u=e._readableState;var l=t.readable||t.readable!==false&&e.readable;var p=t.writable||t.writable!==false&&e.writable;var d=false;var f=function(){if(!e.writable)m()};var m=function(){p=false;if(!l)r.call(e)};var h=function(){l=false;if(!p)r.call(e)};var g=function(t){r.call(e,t?new Error("exited with error code: "+t):null)};var w=function(t){r.call(e,t)};var y=function(){process.nextTick(b)};var b=function(){if(d)return;if(l&&!(u&&(u.ended&&!u.destroyed)))return r.call(e,new Error("premature close"));if(p&&!(c&&(c.ended&&!c.destroyed)))return r.call(e,new Error("premature close"))};var v=function(){e.req.on("finish",m)};if(n(e)){e.on("complete",m);e.on("abort",y);if(e.req)v();else e.on("request",v)}else if(p&&!c){e.on("end",f);e.on("close",f)}if(i(e))e.on("exit",g);e.on("end",h);e.on("finish",m);if(t.error!==false)e.on("error",w);e.on("close",y);return function(){d=true;e.removeListener("complete",m);e.removeListener("abort",y);e.removeListener("request",v);if(e.req)e.req.removeListener("finish",m);e.removeListener("end",f);e.removeListener("close",f);e.removeListener("finish",m);e.removeListener("exit",g);e.removeListener("end",h);e.removeListener("error",w);e.removeListener("close",y)}};e.exports=a},11:function(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{e=e||{};const t=e.env||process.env;const r=e.platform||process.platform;if(r!=="win32"){return"PATH"}return Object.keys(t).find(e=>e.toUpperCase()==="PATH")||"Path"})},49:function(e,t,r){"use strict";const o=r(87);const s=r(955);const n=new Map([["10.0","10"],["6.3","8.1"],["6.2","8"],["6.1","7"],["6.0","Vista"],["5.2","Server 2003"],["5.1","XP"],["5.0","2000"],["4.9","ME"],["4.1","98"],["4.0","95"]]);const i=e=>{const t=/\d+\.\d/.exec(e||o.release());if(e&&!t){throw new Error("`release` argument doesn't match `n.n`")}const r=(t||[])[0];if((!e||e===o.release())&&["6.1","6.2","6.3","10.0"].includes(r)){let e;try{e=s.sync("powershell",["(Get-CimInstance -ClassName Win32_OperatingSystem).caption"]).stdout||""}catch(t){e=s.sync("wmic",["os","get","Caption"]).stdout||""}const t=(e.match(/2008|2012|2016|2019/)||[])[0];if(t){return`Server ${t}`}}return n.get(r)};e.exports=i},71:function(e,t,r){"use strict";var o=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.PullAuthors=void 0;const s=r(89);class PullAuthors{constructor(e){this.getCommitAuthorsQuery=`\nquery($owner:String! $name:String! $number:Int! $cursor:String!){\n repository(owner: $owner, name: $name) {\n pullRequest(number: $number) {\n commits(first: 100, after: $cursor) {\n totalCount\n edges {\n node {\n commit {\n author {\n email\n name\n user {\n id\n databaseId\n login\n }\n }\n committer {\n name\n user {\n id\n databaseId\n login\n }\n }\n }\n }\n cursor\n }\n pageInfo {\n endCursor\n hasNextPage\n }\n }\n }\n }\n}`.replace(/ /g,"");this.settings=e}getAuthors(){return o(this,void 0,void 0,function*(){const e=yield this.queryForCommitAuthors();return e.repository.pullRequest.commits.edges.map(e=>this.getUserFromCommit(e.node.commit)).filter((e,t,r)=>r.findIndex(t=>t.name===e.name)===t).filter(e=>e.id!==41898282)})}queryForCommitAuthors(){return o(this,void 0,void 0,function*(){try{const e=yield this.settings.octokitLocal.graphql(this.getCommitAuthorsQuery,{owner:this.settings.localRepositoryOwner,name:this.settings.localRepositoryName,number:this.settings.pullRequestNumber,cursor:""});if(e.repository.pullRequest.commits.totalCount>100){throw new Error("Commit query has more than 100 commits and GraphQL pagination isn't supported yet! Can't validate all of the authors of this PR.")}return e}catch(e){throw new Error(`GraphQL query to get commit authors failed: '${e.message}'. Details: ${JSON.stringify(e)} `)}})}getUserFromCommit(e){const t=(e.author||{}).user||(e.committer||{}).user||e.author||e.committer;return new s.Author({name:t.login||t.name,id:t.databaseId||undefined,pullRequestNo:this.settings.pullRequestNumber,signed:false})}}t.PullAuthors=PullAuthors},87:function(e){e.exports=require("os")},89:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});t.Author=t.AuthorMap=void 0;class AuthorMap{constructor(e){this._authors=e}getSigned(){return this._authors.filter(e=>e.signed)}getUnsigned(){return this._authors.filter(e=>!e.signed)}getNonGithubAccounts(){return this._authors.filter(e=>!e.id)}allSigned(){return this._authors.every(e=>e.signed)}get count(){return this._authors.length}}t.AuthorMap=AuthorMap;class Author{constructor({name:e,id:t,pullRequestNo:r,signed:o}){this.name=e;this.id=t;this.pullRequestNo=r;this.signed=o}}t.Author=Author},118:function(e,t,r){"use strict";const o=r(87);const s=new Map([[19,"Catalina"],[18,"Mojave"],[17,"High Sierra"],[16,"Sierra"],[15,"El Capitan"],[14,"Yosemite"],[13,"Mavericks"],[12,"Mountain Lion"],[11,"Lion"],[10,"Snow Leopard"],[9,"Leopard"],[8,"Tiger"],[7,"Panther"],[6,"Jaguar"],[5,"Puma"]]);const n=e=>{e=Number((e||o.release()).split(".")[0]);return{name:s.get(e),version:"10."+(e-4)}};e.exports=n;e.exports.default=n},122: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())})};var a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.BlockchainPoster=void 0;const c=n(r(470));const u=a(r(454));class BlockchainPoster{constructor(e){this.settings=e}postToBlockchain(e){return i(this,void 0,void 0,function*(){if(!this.settings.blockchainStorageFlag){return}c.debug("Posting signature event to blockchain.");try{const t={method:"POST",headers:{Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(e)};c.debug(`Webhook contents: ${JSON.stringify(t)}`);const r=yield u.default(this.settings.blockchainWebhookEndpoint,t);const o=yield r.json();c.debug("the response of the webhook is "+JSON.stringify(o));if(o.success){c.debug("the response2 of the webhook is "+JSON.stringify(o));return o}}catch(e){c.error("The webhook post request for storing signatures in smart contract failed"+e)}})}}t.BlockchainPoster=BlockchainPoster},127: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(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(539));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},129:function(e){e.exports=require("child_process")},131: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.run=void 0;const a=n(r(470));const c=r(207);const u=n(r(973));function run(){return i(this,void 0,void 0,function*(){try{const e=new c.ClaRunner({inputSettings:u.getInputs()});a.info("Starting CLA Assistant GitHub Action");yield e.execute();a.info("CLA processing complete.")}catch(e){a.setFailed(`Error: "${e.message}" Details: "${JSON.stringify(e)}"`)}})}t.run=run;run()},141:function(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{const c=e=>{if(e){e.bufferedData=n.getBufferedValue()}a(e)};n=o(e,s(t),e=>{if(e){c(e);return}i()});n.on("data",()=>{if(n.getBufferedLength()>r){c(new MaxBufferError)}})}).then(()=>n.getBufferedValue())}e.exports=getStream;e.exports.buffer=((e,t)=>getStream(e,Object.assign({},t,{encoding:"buffer"})));e.exports.array=((e,t)=>getStream(e,Object.assign({},t,{array:true})));e.exports.MaxBufferError=MaxBufferError},168:function(e){"use strict";const t=["stdin","stdout","stderr"];const r=e=>t.some(t=>Boolean(e[t]));e.exports=(e=>{if(!e){return null}if(e.stdio&&r(e)){throw new Error(`It's not possible to provide \`stdio\` in combination with one of ${t.map(e=>`\`${e}\``).join(", ")}`)}if(typeof e.stdio==="string"){return e.stdio}const o=e.stdio||[];if(!Array.isArray(o)){throw new TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof o}\``)}const s=[];const n=Math.max(o.length,t.length);for(let r=0;r!this.whitelist.isUserWhitelisted(e)&&!t.includes(e.name));if(r.length===0){a.info("No committers left after whitelisting. Approving pull request.");return true}a.debug(`Found a total of ${r.length} authors after whitelisting.`);a.debug(`Authors: ${r.map(e=>e.name).join(", ")}`);const o=yield this.claFileRepository.getClaFile();let s=o.mapSignedAuthors(r);let n=o.addSignature(yield this.pullComments.getNewSignatures(s));if(n.length>0){const e=n.map(e=>e.name).join(", ");a.debug(`Found new signatures: ${e}.`);s=o.mapSignedAuthors(r);yield Promise.all([this.claFileRepository.commitClaFile(`Add ${e}.`),this.blockchainPoster.postToBlockchain(n),this.pullComments.setClaComment(s),this.pullCheckRunner.rerunLastCheck()])}else{yield this.pullComments.setClaComment(s)}if(!s.allSigned()){a.setFailed("Waiting on additional CLA signatures.");return false}return true})}lockPullRequest(){return i(this,void 0,void 0,function*(){a.info(`Locking pull request #${this.settings.pullRequestNumber} to safe guard the pull request's CLA signatures.`);try{yield this.settings.octokitLocal.issues.lock({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName,issue_number:this.settings.pullRequestNumber});a.info(`Successfully locked pull request #${this.settings.pullRequestNumber}.`)}catch(e){a.error(`Failed to lock pull request #${this.settings.pullRequestNumber}.`)}})}getOrganizationMembers(){return i(this,void 0,void 0,function*(){if(!this.settings.allowOrganizationMembers){return[]}const e=yield this.settings.octokitLocal.orgs.listMembers({org:this.settings.localRepositoryOwner});return e.data.map(e=>e.login)})}}t.ClaRunner=ClaRunner},211:function(e){e.exports=require("https")},260:function(e,t,r){var o=r(357);var s=r(654);var n=/^win/i.test(process.platform);var i=r(614);if(typeof i!=="function"){i=i.EventEmitter}var a;if(process.__signal_exit_emitter__){a=process.__signal_exit_emitter__}else{a=process.__signal_exit_emitter__=new i;a.count=0;a.emitted={}}if(!a.infinite){a.setMaxListeners(Infinity);a.infinite=true}e.exports=function(e,t){o.equal(typeof e,"function","a callback must be provided for exit handler");if(u===false){load()}var r="exit";if(t&&t.alwaysLast){r="afterexit"}var s=function(){a.removeListener(r,e);if(a.listeners("exit").length===0&&a.listeners("afterexit").length===0){unload()}};a.on(r,e);return s};e.exports.unload=unload;function unload(){if(!u){return}u=false;s.forEach(function(e){try{process.removeListener(e,c[e])}catch(e){}});process.emit=p;process.reallyExit=l;a.count-=1}function emit(e,t,r){if(a.emitted[e]){return}a.emitted[e]=true;a.emit(e,t,r)}var c={};s.forEach(function(e){c[e]=function listener(){var t=process.listeners(e);if(t.length===a.count){unload();emit("exit",null,e);emit("afterexit",null,e);if(n&&e==="SIGHUP"){e="SIGINT"}process.kill(process.pid,e)}}});e.exports.signals=function(){return s};e.exports.load=load;var u=false;function load(){if(u){return}u=true;a.count+=1;s=s.filter(function(e){try{process.on(e,c[e]);return true}catch(e){return false}});process.emit=processEmit;process.reallyExit=processReallyExit}var l=process.reallyExit;function processReallyExit(e){process.exitCode=e||0;emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);l.call(process,process.exitCode)}var p=process.emit;function processEmit(e,t){if(e==="exit"){if(t!==undefined){process.exitCode=t}var r=p.apply(this,arguments);emit("exit",process.exitCode,null);emit("afterexit",process.exitCode,null);return r}else{return p.apply(this,arguments)}}},262:function(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(){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}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},280:function(e,t){t=e.exports=SemVer;var r;if(typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)){r=function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER");console.log.apply(console,e)}}else{r=function(){}}t.SEMVER_SPEC_VERSION="2.0.0";var o=256;var s=Number.MAX_SAFE_INTEGER||9007199254740991;var n=16;var i=t.re=[];var a=t.src=[];var c=0;var u=c++;a[u]="0|[1-9]\\d*";var l=c++;a[l]="[0-9]+";var p=c++;a[p]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=c++;a[d]="("+a[u]+")\\."+"("+a[u]+")\\."+"("+a[u]+")";var f=c++;a[f]="("+a[l]+")\\."+"("+a[l]+")\\."+"("+a[l]+")";var m=c++;a[m]="(?:"+a[u]+"|"+a[p]+")";var h=c++;a[h]="(?:"+a[l]+"|"+a[p]+")";var g=c++;a[g]="(?:-("+a[m]+"(?:\\."+a[m]+")*))";var w=c++;a[w]="(?:-?("+a[h]+"(?:\\."+a[h]+")*))";var y=c++;a[y]="[0-9A-Za-z-]+";var b=c++;a[b]="(?:\\+("+a[y]+"(?:\\."+a[y]+")*))";var v=c++;var T="v?"+a[d]+a[g]+"?"+a[b]+"?";a[v]="^"+T+"$";var E="[v=\\s]*"+a[f]+a[w]+"?"+a[b]+"?";var _=c++;a[_]="^"+E+"$";var O=c++;a[O]="((?:<|>)?=?)";var P=c++;a[P]=a[l]+"|x|X|\\*";var S=c++;a[S]=a[u]+"|x|X|\\*";var R=c++;a[R]="[v=\\s]*("+a[S]+")"+"(?:\\.("+a[S]+")"+"(?:\\.("+a[S]+")"+"(?:"+a[g]+")?"+a[b]+"?"+")?)?";var k=c++;a[k]="[v=\\s]*("+a[P]+")"+"(?:\\.("+a[P]+")"+"(?:\\.("+a[P]+")"+"(?:"+a[w]+")?"+a[b]+"?"+")?)?";var C=c++;a[C]="^"+a[O]+"\\s*"+a[R]+"$";var A=c++;a[A]="^"+a[O]+"\\s*"+a[k]+"$";var x=c++;a[x]="(?:^|[^\\d])"+"(\\d{1,"+n+"})"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:\\.(\\d{1,"+n+"}))?"+"(?:$|[^\\d])";var j=c++;a[j]="(?:~>?)";var G=c++;a[G]="(\\s*)"+a[j]+"\\s+";i[G]=new RegExp(a[G],"g");var U="$1~";var q=c++;a[q]="^"+a[j]+a[R]+"$";var F=c++;a[F]="^"+a[j]+a[k]+"$";var D=c++;a[D]="(?:\\^)";var L=c++;a[L]="(\\s*)"+a[D]+"\\s+";i[L]=new RegExp(a[L],"g");var B="$1^";var I=c++;a[I]="^"+a[D]+a[R]+"$";var H=c++;a[H]="^"+a[D]+a[k]+"$";var N=c++;a[N]="^"+a[O]+"\\s*("+E+")$|^$";var $=c++;a[$]="^"+a[O]+"\\s*("+T+")$|^$";var M=c++;a[M]="(\\s*)"+a[O]+"\\s*("+E+"|"+a[R]+")";i[M]=new RegExp(a[M],"g");var V="$1$2$3";var z=c++;a[z]="^\\s*("+a[R]+")"+"\\s+-\\s+"+"("+a[R]+")"+"\\s*$";var W=c++;a[W]="^\\s*("+a[k]+")"+"\\s+-\\s+"+"("+a[k]+")"+"\\s*$";var J=c++;a[J]="(<|>)?=?\\s*\\*";for(var K=0;Ko){return null}var r=t.loose?i[_]:i[v];if(!r.test(e)){return null}try{return new SemVer(e,t)}catch(e){return null}}t.valid=valid;function valid(e,t){var r=parse(e,t);return r?r.version:null}t.clean=clean;function clean(e,t){var r=parse(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}t.SemVer=SemVer;function SemVer(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof SemVer){if(e.loose===t.loose){return e}else{e=e.version}}else if(typeof e!=="string"){throw new TypeError("Invalid Version: "+e)}if(e.length>o){throw new TypeError("version is longer than "+o+" characters")}if(!(this instanceof SemVer)){return new SemVer(e,t)}r("SemVer",e,t);this.options=t;this.loose=!!t.loose;var n=e.trim().match(t.loose?i[_]:i[v]);if(!n){throw new TypeError("Invalid Version: "+e)}this.raw=e;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>s||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>s||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>s||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0){if(typeof this.prerelease[r]==="number"){this.prerelease[r]++;r=-2}}if(r===-1){this.prerelease.push(0)}}if(t){if(this.prerelease[0]===t){if(isNaN(this.prerelease[1])){this.prerelease=[t,0]}}else{this.prerelease=[t,0]}}break;default:throw new Error("invalid increment argument: "+e)}this.format();this.raw=this.version;return this};t.inc=inc;function inc(e,t,r,o){if(typeof r==="string"){o=r;r=undefined}try{return new SemVer(e,r).inc(t,o).version}catch(e){return null}}t.diff=diff;function diff(e,t){if(eq(e,t)){return null}else{var r=parse(e);var o=parse(t);var s="";if(r.prerelease.length||o.prerelease.length){s="pre";var n="prerelease"}for(var i in r){if(i==="major"||i==="minor"||i==="patch"){if(r[i]!==o[i]){return s+i}}}return n}}t.compareIdentifiers=compareIdentifiers;var X=/^[0-9]+$/;function compareIdentifiers(e,t){var r=X.test(e);var o=X.test(t);if(r&&o){e=+e;t=+t}return e===t?0:r&&!o?-1:o&&!r?1:e0}t.lt=lt;function lt(e,t,r){return compare(e,t,r)<0}t.eq=eq;function eq(e,t,r){return compare(e,t,r)===0}t.neq=neq;function neq(e,t,r){return compare(e,t,r)!==0}t.gte=gte;function gte(e,t,r){return compare(e,t,r)>=0}t.lte=lte;function lte(e,t,r){return compare(e,t,r)<=0}t.cmp=cmp;function cmp(e,t,r,o){switch(t){case"===":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e===r;case"!==":if(typeof e==="object")e=e.version;if(typeof r==="object")r=r.version;return e!==r;case"":case"=":case"==":return eq(e,r,o);case"!=":return neq(e,r,o);case">":return gt(e,r,o);case">=":return gte(e,r,o);case"<":return lt(e,r,o);case"<=":return lte(e,r,o);default:throw new TypeError("Invalid operator: "+t)}}t.Comparator=Comparator;function Comparator(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Comparator){if(e.loose===!!t.loose){return e}else{e=e.value}}if(!(this instanceof Comparator)){return new Comparator(e,t)}r("comparator",e,t);this.options=t;this.loose=!!t.loose;this.parse(e);if(this.semver===Y){this.value=""}else{this.value=this.operator+this.semver.version}r("comp",this)}var Y={};Comparator.prototype.parse=function(e){var t=this.options.loose?i[N]:i[$];var r=e.match(t);if(!r){throw new TypeError("Invalid comparator: "+e)}this.operator=r[1];if(this.operator==="="){this.operator=""}if(!r[2]){this.semver=Y}else{this.semver=new SemVer(r[2],this.options.loose)}};Comparator.prototype.toString=function(){return this.value};Comparator.prototype.test=function(e){r("Comparator.test",e,this.options.loose);if(this.semver===Y){return true}if(typeof e==="string"){e=new SemVer(e,this.options)}return cmp(e,this.operator,this.semver,this.options)};Comparator.prototype.intersects=function(e,t){if(!(e instanceof Comparator)){throw new TypeError("a Comparator is required")}if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}var r;if(this.operator===""){r=new Range(e.value,t);return satisfies(this.value,r,t)}else if(e.operator===""){r=new Range(this.value,t);return satisfies(e.semver,r,t)}var o=(this.operator===">="||this.operator===">")&&(e.operator===">="||e.operator===">");var s=(this.operator==="<="||this.operator==="<")&&(e.operator==="<="||e.operator==="<");var n=this.semver.version===e.semver.version;var i=(this.operator===">="||this.operator==="<=")&&(e.operator===">="||e.operator==="<=");var a=cmp(this.semver,"<",e.semver,t)&&((this.operator===">="||this.operator===">")&&(e.operator==="<="||e.operator==="<"));var c=cmp(this.semver,">",e.semver,t)&&((this.operator==="<="||this.operator==="<")&&(e.operator===">="||e.operator===">"));return o||s||n&&i||a||c};t.Range=Range;function Range(e,t){if(!t||typeof t!=="object"){t={loose:!!t,includePrerelease:false}}if(e instanceof Range){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease){return e}else{return new Range(e.raw,t)}}if(e instanceof Comparator){return new Range(e.value,t)}if(!(this instanceof Range)){return new Range(e,t)}this.options=t;this.loose=!!t.loose;this.includePrerelease=!!t.includePrerelease;this.raw=e;this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length});if(!this.set.length){throw new TypeError("Invalid SemVer Range: "+e)}this.format()}Range.prototype.format=function(){this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim();return this.range};Range.prototype.toString=function(){return this.range};Range.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var o=t?i[W]:i[z];e=e.replace(o,hyphenReplace);r("hyphen replace",e);e=e.replace(i[M],V);r("comparator trim",e,i[M]);e=e.replace(i[G],U);e=e.replace(i[L],B);e=e.split(/\s+/).join(" ");var s=t?i[N]:i[$];var n=e.split(" ").map(function(e){return parseComparator(e,this.options)},this).join(" ").split(/\s+/);if(this.options.loose){n=n.filter(function(e){return!!e.match(s)})}n=n.map(function(e){return new Comparator(e,this.options)},this);return n};Range.prototype.intersects=function(e,t){if(!(e instanceof Range)){throw new TypeError("a Range is required")}return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})};t.toComparators=toComparators;function toComparators(e,t){return new Range(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})}function parseComparator(e,t){r("comp",e,t);e=replaceCarets(e,t);r("caret",e);e=replaceTildes(e,t);r("tildes",e);e=replaceXRanges(e,t);r("xrange",e);e=replaceStars(e,t);r("stars",e);return e}function isX(e){return!e||e.toLowerCase()==="x"||e==="*"}function replaceTildes(e,t){return e.trim().split(/\s+/).map(function(e){return replaceTilde(e,t)}).join(" ")}function replaceTilde(e,t){var o=t.loose?i[F]:i[q];return e.replace(o,function(t,o,s,n,i){r("tilde",e,t,o,s,n,i);var a;if(isX(o)){a=""}else if(isX(s)){a=">="+o+".0.0 <"+(+o+1)+".0.0"}else if(isX(n)){a=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"}else if(i){r("replaceTilde pr",i);a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+(+s+1)+".0"}else{a=">="+o+"."+s+"."+n+" <"+o+"."+(+s+1)+".0"}r("tilde return",a);return a})}function replaceCarets(e,t){return e.trim().split(/\s+/).map(function(e){return replaceCaret(e,t)}).join(" ")}function replaceCaret(e,t){r("caret",e,t);var o=t.loose?i[H]:i[I];return e.replace(o,function(t,o,s,n,i){r("caret",e,t,o,s,n,i);var a;if(isX(o)){a=""}else if(isX(s)){a=">="+o+".0.0 <"+(+o+1)+".0.0"}else if(isX(n)){if(o==="0"){a=">="+o+"."+s+".0 <"+o+"."+(+s+1)+".0"}else{a=">="+o+"."+s+".0 <"+(+o+1)+".0.0"}}else if(i){r("replaceCaret pr",i);if(o==="0"){if(s==="0"){a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+s+"."+(+n+1)}else{a=">="+o+"."+s+"."+n+"-"+i+" <"+o+"."+(+s+1)+".0"}}else{a=">="+o+"."+s+"."+n+"-"+i+" <"+(+o+1)+".0.0"}}else{r("no pr");if(o==="0"){if(s==="0"){a=">="+o+"."+s+"."+n+" <"+o+"."+s+"."+(+n+1)}else{a=">="+o+"."+s+"."+n+" <"+o+"."+(+s+1)+".0"}}else{a=">="+o+"."+s+"."+n+" <"+(+o+1)+".0.0"}}r("caret return",a);return a})}function replaceXRanges(e,t){r("replaceXRanges",e,t);return e.split(/\s+/).map(function(e){return replaceXRange(e,t)}).join(" ")}function replaceXRange(e,t){e=e.trim();var o=t.loose?i[A]:i[C];return e.replace(o,function(t,o,s,n,i,a){r("xRange",e,t,o,s,n,i,a);var c=isX(s);var u=c||isX(n);var l=u||isX(i);var p=l;if(o==="="&&p){o=""}if(c){if(o===">"||o==="<"){t="<0.0.0"}else{t="*"}}else if(o&&p){if(u){n=0}i=0;if(o===">"){o=">=";if(u){s=+s+1;n=0;i=0}else{n=+n+1;i=0}}else if(o==="<="){o="<";if(u){s=+s+1}else{n=+n+1}}t=o+s+"."+n+"."+i}else if(u){t=">="+s+".0.0 <"+(+s+1)+".0.0"}else if(l){t=">="+s+"."+n+".0 <"+s+"."+(+n+1)+".0"}r("xRange return",t);return t})}function replaceStars(e,t){r("replaceStars",e,t);return e.trim().replace(i[J],"")}function hyphenReplace(e,t,r,o,s,n,i,a,c,u,l,p,d){if(isX(r)){t=""}else if(isX(o)){t=">="+r+".0.0"}else if(isX(s)){t=">="+r+"."+o+".0"}else{t=">="+t}if(isX(c)){a=""}else if(isX(u)){a="<"+(+c+1)+".0.0"}else if(isX(l)){a="<"+c+"."+(+u+1)+".0"}else if(p){a="<="+c+"."+u+"."+l+"-"+p}else{a="<="+a}return(t+" "+a).trim()}Range.prototype.test=function(e){if(!e){return false}if(typeof e==="string"){e=new SemVer(e,this.options)}for(var t=0;t0){var n=e[s].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch){return true}}}return false}return true}t.satisfies=satisfies;function satisfies(e,t,r){try{t=new Range(t,r)}catch(e){return false}return t.test(e)}t.maxSatisfying=maxSatisfying;function maxSatisfying(e,t,r){var o=null;var s=null;try{var n=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(n.test(e)){if(!o||s.compare(e)===-1){o=e;s=new SemVer(o,r)}}});return o}t.minSatisfying=minSatisfying;function minSatisfying(e,t,r){var o=null;var s=null;try{var n=new Range(t,r)}catch(e){return null}e.forEach(function(e){if(n.test(e)){if(!o||s.compare(e)===1){o=e;s=new SemVer(o,r)}}});return o}t.minVersion=minVersion;function minVersion(e,t){e=new Range(e,t);var r=new SemVer("0.0.0");if(e.test(r)){return r}r=new SemVer("0.0.0-0");if(e.test(r)){return r}r=null;for(var o=0;o":if(t.prerelease.length===0){t.patch++}else{t.prerelease.push(0)}t.raw=t.format();case"":case">=":if(!r||gt(r,t)){r=t}break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}})}if(r&&e.test(r)){return r}return null}t.validRange=validRange;function validRange(e,t){try{return new Range(e,t).range||"*"}catch(e){return null}}t.ltr=ltr;function ltr(e,t,r){return outside(e,t,"<",r)}t.gtr=gtr;function gtr(e,t,r){return outside(e,t,">",r)}t.outside=outside;function outside(e,t,r,o){e=new SemVer(e,o);t=new Range(t,o);var s,n,i,a,c;switch(r){case">":s=gt;n=lte;i=lt;a=">";c=">=";break;case"<":s=lt;n=gte;i=gt;a="<";c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(satisfies(e,t,o)){return false}for(var u=0;u=0.0.0")}p=p||e;d=d||e;if(s(e.semver,p.semver,o)){p=e}else if(i(e.semver,d.semver,o)){d=e}});if(p.operator===a||p.operator===c){return false}if((!d.operator||d.operator===a)&&n(e,d.semver)){return false}else if(d.operator===c&&i(e,d.semver)){return false}}return true}t.prerelease=prerelease;function prerelease(e,t){var r=parse(e,t);return r&&r.prerelease.length?r.prerelease:null}t.intersects=intersects;function intersects(e,t,r){e=new Range(e,r);t=new Range(t,r);return e.intersects(t)}t.coerce=coerce;function coerce(e){if(e instanceof SemVer){return e}if(typeof e!=="string"){return null}var t=e.match(i[x]);if(t==null){return null}return parse(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},299:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:true});const r="2.2.1";function normalizePaginatedListResponse(e){const t="total_count"in e.data&&!("url"in e.data);if(!t)return e;const r=e.data.incomplete_results;const o=e.data.repository_selection;const s=e.data.total_count;delete e.data.incomplete_results;delete e.data.repository_selection;delete e.data.total_count;const n=Object.keys(e.data)[0];const i=e.data[n];e.data=i;if(typeof r!=="undefined"){e.data.incomplete_results=r}if(typeof o!=="undefined"){e.data.repository_selection=o}e.data.total_count=s;return e}function iterator(e,t,r){const o=typeof t==="function"?t.endpoint(r):e.request.endpoint(t,r);const s=typeof t==="function"?t:e.request;const n=o.method;const i=o.headers;let a=o.url;return{[Symbol.asyncIterator]:()=>({next(){if(!a){return Promise.resolve({done:true})}return s({method:n,url:a,headers:i}).then(normalizePaginatedListResponse).then(e=>{a=((e.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1];return{value:e}})}})}}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)})}function paginateRest(e){return{paginate:Object.assign(paginate.bind(null,e),{iterator:iterator.bind(null,e)})}}paginateRest.VERSION=r;t.paginateRest=paginateRest},323:function(e){"use strict";var t=e.exports=function(e){return e!==null&&typeof e==="object"&&typeof e.pipe==="function"};t.writable=function(e){return t(e)&&e.writable!==false&&typeof e._write==="function"&&typeof e._writableState==="object"};t.readable=function(e){return t(e)&&e.readable!==false&&typeof e._read==="function"&&typeof e._readableState==="object"};t.duplex=function(e){return t.writable(e)&&t.readable(e)};t.transform=function(e){return t.duplex(e)&&typeof e._transform==="function"&&typeof e._transformState==="object"}},345: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.Whitelist=void 0;const i=n(r(470));class Whitelist{constructor(e){this.reRegExpChar=/[\\^$.*+\-?()[\]{}|]/g;this.reHasRegExpChar=RegExp(this.reRegExpChar.source);this.whitelist=(e||"").split(",").map(e=>e.trim())}isUserWhitelisted(e){return this.whitelist.some(t=>{let r=false;if(t.includes("*")){const o=this.escapeRegExp(t).split("\\*").join(".*");r=new RegExp(o).test(e.name)}else{r=t===e.name}if(r){i.info(`Whitelisted author ${e.name} excluded from CLA requirement.`)}return r})}escapeRegExp(e){return e&&this.reHasRegExpChar.test(e)?e.replace(this.reRegExpChar,"\\$&"):e||""}}t.Whitelist=Whitelist},357:function(e){e.exports=require("assert")},363:function(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)()})}},385:function(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(696));var s=r(796);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(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 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);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.2";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},389:function(e,t,r){"use strict";const o=r(747);const s=r(866);function readShebang(e){const t=150;let r;if(Buffer.alloc){r=Buffer.alloc(t)}else{r=new Buffer(t);r.fill(0)}let n;try{n=o.openSync(e,"r");o.readSync(n,r,0,t,0);o.closeSync(n)}catch(e){}return s(r.toString())}e.exports=readShebang},413:function(e){e.exports=require("stream")},427:function(e,t,r){"use strict";const o=r(669);let s;if(typeof o.getSystemErrorName==="function"){e.exports=o.getSystemErrorName}else{try{s=process.binding("uv");if(typeof s.errname!=="function"){throw new TypeError("uv.errname is not a function")}}catch(e){console.error("execa/lib/errname: unable to establish process.binding('uv')",e);s=null}e.exports=(e=>errname(s,e))}e.exports.__test__=errname;function errname(e,t){if(e){return e.errname(t)}if(!(t<0)){throw new Error("err >= 0")}return`Unknown system error ${t}`}},431:function(e,t,r){"use strict";var o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const s=o(r(87));function issueCommand(e,t,r){const o=new Command(e,t,r);process.stdout.write(o.toString()+s.EOL)}t.issueCommand=issueCommand;function issue(e,t=""){issueCommand(e,{},t)}t.issue=issue;const n="::";class Command{constructor(e,t,r){if(!e){e="missing.command"}this.command=e;this.properties=t;this.message=r}toString(){let e=n+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+=`${n}${escapeData(this.message)}`;return e}}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;function escapeData(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A")}function escapeProperty(e){return toCommandValue(e).replace(/%/g,"%25").replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/:/g,"%3A").replace(/,/g,"%2C")}},448:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var o=r(796);var s=r(523);var n=r(753);var i=r(898);var a=r(813);function _defineProperty(e,t,r){if(t in e){Object.defineProperty(e,t,{value:r,enumerable:true,configurable:true,writable:true})}else{e[t]=r}return e}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{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(_objectSpread2(_objectSpread2({},r),{},{baseUrl:r.baseUrl.replace(/\/api\/v3$/,"/api")}));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 r=e.authStrategy(Object.assign({request:this.request},e.auth));t.wrap("request",r.hook);this.auth=r}const u=this.constructor;u.plugins.forEach(t=>{Object.assign(this,t(this,e))})}static defaults(e){const t=class extends(this){constructor(...t){const r=t[0]||{};super(Object.assign({},e,r,r.userAgent&&e.userAgent?{userAgent:`${r.userAgent} ${e.userAgent}`}:null))}};return t}static plugin(e,...t){var r;if(e instanceof Array){console.warn(["Passing an array of plugins to Octokit.plugin() has been deprecated.","Instead of:"," Octokit.plugin([plugin1, plugin2, ...])","Use:"," Octokit.plugin(plugin1, plugin2, ...)"].join("\n"))}const o=this.plugins;let s=[...e instanceof Array?e:[e],...t];const n=(r=class extends(this){},r.plugins=o.concat(s.filter(e=>!o.includes(e))),r);return n}}Octokit.VERSION=c;Octokit.plugins=[];return Octokit})();t.Octokit=u},453:function(e,t,r){var o=r(969);var s=r(9);var n=r(747);var i=function(){};var a=/^v?\.0/.test(process.version);var c=function(e){return typeof e==="function"};var u=function(e){if(!a)return false;if(!n)return false;return(e instanceof(n.ReadStream||i)||e instanceof(n.WriteStream||i))&&c(e.close)};var l=function(e){return e.setHeader&&c(e.abort)};var p=function(e,t,r,n){n=o(n);var a=false;e.on("close",function(){a=true});s(e,{readable:t,writable:r},function(e){if(e)return n(e);a=true;n()});var p=false;return function(t){if(a)return;if(p)return;p=true;if(u(e))return e.close(i);if(l(e))return e.abort();if(c(e.destroy))return e.destroy();n(t||new Error("stream was destroyed"))}};var d=function(e){e()};var f=function(e,t){return e.pipe(t)};var m=function(){var e=Array.prototype.slice.call(arguments);var t=c(e[e.length-1]||i)&&e.pop()||i;if(Array.isArray(e[0]))e=e[0];if(e.length<2)throw new Error("pump requires two streams per minimum");var r;var o=e.map(function(s,n){var i=n0;return p(s,i,a,function(e){if(!r)r=e;if(e)o.forEach(d);if(i)return;o.forEach(d);t(r)})});return e.reduce(f)};e.exports=m},454:function(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[g]=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[g],e);if(t===undefined){return null}return this[g][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[g]).sort();return r.map(t==="key"?function(e){return e.toLowerCase()}:t==="value"?function(t){return e[g][t].join(", ")}:function(t){return[t.toLowerCase(),e[g][t].join(", ")]})}const w=Symbol("internal");function createHeadersIterator(e,t){const r=Object.create(y);r[w]={target:e,kind:t,index:0};return r}const y=Object.setPrototypeOf({next(){if(!this||Object.getPrototypeOf(this)!==y){throw new TypeError("Value of `this` is not a HeadersIterator")}var e=this[w];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[w].index=o+1;return{value:s[o],done:false}}},Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]())));Object.defineProperty(y,Symbol.toStringTag,{value:"HeadersIterator",writable:false,enumerable:false,configurable:true});function exportNodeCompatibleHeaders(e){const t=Object.assign({__proto__:null},e[g]);const r=find(e[g],"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(m.test(r)){continue}if(Array.isArray(e[r])){for(const o of e[r]){if(h.test(o)){continue}if(t[g][r]===undefined){t[g][r]=[o]}else{t[g][r].push(o)}}}else if(!h.test(e[r])){t[g][r]=[e[r]]}}return t}const b=Symbol("Response internals");const v=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[b]={url:t.url,status:r,statusText:t.statusText||v[r],headers:o,counter:t.counter}}get url(){return this[b].url||""}get status(){return this[b].status}get ok(){return this[b].status>=200&&this[b].status<300}get redirected(){return this[b].counter>0}get statusText(){return this[b].statusText}get headers(){return this[b].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 T=Symbol("Request internals");const E=n.parse;const _=n.format;const O="destroy"in o.Readable.prototype;function isRequest(e){return typeof e==="object"&&typeof e[T]==="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(e.href)}else{r=E(`${e}`)}e={}}else{r=E(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[T]={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[T].method}get url(){return _(this[T].parsedURL)}get headers(){return this[T].headers}get redirect(){return this[T].redirect}get signal(){return this[T].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[T].parsedURL;const r=new Headers(e[T].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 P=o.PassThrough;const S=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 f=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){f();return}const m=function abortAndFinalize(){f();finalize()};const h=l(u);let g;if(p){p.addEventListener("abort",m)}function finalize(){h.abort();if(p)p.removeEventListener("abort",m);clearTimeout(g)}if(c.timeout){h.once("socket",function(e){g=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(g);const t=createHeadersLenient(e.headers);if(fetch.isRedirect(e.statusCode)){const o=t.get("Location");const s=o===null?null:S(c.url,o);switch(c.redirect){case"error":n(new FetchError(`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};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",m)});let o=e.pipe(new P);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 P);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},462:function(e){"use strict";const t=/([()\][%!^"`<>&|;, *?])/g;function escapeCommand(e){e=e.replace(t,"^$1");return e}function escapeArgument(e,r){e=`${e}`;e=e.replace(/(\\*)"/g,'$1$1\\"');e=e.replace(/(\\*)$/,"$1$1");e=`"${e}"`;e=e.replace(t,"^$1");if(r){e=e.replace(t,"^$1")}return e}e.exports.command=escapeCommand;e.exports.argument=escapeArgument},463:function(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(692);var s=_interopDefault(r(969));const n=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;Object.defineProperty(this,"code",{get(){n(new o.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));return t}});this.headers=r.headers||{};const s=Object.assign({},r.request);if(r.request.headers.authorization){s.headers=Object.assign({},r.request.headers,{authorization:r.request.headers.authorization.replace(/ .*$/," [REDACTED]")})}s.url=s.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]");this.request=s}}t.RequestError=RequestError},469: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(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(262));const a=r(521);t.context=new i.Context;function getOctokit(e,t){return new a.GitHub(a.getOctokitOptions(e,t))}t.getOctokit=getOctokit},470:function(e,t,r){"use strict";var o=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())})};var s=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)if(Object.hasOwnProperty.call(e,r))t[r]=e[r];t["default"]=e;return t};Object.defineProperty(t,"__esModule",{value:true});const n=r(431);const i=s(r(87));const a=s(r(622));var c;(function(e){e[e["Success"]=0]="Success";e[e["Failure"]=1]="Failure"})(c=t.ExitCode||(t.ExitCode={}));function exportVariable(e,t){const r=n.toCommandValue(t);process.env[e]=r;n.issueCommand("set-env",{name:e},r)}t.exportVariable=exportVariable;function setSecret(e){n.issueCommand("add-mask",{},e)}t.setSecret=setSecret;function addPath(e){n.issueCommand("add-path",{},e);process.env["PATH"]=`${e}${a.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}`)}return r.trim()}t.getInput=getInput;function setOutput(e,t){n.issueCommand("set-output",{name:e},t)}t.setOutput=setOutput;function setCommandEcho(e){n.issue("echo",e?"on":"off")}t.setCommandEcho=setCommandEcho;function setFailed(e){process.exitCode=c.Failure;error(e)}t.setFailed=setFailed;function isDebug(){return process.env["RUNNER_DEBUG"]==="1"}t.isDebug=isDebug;function debug(e){n.issueCommand("debug",{},e)}t.debug=debug;function error(e){n.issue("error",e instanceof Error?e.toString():e)}t.error=error;function warning(e){n.issue("warning",e instanceof Error?e.toString():e)}t.warning=warning;function info(e){process.stdout.write(e+i.EOL)}t.info=info;function startGroup(e){n.issue("group",e)}t.startGroup=startGroup;function endGroup(){n.issue("endgroup")}t.endGroup=endGroup;function group(e,t){return o(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){n.issueCommand("save-state",{name:e},t)}t.saveState=saveState;function getState(e){return process.env[`STATE_${e}`]||""}t.getState=getState},489:function(e,t,r){"use strict";const o=r(622);const s=r(814);const n=r(39)();function resolveCommandAttempt(e,t){const r=process.cwd();const i=e.options.cwd!=null;if(i){try{process.chdir(e.options.cwd)}catch(e){}}let a;try{a=s.sync(e.command,{path:(e.options.env||process.env)[n],pathExt:t?o.delimiter:undefined})}catch(e){}finally{process.chdir(r)}if(a){a=o.resolve(i?e.options.cwd:"",a)}return a}function resolveCommand(e){return resolveCommandAttempt(e)||resolveCommandAttempt(e,true)}e.exports=resolveCommand},510:function(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})}},521: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(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(262));const a=n(r(127));const c=r(448);const u=r(842);const l=r(299);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},523:function(e,t,r){var o=r(363);var s=r(510);var n=r(763);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},539:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const o=r(835);const s=r(605);const n=r(211);const i=r(950);let a;var c;(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"})(c=t.HttpCodes||(t.HttpCodes={}));var u;(function(e){e["Accept"]="accept";e["ContentType"]="content-type"})(u=t.Headers||(t.Headers={}));var l;(function(e){e["ApplicationJson"]="application/json"})(l=t.MediaTypes||(t.MediaTypes={}));function getProxyUrl(e){let t=i.getProxyUrl(o.parse(e));return t?t.href:""}t.getProxyUrl=getProxyUrl;const p=[c.MovedPermanently,c.ResourceMoved,c.SeeOther,c.TemporaryRedirect,c.PermanentRedirect];const d=[c.BadGateway,c.ServiceUnavailable,c.GatewayTimeout];const f=["OPTIONS","GET","DELETE","HEAD"];const m=10;const h=5;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=o.parse(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[u.Accept]=this._getExistingOrDefaultHeader(t,u.Accept,l.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[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.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[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.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[u.Accept]=this._getExistingOrDefaultHeader(r,u.Accept,l.ApplicationJson);r[u.ContentType]=this._getExistingOrDefaultHeader(r,u.ContentType,l.ApplicationJson);let s=await this.patch(e,o,r);return this._processResponse(s,this.requestOptions)}async request(e,t,r,s){if(this._disposed){throw new Error("Client has already been disposed.")}let n=o.parse(t);let i=this._prepareRequest(e,n,s);let a=this._allowRetries&&f.indexOf(e)!=-1?this._maxRetries+1:1;let u=0;let l;while(u0){const a=l.message.headers["location"];if(!a){break}let c=o.parse(a);if(n.protocol=="https:"&&n.protocol!=c.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 l.readBody();if(c.hostname!==n.hostname){for(let e in s){if(e.toLowerCase()==="authorization"){delete s[e]}}}i=this._prepareRequest(e,c,s);l=await this.requestRaw(i,r);t--}if(d.indexOf(l.message.statusCode)==-1){return l}u+=1;if(u{let s=function(e,t){if(e){o(e)}r(t)};this.requestRawWithCallback(e,t,s)})}requestRawWithCallback(e,t,r){let o;if(typeof t==="string"){e.options.headers["Content-Length"]=Buffer.byteLength(t,"utf8")}let s=false;let n=(e,t)=>{if(!s){s=true;r(e,t)}};let i=e.httpModule.request(e.options,e=>{let t=new HttpClientResponse(e);n(null,t)});i.on("socket",e=>{o=e});i.setTimeout(this._socketTimeout||3*6e4,()=>{if(o){o.end()}n(new Error("Request timeout: "+e.options.path),null)});i.on("error",function(e){n(e,null)});if(t&&typeof t==="string"){i.write(t,"utf8")}if(t&&typeof t!=="string"){t.on("close",function(){i.end()});t.pipe(i)}else{i.end()}}getAgent(e){let t=o.parse(e);return this._getAgent(t)}_prepareRequest(e,t,r){const o={};o.parsedUrl=t;const i=o.parsedUrl.protocol==="https:";o.httpModule=i?n:s;const a=i?443:80;o.options={};o.options.host=o.parsedUrl.hostname;o.options.port=o.parsedUrl.port?parseInt(o.parsedUrl.port):a;o.options.path=(o.parsedUrl.pathname||"")+(o.parsedUrl.search||"");o.options.method=e;o.options.headers=this._mergeHeaders(r);if(this.userAgent!=null){o.options.headers["user-agent"]=this.userAgent}o.options.agent=this._getAgent(o.parsedUrl);if(this.handlers){this.handlers.forEach(e=>{e.prepareRequest(o.options)})}return o}_mergeHeaders(e){const t=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});if(this.requestOptions&&this.requestOptions.headers){return Object.assign({},t(this.requestOptions.headers),t(e))}return t(e||{})}_getExistingOrDefaultHeader(e,t,r){const o=e=>Object.keys(e).reduce((t,r)=>(t[r.toLowerCase()]=e[r],t),{});let s;if(this.requestOptions&&this.requestOptions.headers){s=o(this.requestOptions.headers)[t]}return e[t]||s||r}_getAgent(e){let t;let o=i.getProxyUrl(e);let c=o&&o.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||s.globalAgent.maxSockets}if(c){if(!a){a=r(856)}const e={maxSockets:l,keepAlive:this._keepAlive,proxy:{proxyAuth:o.auth,host:o.hostname,port:o.port}};let s;const n=o.protocol==="https:";if(u){s=n?a.httpsOverHttps:a.httpsOverHttp}else{s=n?a.httpOverHttps:a.httpOverHttp}t=s(e);this._proxyAgent=t}if(this._keepAlive&&!t){const e={keepAlive:this._keepAlive,maxSockets:l};t=u?new n.Agent(e):new s.Agent(e);this._agent=t}if(!t){t=u?n.globalAgent:s.globalAgent}if(u&&this._ignoreSslError){t.options=Object.assign(t.options||{},{rejectUnauthorized:false})}return t}_performExponentialBackoff(e){e=Math.min(m,e);const t=h*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==c.NotFound){r(n)}let i;let a;try{a=await e.readBody();if(a&&a.length>0){if(t&&t.deserializeDates){i=JSON.parse(a,HttpClient.dateTimeDeserializer)}else{i=JSON.parse(a)}n.result=i}n.headers=e.message.headers}catch(e){}if(s>299){let e;if(i&&i.message){e=i.message}else if(a&&a.length>0){e=a}else{e="Failed request: ("+s+")"}let t=new Error(e);t["statusCode"]=s;if(n.result){t["result"]=n.result}o(t)}else{r(n)}})}}t.HttpClient=HttpClient},568:function(e,t,r){"use strict";const o=r(622);const s=r(948);const n=r(489);const i=r(462);const a=r(389);const c=r(280);const u=process.platform==="win32";const l=/\.(?:com|exe)$/i;const p=/node_modules[\\\/].bin[\\\/][^\\\/]+\.cmd$/i;const d=s(()=>c.satisfies(process.version,"^4.8.0 || ^5.7.0 || >= 6.0.0",true))||false;function detectShebang(e){e.file=n(e);const t=e.file&&a(e.file);if(t){e.args.unshift(e.file);e.command=t;return n(e)}return e.file}function parseNonShell(e){if(!u){return e}const t=detectShebang(e);const r=!l.test(t);if(e.options.forceShell||r){const r=p.test(t);e.command=o.normalize(e.command);e.command=i.command(e.command);e.args=e.args.map(e=>i.argument(e,r));const s=[e.command].concat(e.args).join(" ");e.args=["/d","/s","/c",`"${s}"`];e.command=process.env.comspec||"cmd.exe";e.options.windowsVerbatimArguments=true}return e}function parseShell(e){if(d){return e}const t=[e.command].concat(e.args).join(" ");if(u){e.command=typeof e.options.shell==="string"?e.options.shell:process.env.comspec||"cmd.exe";e.args=["/d","/s","/c",`"${t}"`];e.options.windowsVerbatimArguments=true}else{if(typeof e.options.shell==="string"){e.command=e.options.shell}else if(process.platform==="android"){e.command="/system/bin/sh"}else{e.command="/bin/sh"}e.args=["-c",t]}return e}function parse(e,t,r){if(t&&!Array.isArray(t)){r=t;t=null}t=t?t.slice(0):[];r=Object.assign({},r);const o={command:e,args:t,options:r,file:undefined,original:{command:e,args:t}};return r.shell?parseShell(o):parseNonShell(o)}e.exports=parse},605:function(e){e.exports=require("http")},614:function(e){e.exports=require("events")},621:function(e,t,r){"use strict";const o=r(622);const s=r(39);e.exports=(e=>{e=Object.assign({cwd:process.cwd(),path:process.env[s()]},e);let t;let r=o.resolve(e.cwd);const n=[];while(t!==r){n.push(o.join(r,"node_modules/.bin"));t=r;r=o.resolve(r,"..")}n.push(o.dirname(process.execPath));return n.concat(e.path).join(o.delimiter)});e.exports.env=(t=>{t=Object.assign({env:process.env},t);const r=Object.assign({},t.env);const o=s({env:r});t.path=r[o];r[o]=e.exports(t);return r})},622:function(e){e.exports=require("path")},631:function(e){e.exports=require("net")},654:function(e){e.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];if(process.platform!=="win32"){e.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT")}if(process.platform==="linux"){e.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}},669:function(e){e.exports=require("util")},692:function(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},696:function(e){"use strict";function isObject(e){return e!=null&&typeof e==="object"&&Array.isArray(e)===false}function isObjectObject(e){return isObject(e)===true&&Object.prototype.toString.call(e)==="[object Object]"}function isPlainObject(e){var t,r;if(isObjectObject(e)===false)return false;t=e.constructor;if(typeof t!=="function")return false;r=t.prototype;if(isObjectObject(r)===false)return false;if(r.hasOwnProperty("isPrototypeOf")===false){return false}return true}e.exports=isPlainObject},697:function(e){"use strict";e.exports=((e,t)=>{t=t||(()=>{});return e.then(e=>new Promise(e=>{e(t())}).then(()=>e),e=>new Promise(e=>{e(t())}).then(()=>{throw e}))})},742:function(e,t,r){var o=r(747);var s;if(process.platform==="win32"||global.TESTING_WINDOWS){s=r(818)}else{s=r(197)}e.exports=isexe;isexe.sync=sync;function isexe(e,t,r){if(typeof t==="function"){r=t;t={}}if(!r){if(typeof Promise!=="function"){throw new TypeError("callback not provided")}return new Promise(function(r,o){isexe(e,t||{},function(e,t){if(e){o(e)}else{r(t)}})})}s(e,t||{},function(e,o){if(e){if(e.code==="EACCES"||t&&t.ignoreErrors){e=null;o=false}}r(e,o)})}function sync(e,t){try{return s.sync(e,t||{})}catch(e){if(t&&t.ignoreErrors||e.code==="EACCES"){return false}else{throw e}}}},747:function(e){e.exports=require("fs")},753:function(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(385);var s=r(796);var n=_interopDefault(r(696));var i=_interopDefault(r(454));var a=r(463);const c="5.4.4";function getBufferResponse(e){return e.arrayBuffer()}function fetchWrapper(e){if(n(e.body)||Array.isArray(e.body)){e.body=JSON.stringify(e.body)}let t={};let r;let o;const s=e.request&&e.request.fetch||i;return s(e.url,Object.assign({method:e.method,body:e.body,headers:e.headers,redirect:e.redirect},e.request)).then(s=>{o=s.url;r=s.status;for(const e of s.headers){t[e[0]]=e[1]}if(r===204||r===205){return}if(e.method==="HEAD"){if(r<400){return}throw new a.RequestError(s.statusText,r,{headers:t,request:e})}if(r===304){throw new a.RequestError("Not modified",r,{headers:t,request:e})}if(r>=400){return s.text().then(o=>{const s=new a.RequestError(o,r,{headers:t,request:e});try{let e=JSON.parse(s.message);Object.assign(s,e);let t=e.errors;s.message=s.message+": "+t.map(JSON.stringify).join(", ")}catch(e){}throw s})}const n=s.headers.get("content-type");if(/application\/json/.test(n)){return s.json()}if(!n||/^text\/|charset=utf-8$/.test(n)){return s.text()}return getBufferResponse(s)}).then(e=>{return{status:r,url:o,headers:t,data:e}}).catch(r=>{if(r instanceof a.RequestError){throw r}throw new a.RequestError(r.message,500,{headers:t,request:e})})}function withDefaults(e,t){const r=e.defaults(t);const o=function(e,t){const o=r.merge(e,t);if(!o.request||!o.request.hook){return fetchWrapper(r.parse(o))}const s=(e,t)=>{return fetchWrapper(r.parse(r.merge(e,t)))};Object.assign(s,{endpoint:r,defaults:withDefaults.bind(null,r)});return o.request.hook(s,o)};return Object.assign(o,{endpoint:r,defaults:withDefaults.bind(null,r)})}const u=withDefaults(o.endpoint,{headers:{"user-agent":`octokit-request.js/${c} ${s.getUserAgent()}`}});t.request=u},757: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.ClaFile=void 0;const i=n(r(470));const a=r(89);class ClaFile{constructor(e){if(e){this._records=JSON.parse(Buffer.from(e,"base64").toString()).signedContributors}else{this._records=[]}}mapSignedAuthors(e){return new a.AuthorMap(e.map(e=>new a.Author({name:e.name,id:e.id,pullRequestNo:e.pullRequestNo,signed:this._records.some(t=>t.id===e.id)})))}addSignature(e){i.debug(`Adding signatures: '${e.map(e=>e.name).join(", ")}'`);const t=e.filter(e=>e.id!==undefined&&e.pullRequestNo!==undefined&&!this._records.some(t=>t.id===e.id));i.debug(`Adding valid signatures: ${t.map(e=>e.name).join(", ")}'`);this._records.push(...t);return t}toBase64(){return Buffer.from(JSON.stringify({signedContributors:this._records},null,2)).toString("base64")}}t.ClaFile=ClaFile},761:function(e){e.exports=require("zlib")},763:function(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)}},768:function(e){"use strict";e.exports=function(e){var t=typeof e==="string"?"\n":"\n".charCodeAt();var r=typeof e==="string"?"\r":"\r".charCodeAt();if(e[e.length-1]===t){e=e.slice(0,e.length-1)}if(e[e.length-1]===r){e=e.slice(0,e.length-1)}return e}},776: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.PullCheckRunner=void 0;const a=n(r(470));class PullCheckRunner{constructor(e){this.settings=e}rerunLastCheck(){return i(this,void 0,void 0,function*(){if(this.settings.payloadAction==="pull_request"){return}a.info("Re-running blocking commit check.");const[e,t]=yield Promise.all([yield this.getSelfWorkflowId(),yield this.getBranchOfPullRequest()]);a.debug(`Self workflow ID is ${e}`);a.debug(`PR branch is ${t}`);const r=yield this.settings.octokitLocal.actions.listWorkflowRuns({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName,branch:t,workflow_id:e,event:"pull_request"});a.debug(`Found ${r.data.total_count} previous runs.`);if(r.data.total_count>0){const e=r.data.workflow_runs[0].id;a.debug(`Rerunning build run ${e}`);yield this.settings.octokitLocal.actions.reRunWorkflow({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName,run_id:e})}})}getSelfWorkflowId(){return i(this,void 0,void 0,function*(){const e=yield this.settings.octokitLocal.actions.listRepoWorkflows({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName});const t=e.data.workflows.find(e=>e.name==this.settings.workflowName);if(!t){throw new Error("Unable to locate this workflow's ID in this repository, can't retrigger job..")}return t.id})}getBranchOfPullRequest(){return i(this,void 0,void 0,function*(){const e=yield this.settings.octokitLocal.pulls.get({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName,pull_number:this.settings.pullRequestNumber});return e.data.head.ref})}}t.PullCheckRunner=PullCheckRunner},796:function(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(2));function getUserAgent(){try{return`Node.js/${process.version.substr(1)} (${o()}; ${process.arch})`}catch(e){if(/wmic os get Caption/.test(e.message)){return"Windows "}return""}}t.getUserAgent=getUserAgent},813:function(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},814:function(e,t,r){e.exports=which;which.sync=whichSync;var o=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys";var s=r(622);var n=o?";":":";var i=r(742);function getNotFoundError(e){var t=new Error("not found: "+e);t.code="ENOENT";return t}function getPathInfo(e,t){var r=t.colon||n;var s=t.path||process.env.PATH||"";var i=[""];s=s.split(r);var a="";if(o){s.unshift(process.cwd());a=t.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM";i=a.split(r);if(e.indexOf(".")!==-1&&i[0]!=="")i.unshift("")}if(e.match(/\//)||o&&e.match(/\\/))s=[""];return{env:s,ext:i,extExe:a}}function which(e,t,r){if(typeof t==="function"){r=t;t={}}var o=getPathInfo(e,t);var n=o.env;var a=o.ext;var c=o.extExe;var u=[];(function F(o,l){if(o===l){if(t.all&&u.length)return r(null,u);else return r(getNotFoundError(e))}var p=n[o];if(p.charAt(0)==='"'&&p.slice(-1)==='"')p=p.slice(1,-1);var d=s.join(p,e);if(!p&&/^\.[\\\/]/.test(e)){d=e.slice(0,2)+d}(function E(e,s){if(e===s)return F(o+1,l);var n=a[e];i(d+n,{pathExt:c},function(o,i){if(!o&&i){if(t.all)u.push(d+n);else return r(null,d+n)}return E(e+1,s)})})(0,a.length)})(0,n.length)}function whichSync(e,t){t=t||{};var r=getPathInfo(e,t);var o=r.env;var n=r.ext;var a=r.extExe;var c=[];for(var u=0,l=o.length;ue.body.match(this.BotNameRegex))}catch(e){throw new Error(`Failed to get PR comments: ${e.message}. Details: ${JSON.stringify(e)}`)}})}getCommentContent(e){if(e.allSigned()){return`**${this.BotName}:** All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.`}const t=e.count>1?"you all":"you";const r=this.settings.claDocUrl;const o=this.settings.signatureText;let s="";const n=e.getSigned();const i=e.getUnsigned();s+=`**${n.length}** out of **${e.count}** committers have signed the CLA.\n`;n.forEach(e=>s+=`:white_check_mark: @${e.name}\n`);i.forEach(e=>s+=`:x: @${e.name}\n`);let a=e.getNonGithubAccounts();if(a.length>0){s+="---\n";s+=`GitHub can't find an account for **${a.map(e=>e.name).join(", ")}**.\n`;s+="You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please [add the email address used for this commit to your account](https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user/#commits-are-not-linked-to-any-user)."}return`**${this.BotName}:**\n\nThank you for your submission, we really appreciate it. Like many open-source projects, we ask that ${t} read and sign our [Contributor License Agreement](${r}) before we can accept your contribution. You can sign the CLA by just by adding a comment to this pull request with this exact sentence:\n\n> ***${o}***\n\nBy commenting with the above message you are agreeing to the terms of the CLA. Your account will be recorded as agreeing to our CLA so you don't need to sign it again for future contributions to our company's repositories.\n\n${s}\n`}getNewSignatures(e){return i(this,void 0,void 0,function*(){const t=e.getUnsigned();if(t.length==0){return[]}const[r,o]=yield Promise.all([this.settings.octokitLocal.issues.listComments({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName,issue_number:this.settings.pullRequestNumber}),this.getRepoId()]);return r.data.filter(e=>t.some(t=>t.id===e.user.id)&&e.body.toUpperCase().match(this.settings.signatureRegex)).map(e=>({id:e.user.id,name:e.user.login,pullRequestNo:this.settings.pullRequestNumber,comment_id:e.id,created_at:e.created_at,repoId:o}))})}getRepoId(){return i(this,void 0,void 0,function*(){return(yield this.settings.octokitLocal.repos.get({owner:this.settings.localRepositoryOwner,repo:this.settings.localRepositoryName})).data.id})}}t.PullComments=PullComments},881:function(e){"use strict";const t=process.platform==="win32";function notFoundError(e,t){return Object.assign(new Error(`${t} ${e.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t} ${e.command}`,path:e.command,spawnargs:e.args})}function hookChildProcess(e,r){if(!t){return}const o=e.emit;e.emit=function(t,s){if(t==="exit"){const t=verifyENOENT(s,r,"spawn");if(t){return o.call(e,"error",t)}}return o.apply(e,arguments)}}function verifyENOENT(e,r){if(t&&e===1&&!r.file){return notFoundError(r.original,"spawn")}return null}function verifyENOENTSync(e,r){if(t&&e===1&&!r.file){return notFoundError(r.original,"spawnSync")}return null}e.exports={hookChildProcess:hookChildProcess,verifyENOENT:verifyENOENT,verifyENOENTSync:verifyENOENTSync,notFoundError:notFoundError}},898:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});var o=r(753);var s=r(796);const n="4.5.0";class GraphqlError extends Error{constructor(e,t){const r=t.data.errors[0].message;super(r);Object.assign(this,t.data);this.name="GraphqlError";this.request=e;if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}}}const i=["method","baseUrl","url","headers","request","query","mediaType"];function graphql(e,t,r){r=typeof t==="string"?r=Object.assign({query:t},r):r=t;const o=Object.keys(r).reduce((e,t)=>{if(i.includes(t)){e[t]=r[t];return e}if(!e.variables){e.variables={}}e.variables[t]=r[t];return e},{});return e(o).then(e=>{if(e.data.errors){throw new GraphqlError(o,{data:e.data})}return e.data.data})}function withDefaults(e,t){const r=e.defaults(t);const s=(e,t)=>{return graphql(r,e,t)};return Object.assign(s,{defaults:withDefaults.bind(null,r),endpoint:o.request.endpoint})}const a=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=a;t.withCustomRequest=withCustomRequest},948:function(e){"use strict";e.exports=function(e){try{return e()}catch(e){}}},950:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:true});const o=r(835);function getProxyUrl(e){let t=e.protocol==="https:";let r;if(checkBypass(e)){return r}let s;if(t){s=process.env["https_proxy"]||process.env["HTTPS_PROXY"]}else{s=process.env["http_proxy"]||process.env["HTTP_PROXY"]}if(s){r=o.parse(s)}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},955:function(e,t,r){"use strict";const o=r(622);const s=r(129);const n=r(20);const i=r(768);const a=r(621);const c=r(323);const u=r(145);const l=r(697);const p=r(260);const d=r(427);const f=r(168);const m=1e3*1e3*10;function handleArgs(e,t,r){let s;r=Object.assign({extendEnv:true,env:{}},r);if(r.extendEnv){r.env=Object.assign({},process.env,r.env)}if(r.__winShell===true){delete r.__winShell;s={command:e,args:t,options:r,file:e,original:{cmd:e,args:t}}}else{s=n._parse(e,t,r)}r=Object.assign({maxBuffer:m,buffer:true,stripEof:true,preferLocal:true,localDir:s.options.cwd||process.cwd(),encoding:"utf8",reject:true,cleanup:true},s.options);r.stdio=f(r);if(r.preferLocal){r.env=a.env(Object.assign({},r,{cwd:r.localDir}))}if(r.detached){r.cleanup=false}if(process.platform==="win32"&&o.basename(s.command)==="cmd.exe"){s.args.unshift("/q")}return{cmd:s.command,args:s.args,opts:r,parsed:s}}function handleInput(e,t){if(t===null||t===undefined){return}if(c(t)){t.pipe(e.stdin)}else{e.stdin.end(t)}}function handleOutput(e,t){if(t&&e.stripEof){t=i(t)}return t}function handleShell(e,t,r){let o="/bin/sh";let s=["-c",t];r=Object.assign({},r);if(process.platform==="win32"){r.__winShell=true;o=process.env.comspec||"cmd.exe";s=["/s","/c",`"${t}"`];r.windowsVerbatimArguments=true}if(r.shell){o=r.shell;delete r.shell}return e(o,s,r)}function getStream(e,t,{encoding:r,buffer:o,maxBuffer:s}){if(!e[t]){return null}let n;if(!o){n=new Promise((r,o)=>{e[t].once("end",r).once("error",o)})}else if(r){n=u(e[t],{encoding:r,maxBuffer:s})}else{n=u.buffer(e[t],{maxBuffer:s})}return n.catch(e=>{e.stream=t;e.message=`${t} ${e.message}`;throw e})}function makeError(e,t){const{stdout:r,stderr:o}=e;let s=e.error;const{code:n,signal:i}=e;const{parsed:a,joinedCmd:c}=t;const u=t.timedOut||false;if(!s){let e="";if(Array.isArray(a.opts.stdio)){if(a.opts.stdio[2]!=="inherit"){e+=e.length>0?o:`\n${o}`}if(a.opts.stdio[1]!=="inherit"){e+=`\n${r}`}}else if(a.opts.stdio!=="inherit"){e=`\n${o}${r}`}s=new Error(`Command failed: ${c}${e}`);s.code=n<0?d(n):n}s.stdout=r;s.stderr=o;s.failed=true;s.signal=i||null;s.cmd=c;s.timedOut=u;return s}function joinCmd(e,t){let r=e;if(Array.isArray(t)&&t.length>0){r+=" "+t.join(" ")}return r}e.exports=((e,t,r)=>{const o=handleArgs(e,t,r);const{encoding:i,buffer:a,maxBuffer:c}=o.opts;const u=joinCmd(e,t);let d;try{d=s.spawn(o.cmd,o.args,o.opts)}catch(e){return Promise.reject(e)}let f;if(o.opts.cleanup){f=p(()=>{d.kill()})}let m=null;let h=false;const g=()=>{if(m){clearTimeout(m);m=null}if(f){f()}};if(o.opts.timeout>0){m=setTimeout(()=>{m=null;h=true;d.kill(o.opts.killSignal)},o.opts.timeout)}const w=new Promise(e=>{d.on("exit",(t,r)=>{g();e({code:t,signal:r})});d.on("error",t=>{g();e({error:t})});if(d.stdin){d.stdin.on("error",t=>{g();e({error:t})})}});function destroy(){if(d.stdout){d.stdout.destroy()}if(d.stderr){d.stderr.destroy()}}const y=()=>l(Promise.all([w,getStream(d,"stdout",{encoding:i,buffer:a,maxBuffer:c}),getStream(d,"stderr",{encoding:i,buffer:a,maxBuffer:c})]).then(e=>{const t=e[0];t.stdout=e[1];t.stderr=e[2];if(t.error||t.code!==0||t.signal!==null){const e=makeError(t,{joinedCmd:u,parsed:o,timedOut:h});e.killed=e.killed||d.killed;if(!o.opts.reject){return e}throw e}return{stdout:handleOutput(o.opts,t.stdout),stderr:handleOutput(o.opts,t.stderr),code:0,failed:false,killed:false,signal:null,cmd:u,timedOut:false}}),destroy);n._enoent.hookChildProcess(d,o.parsed);handleInput(d,o.opts.input);d.then=((e,t)=>y().then(e,t));d.catch=(e=>y().catch(e));return d});e.exports.stdout=((...t)=>e.exports(...t).then(e=>e.stdout));e.exports.stderr=((...t)=>e.exports(...t).then(e=>e.stderr));e.exports.shell=((t,r)=>handleShell(e.exports,t,r));e.exports.sync=((e,t,r)=>{const o=handleArgs(e,t,r);const n=joinCmd(e,t);if(c(o.opts.input)){throw new TypeError("The `input` option cannot be a stream in sync mode")}const i=s.spawnSync(o.cmd,o.args,o.opts);i.code=i.status;if(i.error||i.status!==0||i.signal!==null){const e=makeError(i,{joinedCmd:n,parsed:o});if(!o.opts.reject){return e}throw e}return{stdout:handleOutput(o.opts,i.stdout),stderr:handleOutput(o.opts,i.stderr),code:0,failed:false,signal:null,cmd:n,timedOut:false}});e.exports.shellSync=((t,r)=>handleShell(e.exports.sync,t,r))},966:function(e,t,r){"use strict";const{PassThrough:o}=r(413);e.exports=(e=>{e=Object.assign({},e);const{array:t}=e;let{encoding:r}=e;const s=r==="buffer";let n=false;if(t){n=!(r||s)}else{r=r||"utf8"}if(s){r=null}let i=0;const a=[];const c=new o({objectMode:n});if(r){c.setEncoding(r)}c.on("data",e=>{a.push(e);if(n){i=a.length}else{i+=e.length}});c.getBufferedValue=(()=>{if(t){return a}return s?Buffer.concat(a,i):a.join("")});c.getBufferedLength=(()=>i);return c})},969:function(e,t,r){var o=r(11);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 t=function(){if(t.called)return t.value;t.called=true;return t.value=e.apply(this,arguments)};t.called=false;return t}function onceStrict(e){var t=function(){if(t.called)throw new Error(t.onceError);t.called=true;return t.value=e.apply(this,arguments)};var r=e.name||"Function wrapped with `once`";t.onceError=r+" shouldn't be called more than once";t.called=false;return t}},973: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.getInputs=void 0;const i=n(r(470));const a=n(r(469));const c=r(469);function ParseRepoName(e){let t=e.split("/");if(t.length!=2){throw new Error(`Unable to parse repository name ${e} into owner/repo-name format. Make sure the remote-repo-name is set correctly.`)}return t}function getInputs(){const e={};e.pullRequestNumber=c.context.issue.number;e.payloadAction=c.context.payload.action;e.workflowName=c.context.workflow;e.localAccessToken=process.env["GITHUB_TOKEN"];e.isRemoteRepo=(i.getInput("use-remote-repo")||"FALSE").toUpperCase()==="TRUE";const t={required:true};[e.remoteRepositoryOwner,e.remoteRepositoryName]=ParseRepoName(i.getInput("remote-repo-name",{required:e.isRemoteRepo})||c.context.repo.owner+"/"+c.context.repo.repo);const r=i.getInput("remote-repo-pat");if(!r){e.isRemoteRepoReadonly=e.isRemoteRepo;e.repositoryAccessToken=e.localAccessToken}else{e.isRemoteRepoReadonly=false;e.repositoryAccessToken=r}e.localRepositoryOwner=c.context.repo.owner;e.localRepositoryName=c.context.repo.repo;e.claFilePath=i.getInput("path-to-signatures")||"signatures/cla.json";e.branch=i.getInput("branch")||"master";e.whitelist=i.getInput("whitelist")||"";e.allowOrganizationMembers=(i.getInput("allow-organization-members")||"FALSE").toUpperCase()==="TRUE";e.signatureText=i.getInput("signature-text")||"I have read the CLA Document and I hereby sign the CLA";e.signatureRegex=new RegExp(i.getInput("signature-regex")||/^.*I\s*HAVE\s*READ\s*THE\s*CLA\s*DOCUMENT\s*AND\s*I\s*HEREBY\s*SIGN\s*THE\s*CLA/);if(!e.signatureText.toUpperCase().match(e.signatureRegex)){throw new Error("Signature RegEx does not match against Signature Text. Confirm valid RegEx.")}e.blockchainWebhookEndpoint=i.getInput("blockchain-webhook-endpoint")||"https://u9afh6n36g.execute-api.eu-central-1.amazonaws.com/dev/webhook";e.blockchainStorageFlag=(i.getInput("blockchain-storage-flag")||"FALSE").toUpperCase()==="TRUE";e.emptyCommitFlag=(i.getInput("empty-commit-flag")||"FALSE").toUpperCase()==="TRUE";e.claDocUrl=i.getInput("url-to-cladocument",t);e.octokitLocal=a.getOctokit(e.localAccessToken);e.octokitRemote=a.getOctokit(e.repositoryAccessToken);writeOutSettings(e);return e}t.getInputs=getInputs;function writeOutSettings(e){i.debug("All input settings constructed:");for(var t in e){i.debug(`${t}: ${e[t]}`)}}}}); \ No newline at end of file diff --git a/src/claRunner.ts b/src/claRunner.ts index 824931e9..2a5be622 100644 --- a/src/claRunner.ts +++ b/src/claRunner.ts @@ -49,26 +49,30 @@ export class ClaRunner { return true; } - // Just drop whitelisted authors entirely, no sense in processing them. - let rawAuthors: Author[] = await this.pullAuthors.getAuthors(); - rawAuthors = rawAuthors.filter(a => !this.whitelist.isUserWhitelisted(a)); + // Just drop whitelisted authors and organization members entirely, no sense in processing them. + const [rawAuthors, organizationMembers]: [Author[], String[]] = await Promise.all([ + this.pullAuthors.getAuthors(), + this.getOrganizationMembers() + ]); - if (rawAuthors.length === 0) { + const requiredAuthors = rawAuthors.filter(a => !this.whitelist.isUserWhitelisted(a) && !organizationMembers.includes(a.name)); + + if (requiredAuthors.length === 0) { core.info("No committers left after whitelisting. Approving pull request."); return true; } - core.debug(`Found a total of ${rawAuthors.length} authors after whitelisting.`); - core.debug(`Authors: ${rawAuthors.map(n => n.name).join(', ')}`); + core.debug(`Found a total of ${requiredAuthors.length} authors after whitelisting.`); + core.debug(`Authors: ${requiredAuthors.map(n => n.name).join(', ')}`); const claFile = await this.claFileRepository.getClaFile(); - let authorMap = claFile.mapSignedAuthors(rawAuthors); + let authorMap = claFile.mapSignedAuthors(requiredAuthors); let newSignature = claFile.addSignature(await this.pullComments.getNewSignatures(authorMap)); if (newSignature.length > 0) { const newNames = newSignature.map(s => s.name).join(', '); core.debug(`Found new signatures: ${newNames}.`) - authorMap = claFile.mapSignedAuthors(rawAuthors); + authorMap = claFile.mapSignedAuthors(requiredAuthors); await Promise.all([ this.claFileRepository.commitClaFile(`Add ${newNames}.`), this.blockchainPoster.postToBlockchain(newSignature), @@ -100,4 +104,15 @@ export class ClaRunner { core.error(`Failed to lock pull request #${this.settings.pullRequestNumber}.`); } } + + private async getOrganizationMembers(): Promise> { + if (!this.settings.allowOrganizationMembers) { + return []; + } + + const response = await this.settings.octokitLocal.orgs.listMembers({ + org: this.settings.localRepositoryOwner, + }); + return response.data.map(user => user.login); + } } \ No newline at end of file diff --git a/src/inputHelper.ts b/src/inputHelper.ts index 8e9e9a1c..e56abdb5 100644 --- a/src/inputHelper.ts +++ b/src/inputHelper.ts @@ -53,6 +53,7 @@ export function getInputs(): IInputSettings { settings.claFilePath = core.getInput("path-to-signatures") || "signatures/cla.json"; settings.branch = core.getInput("branch") || "master"; settings.whitelist = core.getInput("whitelist") || ""; + settings.allowOrganizationMembers = (core.getInput('allow-organization-members') || 'FALSE').toUpperCase() === 'TRUE'; settings.signatureText = core.getInput("signature-text") || "I have read the CLA Document and I hereby sign the CLA"; settings.signatureRegex = new RegExp(core.getInput("signature-regex") || /^.*I\s*HAVE\s*READ\s*THE\s*CLA\s*DOCUMENT\s*AND\s*I\s*HEREBY\s*SIGN\s*THE\s*CLA/); diff --git a/src/inputSettings.ts b/src/inputSettings.ts index 8f76b262..01916ed7 100644 --- a/src/inputSettings.ts +++ b/src/inputSettings.ts @@ -71,6 +71,11 @@ export interface IInputSettings { */ whitelist: string + /** + * Whether accounts in the same organization as the repository should be allowed automatically + */ + allowOrganizationMembers: boolean + /** * The regex to search PR comments for as a signature. */