diff --git a/bin/check.js b/bin/check.js index 96f4bf2..1c85e3c 100755 --- a/bin/check.js +++ b/bin/check.js @@ -106,7 +106,7 @@ program await resp; console.log('Updating test IDs...'); if (apiKey) { - reporter.getIds().then(idMap => { + reporter.getIds({ branch }).then(idMap => { const updatedFiles = updateFiles(features, idMap, opts.dir || process.cwd()); console.log(`${updatedFiles.length} Files updated`); }); diff --git a/changelog.md b/changelog.md index 6e12d0c..ab4e36f 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,7 @@ +# 0.5.19 + +* Added importing to branch + # 0.5.18 * Fixed using non-standard tags for scenarios and features diff --git a/package.json b/package.json index 2278f25..a01f061 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "check-cucumber", - "version": "0.5.18", + "version": "0.5.19", "main": "index.js", "repository": "git@github.com:testomatio/check-cucumber.git", "author": "Koushik Mohan ", diff --git a/reporter.js b/reporter.js index 5f81c58..294e019 100644 --- a/reporter.js +++ b/reporter.js @@ -25,9 +25,11 @@ class Reporter { return this.isCodecept ? 'codeceptjs' : 'Cucumber'; } - getIds() { + getIds(opts = {}) { return new Promise((res, rej) => { - const req = request(`${URL.trim()}/api/test_data?api_key=${this.apiKey}`, { method: 'GET' }, (resp) => { + const params = new URLSearchParams(opts).toString(); + + const req = request(`${URL.trim()}/api/test_data?api_key=${this.apiKey}&${params}`, { method: 'GET' }, (resp) => { // The whole response has been received. Print out the result. let message = '';