diff --git a/lib/platform/github/index.js b/lib/platform/github/index.js index e1b12ac81d5e3aa068920d9c975f1a2a4e82e9ae..3cfc4852419dc3e2fa4e3428ce9f556bbac6e77a 100644 --- a/lib/platform/github/index.js +++ b/lib/platform/github/index.js @@ -589,7 +589,8 @@ async function getIssueList() { if (!config.issueList) { const res = await get( `repos/${config.parentRepo || - config.repository}/issues?filter=created&state=open` + config.repository}/issues?filter=created&state=open`, + { useCache: false } ); // istanbul ignore if if (!is.array(res.body)) { @@ -632,6 +633,8 @@ async function ensureIssue(title, body) { body, }, }); + // reset issueList so that it will be fetched again as-needed + delete config.issueList; return 'created'; } } catch (err) /* istanbul ignore next */ { diff --git a/lib/platform/gitlab/index.js b/lib/platform/gitlab/index.js index 9811dcab30a8f84ac63a6fc43103abb0de818821..b5ac0303b8063c1a760bf378efc5101618d8de2f 100644 --- a/lib/platform/gitlab/index.js +++ b/lib/platform/gitlab/index.js @@ -386,7 +386,9 @@ async function getBranchLastCommitTime(branchName) { async function getIssueList() { if (!config.issueList) { - const res = await get(`projects/${config.repository}/issues?state=opened`); + const res = await get(`projects/${config.repository}/issues?state=opened`, { + useCache: false, + }); // istanbul ignore if if (!is.array(res.body)) { logger.warn({ responseBody: res.body }, 'Could not retrieve issue list'); @@ -423,6 +425,8 @@ async function ensureIssue(title, body) { description: body, }, }); + // delete issueList so that it will be refetched as necessary + delete config.issueList; return 'created'; } } catch (err) /* istanbul ignore next */ {