Skip to content

Commit

Permalink
More issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Zharinov committed Apr 25, 2021
1 parent fe3278a commit ae2b13b
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/util/cache/package/redis.ts
Expand Up @@ -11,7 +11,7 @@ function getKey(namespace: string, key: string): string {

export function end(): void {
try {
client?.nodeRedis?.end(true); // TODO: Why is this not supported by client directly?
client?.nodeRedis?.end(true); // TODO: https://github.com/renovatebot/renovate/issues/9714
} catch (err) {
logger.warn({ err }, 'Redis cache end failed');
}
Expand Down
2 changes: 1 addition & 1 deletion lib/versioning/index.spec.ts
Expand Up @@ -22,7 +22,7 @@ describe('allVersioning.get(versioning)', () => {
// eslint-disable-next-line new-cap
const mod = isVersioningApiConstructor(module) ? new module() : module;

// TODO: test required api
// TODO: https://github.com/renovatebot/renovate/issues/9715
if (!mod.isValid || !mod.isVersion) {
throw Error(`Missing api on ${name}`);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/versioning/node/index.ts
Expand Up @@ -34,7 +34,7 @@ export function isStable(version: string): boolean {
const major = npm.getMajor(version);
const schedule = nodeSchedule[`v${major}`];
if (schedule?.lts) {
// TODO: use the exact release that started LTS
// TODO: https://github.com/renovatebot/renovate/issues/9716
return DateTime.local() > DateTime.fromISO(schedule.lts);
}
}
Expand Down
3 changes: 1 addition & 2 deletions lib/versioning/regex/index.ts
Expand Up @@ -61,8 +61,7 @@ export class RegExpVersioningApi extends GenericVersioningApi<RegExpVersion> {
throw error;
}

// TODO: should we validate the user has not added extra unsupported
// capture groups?
// TODO: https://github.com/renovatebot/renovate/issues/9717
this._config = regEx(new_config);
}

Expand Down
6 changes: 1 addition & 5 deletions lib/workers/branch/index.spec.ts
Expand Up @@ -128,11 +128,7 @@ describe(getName(__filename), () => {
releaseTimestamp: new Date().getTime(),
stabilityDays: 1,
},
/* TODO: This test is probably broken and needs to be fixed.
The type definition for "releaseTimestamp" is a string. But when I change it to
one the test starts failing. Once this test has been fixed, the never typing can be removed.
And instead replaced with the pattern used on the other places that have a config.upgrades
*/
// TODO: https://github.com/renovatebot/renovate/issues/9718
] as never;

git.branchExists.mockReturnValue(false);
Expand Down
2 changes: 1 addition & 1 deletion lib/workers/branch/index.ts
Expand Up @@ -473,7 +473,7 @@ export async function processBranch(
logger.debug('Reached PR limit - skipping PR creation');
return { branchExists, result: BranchResult.PrLimitReached };
}
// TODO: ensurePr should check for automerge itself
// TODO: https://github.com/renovatebot/renovate/issues/9719
if (result === PrResult.AwaitingApproval) {
return { branchExists, result: BranchResult.NeedsPrApproval };
}
Expand Down
4 changes: 2 additions & 2 deletions lib/workers/branch/reuse.ts
Expand Up @@ -55,7 +55,7 @@ export async function shouldReuseExistingBranch(
logger.debug(`Branch is stale and needs rebasing`);
// We can rebase the branch only if no PR or PR can be rebased
if (await isBranchModified(branchName)) {
// TODO: Warn here so that it appears in PR body
// TODO: https://github.com/renovatebot/renovate/issues/9720
logger.debug('Cannot rebase branch as it has been modified');
return { reuseExistingBranch: true, isModified: true };
}
Expand All @@ -82,7 +82,7 @@ export async function shouldReuseExistingBranch(
return { reuseExistingBranch: false };
}
// Don't do anything different, but warn
// TODO: Add warning to PR
// TODO: https://github.com/renovatebot/renovate/issues/9720
logger.debug(`Branch is not mergeable but can't be rebased`);
}
logger.debug(`Branch does not need rebasing`);
Expand Down
2 changes: 1 addition & 1 deletion lib/workers/repository/process/lookup/index.spec.ts
Expand Up @@ -947,7 +947,7 @@ describe(getName(__filename), () => {
config.lockedVersion = '0.9.4';
config.currentValue = '~=0.9';
config.depName = 'q';
// TODO: we are using npm as source to test pep440
// TODO: https://github.com/renovatebot/renovate/issues/9721
config.datasource = datasourceNpmId;
nock('https://registry.npmjs.org').get('/q').reply(200, qJson);
const res = await lookup.lookupUpdates(config);
Expand Down

0 comments on commit ae2b13b

Please sign in to comment.