mirror of
https://github.com/renovatebot/renovate.git
synced 2024-12-22 13:38:32 +00:00
20 lines
582 B
TypeScript
20 lines
582 B
TypeScript
import * as p from '../../../util/promises';
|
|
import type { BranchUpgradeConfig } from '../../types';
|
|
import { getChangeLogJSON } from '../update/pr/changelog';
|
|
|
|
export async function embedChangelog(
|
|
upgrade: BranchUpgradeConfig,
|
|
): Promise<void> {
|
|
// getChangeLogJSON returns null on error, so don't try again
|
|
if (upgrade.logJSON !== undefined) {
|
|
return;
|
|
}
|
|
upgrade.logJSON = await getChangeLogJSON(upgrade);
|
|
}
|
|
|
|
export async function embedChangelogs(
|
|
branches: BranchUpgradeConfig[],
|
|
): Promise<void> {
|
|
await p.map(branches, embedChangelog, { concurrency: 10 });
|
|
}
|