Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
feat: support digests for custom datasource
Browse files Browse the repository at this point in the history
Support digets for custom datasource.
The getDigest method needs to exist on the custom datasource for
renovate to use the digest provided from the main versions/releases
endpoint. If the versions response always includes the digest, the
getDigest method doesn't actually need to be implemented.

https://github.com/renovatebot/renovate/blob/14b67888307e2a83219e4bb90f7f0f71f5e608bd/lib/workers/repository/process/lookup/index.ts#L446

See renovatebot#26299
  • Loading branch information
travisshivers committed Mar 8, 2024
1 parent 09ea049 commit 2dc6533
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/modules/datasource/custom/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import is from '@sindresorhus/is';
import jsonata from 'jsonata';
import { logger } from '../../../logger';
import { Datasource } from '../datasource';
import type { GetReleasesConfig, ReleaseResult } from '../types';
import type { DigestConfig, GetReleasesConfig, ReleaseResult } from '../types';
import { fetchers } from './formats';
import { ReleaseResultZodSchema } from './schema';
import { getCustomConfig } from './utils';
Expand Down Expand Up @@ -57,4 +57,11 @@ export class CustomDatasource extends Datasource {
return null;
}
}

override async getDigest(
config: DigestConfig,
newValue?: string
): Promise<string | null> {
return await Promise.reject('Not implemented');
}
}

0 comments on commit 2dc6533

Please sign in to comment.