diff --git a/docs/usage/configuration-options.md b/docs/usage/configuration-options.md index 94e9aa09279223283787416347a3525290e24d15..dd3cdf42b6a95765e8048c116a1f3430b88ac4fd 100644 --- a/docs/usage/configuration-options.md +++ b/docs/usage/configuration-options.md @@ -1276,29 +1276,30 @@ A similar one could strip leading `v` prefixes: } ``` -## fetchReleaseNotes +## fetchChangeLogs -Use this config option to configure release notes fetching. +Use this config option to configure changelogs/release notes fetching. The available options are: -- `off` - disable release notes fetching -- `branch` - fetch release notes while creating/updating branch -- `pr`(default) - fetches release notes while creating/updating pull-request +- `off` - disable changelogs fetching +- `branch` - fetch changelogs while creating/updating branch +- `pr`(default) - fetches changelogs while creating/updating pull-request -It is not recommended to set fetchReleaseNotes=branch unless you are embedding release notes in commit information, because it results in a performance decrease. +Avoid setting `fetchChangeLogs=branch`, because this slows down Renovate. +But if you're embedding changelogs in commit information, you may use `fetchChangeLogs=branch`. -Renovate can fetch release notes when they are hosted on one of these platforms: +Renovate can fetch changelogs when they are hosted on one of these platforms: - Bitbucket Cloud - GitHub (.com and Enterprise Server) - GitLab (.com and CE/EE) -If you are running on any platform except `github.com`, you need to [configure a Personal Access Token](./getting-started/running.md#githubcom-token-for-release-notes) to allow Renovate to fetch release notes from `github.com`. +If you are running on any platform except `github.com`, you need to [configure a Personal Access Token](./getting-started/running.md#githubcom-token-for-release-notes) to allow Renovate to fetch changelogs notes from `github.com`. <!-- prettier-ignore --> !!! note - Renovate can only show release notes from some platforms and some package managers. - We're planning improvements so that Renovate can show more release notes. + Renovate can only show changelogs from some platforms and some package managers. + We're planning improvements so that Renovate can show more changelogs. Read [issue 14138 on GitHub](https://github.com/renovatebot/renovate/issues/14138) to get an overview of the planned work. ## fileMatch @@ -2776,9 +2777,9 @@ Tokens can be configured via `hostRules` using the `"merge-confidence"` `hostTyp ### customChangelogUrl Use this field to set the source URL for a package, including overriding an existing one. -Source URLs are necessary in order to look up release notes. +Source URLs are necessary in order to look up changelogs. -Using this field we can specify the exact URL to fetch release notes from. +Using this field we can specify the exact URL to fetch changelogs from. ```json title="Setting the source URL for the dummy package" { diff --git a/docs/usage/dependency-pinning.md b/docs/usage/dependency-pinning.md index 14a569a7b5247903ccf9687403ef933404c862a2..185d136c22202fe112a16377e6cb9b4f9afd01a3 100644 --- a/docs/usage/dependency-pinning.md +++ b/docs/usage/dependency-pinning.md @@ -76,7 +76,7 @@ If you were using SemVer ranges then this new version of `foobar` will likely be Like before, you need to manually work out which dependency caused it - assuming you guess correctly that it was a new dependency version at fault - and pin it manually by editing `package.json` one dependency at a time. Alternatively, if you were instead pinning `foobar` then you would get a PR for `foobar@1.2.0` which awaits your approval. -So first of all, you can choose to read the release notes and/or visually inspect the branch yourself before merging, hopefully saving you from pushing this faulty code to production. +So first of all, you can choose to read the changelogs and/or visually inspect the branch yourself before merging, hopefully saving you from pushing this faulty code to production. If you did not catch the fault before merging, you are still better off with a pinned version. If you discover something wrong in production, you can easily "roll back" commits in your development environment until you find which rollback fixes the problem. diff --git a/docs/usage/examples/self-hosting.md b/docs/usage/examples/self-hosting.md index 28ec2baf62da78d1dd2501eae3d53f9b3e2d51d2..1545063e085b85763c0417e36625b4af146e2f5d 100644 --- a/docs/usage/examples/self-hosting.md +++ b/docs/usage/examples/self-hosting.md @@ -278,7 +278,7 @@ Only add the script to `cron` after you checked it works. <!-- prettier-ignore --> !!! note - The GitHub.com token as an environment variable is needed to fetch Release Notes that are usually hosted on github.com. + The GitHub.com token as an environment variable is needed to fetch changelogs that are usually hosted on github.com. You don't need to add it if you are already running the bot against github.com, but you do need to add it if you're using GitHub Enterprise Server, GitLab, Azure DevOps, or Bitbucket. ## Kubernetes for GitLab, using Git over SSH diff --git a/docs/usage/getting-started/private-packages.md b/docs/usage/getting-started/private-packages.md index 9e5dad243e65801b2f09c27a55761cacefd6b49b..601666924635b7310cc0db19dee3cd4fdde7f6bd 100644 --- a/docs/usage/getting-started/private-packages.md +++ b/docs/usage/getting-started/private-packages.md @@ -20,7 +20,7 @@ There are four times in Renovate's behavior when it may need credentials: - Resolving private config presets - Looking up dependency versions -- Looking up release notes +- Looking up changelogs - Passing to package managers when updating lock files or checksums <!-- prettier-ignore --> @@ -142,14 +142,14 @@ Assume this config is used on the `github.com/some-other-org` repo: } ``` -## Looking up Release Notes +## Looking up changelogs When Renovate creates Pull Requests, its default behavior is to locate and embed release notes/changelogs of packages. These release notes are fetched from the source repository of packages and not from the registries themselves, so if they are private then they will require different credentials. When it comes to open source, most packages host their source on `github.com` in public repositories. GitHub greatly rate limits unauthenticated API requests, so you need to configure credentials for `github.com` or the bot will get rate limited quickly. -It can be confusing for people who host their own source code privately to be asked to configure a `github.com` token but without it Release Notes for most open source packages will be blocked. +It can be confusing for people who host their own source code privately to be asked to configure a `github.com` token but without it changelogs for most open source packages will be blocked. Currently the preferred way to configure `github.com` credentials for self-hosted Renovate is: diff --git a/docs/usage/getting-started/running.md b/docs/usage/getting-started/running.md index e710ed7f5fa7fcf6863bf568f4a3181e26990f1d..76b7ff546634f885e06aaa4a98979b8d8a638809 100644 --- a/docs/usage/getting-started/running.md +++ b/docs/usage/getting-started/running.md @@ -209,11 +209,11 @@ Read the platform-specific docs to learn how to setup authentication on your pla - [github.com and GitHub Enterprise Server](https://docs.renovatebot.com/modules/platform/github/) - [GitLab](https://docs.renovatebot.com/modules/platform/gitlab/) -### GitHub.com token for release notes +### GitHub.com token for changelogs If you are running on any platform except github.com, you should also set the environment variable `GITHUB_COM_TOKEN` and put the Personal Access Token for github.com in it. This account can be _any_ account on GitHub, and needs only `read-only` access. -It's used when fetching release notes for repositories in order to increase the hourly API limit. +It's used when fetching changelogs for repositories in order to increase the hourly API limit. It's also OK to configure the same as a host rule instead, if you prefer that. <!-- prettier-ignore --> diff --git a/docs/usage/getting-started/use-cases.md b/docs/usage/getting-started/use-cases.md index 5ab2f1c1feef912d97971bccd8c03339b0c1773b..b7d56465990992caf2684f437a08375395e42408 100644 --- a/docs/usage/getting-started/use-cases.md +++ b/docs/usage/getting-started/use-cases.md @@ -25,7 +25,7 @@ Renovate: 1. Checks if any newer versions exist 1. Raises Pull Requests for available updates -The Pull Requests patch the package files directly, and include Release Notes for the newer versions (if they are available). +The Pull Requests patch the package files directly, and include changelogs for the newer versions (if they are available). By default: diff --git a/docs/usage/key-concepts/automerge.md b/docs/usage/key-concepts/automerge.md index 0e1edc0c49ef58b587db15350a4b5df5ed07796e..0dee6792045e1d6a7aa8ca9d5c8bbf785bc47a16 100644 --- a/docs/usage/key-concepts/automerge.md +++ b/docs/usage/key-concepts/automerge.md @@ -19,7 +19,7 @@ This means merging multiple branches in a row won't work reliably, so we prefer What all this means is that Renovate will only automerge at most one branch/PR per target branch per run, before you need to wait for the next run. As a general guide, we recommend that you enable automerge for any type of dependency updates where you would select "merge" anyway. -For any updates where you want to review the release notes - or code - before you merge, you can keep automerge disabled. +For any updates where you want to review the changelogs - or code - before you merge, you can keep automerge disabled. Automerge works particularly well for `devDependencies` as well as for production `dependencies` in projects which have great test coverage. diff --git a/docs/usage/self-hosted-configuration.md b/docs/usage/self-hosted-configuration.md index 60d6cb7d5b5d91c7b8e04bd4c7b6571295678114..c5fc1b596725eb858a917e01bf32dd36c815cabb 100644 --- a/docs/usage/self-hosted-configuration.md +++ b/docs/usage/self-hosted-configuration.md @@ -759,7 +759,7 @@ Override this object if you want to change the URLs that Renovate links to, e.g. ## redisUrl If this value is set then Renovate will use Redis for its global cache instead of the local file system. -The global cache is used to store lookup results (e.g. dependency versions and release notes) between repositories and runs. +The global cache is used to store lookup results (e.g. dependency versions and changelogs) between repositories and runs. For non encrypted connections, diff --git a/lib/config/migrations/custom/fetch-release-notes-migration.spec.ts b/lib/config/migrations/custom/fetch-release-notes-migration.spec.ts index 2e17148597eec273f891bd624b149e24d259282b..fc15f7d4885e06c4d0316de1238b58f09e6befcf 100644 --- a/lib/config/migrations/custom/fetch-release-notes-migration.spec.ts +++ b/lib/config/migrations/custom/fetch-release-notes-migration.spec.ts @@ -7,15 +7,39 @@ describe('config/migrations/custom/fetch-release-notes-migration', () => { fetchReleaseNotes: false as never, }, { - fetchReleaseNotes: 'off', + fetchChangeLogs: 'off', } ); expect(FetchReleaseNotesMigration).toMigrate( { fetchReleaseNotes: true as never, }, + { + fetchChangeLogs: 'pr', + } + ); + expect(FetchReleaseNotesMigration).toMigrate( { fetchReleaseNotes: 'pr', + }, + { + fetchChangeLogs: 'pr', + } + ); + expect(FetchReleaseNotesMigration).toMigrate( + { + fetchReleaseNotes: 'off', + }, + { + fetchChangeLogs: 'off', + } + ); + expect(FetchReleaseNotesMigration).toMigrate( + { + fetchReleaseNotes: 'branch', + }, + { + fetchChangeLogs: 'branch', } ); }); diff --git a/lib/config/migrations/custom/fetch-release-notes-migration.ts b/lib/config/migrations/custom/fetch-release-notes-migration.ts index 60b7afe6eaa1a43f39f37980b1a1d987ba648d45..dda051f8fa0605af53b0bb67391b2b75b3d9c542 100644 --- a/lib/config/migrations/custom/fetch-release-notes-migration.ts +++ b/lib/config/migrations/custom/fetch-release-notes-migration.ts @@ -1,12 +1,24 @@ import is from '@sindresorhus/is'; -import { AbstractMigration } from '../base/abstract-migration'; +import type { RenovateConfig } from '../../types'; +import { RenamePropertyMigration } from '../base/rename-property-migration'; -export class FetchReleaseNotesMigration extends AbstractMigration { - override readonly propertyName = 'fetchReleaseNotes'; +export class FetchReleaseNotesMigration extends RenamePropertyMigration { + constructor(originalConfig: RenovateConfig, migratedConfig: RenovateConfig) { + super( + 'fetchReleaseNotes', + 'fetchChangeLogs', + originalConfig, + migratedConfig + ); + } override run(value: unknown): void { + let newValue: unknown = value; + if (is.boolean(value)) { - this.rewrite(value ? 'pr' : 'off'); + newValue = value ? 'pr' : 'off'; } + + super.run(newValue); } } diff --git a/lib/config/options/index.ts b/lib/config/options/index.ts index 9449762b770ef027f9934aa130cc2810f4ed9787..ded1bd36027fb85f52429b6ed90dea153d491960 100644 --- a/lib/config/options/index.ts +++ b/lib/config/options/index.ts @@ -2621,8 +2621,8 @@ const options: RenovateOptions[] = [ env: false, }, { - name: 'fetchReleaseNotes', - description: 'Controls if and when release notes are fetched.', + name: 'fetchChangeLogs', + description: 'Controls if and when changelogs/release notes are fetched.', type: 'string', allowedValues: ['off', 'branch', 'pr'], default: 'pr', diff --git a/lib/config/types.ts b/lib/config/types.ts index 6a3178f6e0196a7f51914c84e0e4ca9dc1ace6d9..0c4ef226497b8fb7d11302e438db486a6e2b42f1 100644 --- a/lib/config/types.ts +++ b/lib/config/types.ts @@ -250,7 +250,7 @@ export interface RenovateConfig customManagers?: CustomManager[]; customDatasources?: Record<string, CustomDatasourceConfig>; - fetchReleaseNotes?: FetchReleaseNotesOptions; + fetchChangeLogs?: FetchChangeLogsOptions; secrets?: Record<string, string>; constraints?: Record<string, string>; @@ -298,7 +298,7 @@ export type UpdateType = | 'bump' | 'replacement'; -export type FetchReleaseNotesOptions = 'off' | 'branch' | 'pr'; +export type FetchChangeLogsOptions = 'off' | 'branch' | 'pr'; export type MatchStringsStrategy = 'any' | 'recursive' | 'combination'; diff --git a/lib/workers/repository/update/branch/index.spec.ts b/lib/workers/repository/update/branch/index.spec.ts index df1b53166e4b9f48dea96fa3ca0ba689e1e5ccc3..68bcbf57b01d12d33455f8b2b5ae25100a59e6f7 100644 --- a/lib/workers/repository/update/branch/index.spec.ts +++ b/lib/workers/repository/update/branch/index.spec.ts @@ -836,7 +836,7 @@ describe('workers/repository/update/branch/index', () => { ignoreTests: true, prCreation: 'not-pending', commitBody: '[skip-ci]', - fetchReleaseNotes: 'branch', + fetchChangeLogs: 'branch', } satisfies BranchConfig; scm.getBranchCommit.mockResolvedValue('123test'); //TODO:not needed? expect(await branchWorker.processBranch(inconfig)).toEqual({ diff --git a/lib/workers/repository/update/branch/index.ts b/lib/workers/repository/update/branch/index.ts index a78d2f1fcae6f3c41fb8a158a37596fa36d25dbc..d7c5541117b51f078b62a3cbb2c228e344ebe908 100644 --- a/lib/workers/repository/update/branch/index.ts +++ b/lib/workers/repository/update/branch/index.ts @@ -490,7 +490,7 @@ export async function processBranch( } else { logger.debug('No updated lock files in branch'); } - if (config.fetchReleaseNotes === 'branch') { + if (config.fetchChangeLogs === 'branch') { await embedChangelogs(config.upgrades); } diff --git a/lib/workers/repository/update/pr/index.spec.ts b/lib/workers/repository/update/pr/index.spec.ts index 866eca46bccda8766e57119b8a527af9d62b41dd..77340a78f9874f3361b4d907cae9e3167f527ab7 100644 --- a/lib/workers/repository/update/pr/index.spec.ts +++ b/lib/workers/repository/update/pr/index.spec.ts @@ -101,7 +101,7 @@ describe('workers/repository/update/pr/index', () => { platform.createPr.mockResolvedValueOnce(pr); limits.isLimitReached.mockReturnValueOnce(true); - config.fetchReleaseNotes = 'pr'; + config.fetchChangeLogs = 'pr'; const res = await ensurePr(config); @@ -871,13 +871,13 @@ describe('workers/repository/update/pr/index', () => { bodyFingerprint: fingerprint( generatePrBodyFingerprintConfig({ ...config, - fetchReleaseNotes: 'pr', + fetchChangeLogs: 'pr', }) ), lastEdited: new Date('2020-01-20T00:00:00Z').toISOString(), }; prCache.getPrCache.mockReturnValueOnce(cachedPr); - const res = await ensurePr({ ...config, fetchReleaseNotes: 'pr' }); + const res = await ensurePr({ ...config, fetchChangeLogs: 'pr' }); expect(res).toEqual({ type: 'with-pr', pr: existingPr, @@ -904,13 +904,13 @@ describe('workers/repository/update/pr/index', () => { bodyFingerprint: fingerprint( generatePrBodyFingerprintConfig({ ...config, - fetchReleaseNotes: 'pr', + fetchChangeLogs: 'pr', }) ), lastEdited: new Date('2020-01-20T00:00:00Z').toISOString(), }; prCache.getPrCache.mockReturnValueOnce(cachedPr); - const res = await ensurePr({ ...config, fetchReleaseNotes: 'pr' }); + const res = await ensurePr({ ...config, fetchChangeLogs: 'pr' }); expect(res).toEqual({ type: 'with-pr', pr: { diff --git a/lib/workers/repository/update/pr/index.ts b/lib/workers/repository/update/pr/index.ts index dbe17da722ef7759609ffd0cfec1ac88e7913c58..36bd01f8a2e960454a30c16ff6145c3a9aafd696 100644 --- a/lib/workers/repository/update/pr/index.ts +++ b/lib/workers/repository/update/pr/index.ts @@ -234,7 +234,7 @@ export async function ensurePr( }`; } - if (config.fetchReleaseNotes === 'pr') { + if (config.fetchChangeLogs === 'pr') { // fetch changelogs when not already done; await embedChangelogs(upgrades); } diff --git a/lib/workers/repository/updates/branchify.spec.ts b/lib/workers/repository/updates/branchify.spec.ts index a190b65f178e175b3089c0788d8e5491bc598d91..1a52fdd718c852ee90168bfc56f6c4a3c63d0fa8 100644 --- a/lib/workers/repository/updates/branchify.spec.ts +++ b/lib/workers/repository/updates/branchify.spec.ts @@ -123,7 +123,7 @@ describe('workers/repository/updates/branchify', () => { }); it('no fetch changelogs', async () => { - config.fetchReleaseNotes = 'off'; + config.fetchChangeLogs = 'off'; flattenUpdates.mockResolvedValueOnce([ { depName: 'foo',