diff --git a/dist/index.js b/dist/index.js index 0ef40a66..ba1437a6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -254210,49 +254210,10 @@ async function init () { try { const get = core.getInput const required = { required: true } - const apiBase = 'https://api.postman.com' - const idRegex = /^[0-9]{7,}-\w{8}-\w{4}-\w{4}-\w{4}-\w{12}$/ const options = { - apiKey: '?apikey=' + get('apiKey'), collection: get('collection', required), - environment: get('environment'), - globals: get('globals'), - iterationCount: Number(get('iterationCount')), - iterationData: get('iterationData'), - folder: split(get('folder')), - workingDir: get('workingDir'), - insecureFileRead: safeParse(get('insecureFileRead')), - timeout: Number(get('timeout')), - timeoutRequest: Number(get('timeoutRequest')), - timeoutScript: Number(get('timeoutScript')), - delayRequest: Number(get('delayRequest')), - ignoreRedirects: safeParse(get('ignoreRedirects')), - insecure: safeParse(get('insecure')), - bail: safeParse(get('bail')), - suppressExitCode: safeParse(get('suppressExitCode')), - reporters: split(get('reporters')), - reporter: safeParse(get('reporter')), - color: get('color'), - sslClientCert: get('sslClientCert'), - sslClientKey: get('sslClientKey'), - sslClientPassphrase: get('sslClientPassphrase'), - sslClientCertList: split(get('sslClientCertList')), - sslExtraCaCerts: get('sslExtraCaCerts'), - requestAgents: safeParse(get('requestAgents')), - cookieJar: get('cookieJar') - } - - if (!options.apiKey) { - core.warning('No Postman API key provided.') - } - - if (options.collection.match(idRegex)) { - options.collection = `${apiBase}/collections/${options.collection}${options.apiKey}` - } - - if (options.environment.match(idRegex)) { - options.environment = `${apiBase}/environments/${options.environment}${options.apiKey}` + environment: get('environment') } runNewman(options) @@ -254261,22 +254222,6 @@ async function init () { } } -function safeParse (obj) { - if (obj) { - try { - return JSON.parse(obj) - } catch (e) { - core.warning('Bad object passed in config!') - } - } - - return null -} - -function split (str) { - return str.split(',') -} - function runNewman (options) { newman.run(options).on('done', (err, summary) => { if (!options.suppressExitCode && (err || summary.run.failures.length)) { diff --git a/package-lock.json b/package-lock.json index 280da5bc..8136b46b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "newman-action", - "version": "0.3.3", + "version": "0.3.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 137e6bc3..2527cf4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "newman-action", - "version": "0.3.3", + "version": "0.3.4", "description": "Run Postman collections with Newman as a GitHub Action", "main": "dist/index.js", "repository": {