fix(jira): actually re-generate the URL at each loop iteration, as to not infinite loop

This commit is contained in:
spiral 2022-02-06 08:07:10 -05:00
parent 446ec117ff
commit 9bbc8847a6
No known key found for this signature in database
GPG key ID: A6059F0CA0E1BD31

View file

@ -19,11 +19,11 @@ class Jira
} }
const issues = []; const issues = [];
const httpParams = Object.keys(params).map(key => `${key}=${params[key]}`).join('&');
const url = `${Config.jira.baseUrl}${ENDPOINTS.search}?${httpParams}`;
let response = null; let response = null;
do { do {
const httpParams = Object.keys(params).map(key => `${key}=${params[key]}`).join('&');
const url = `${Config.jira.baseUrl}${ENDPOINTS.search}?${httpParams}`;
response = await axios(url); response = await axios(url);
issues.push(...response.data.issues); issues.push(...response.data.issues);