Skip to content

Commit 5f856e1

Browse files
committed
fix(config): make platformCommit global-only
1 parent 79e0a29 commit 5f856e1

11 files changed

Lines changed: 19 additions & 18 deletions

File tree

docs/usage/configuration-options.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4033,17 +4033,6 @@ Please check platform specific docs for version requirements.
40334033

40344034
To learn how to use GitHub's Merge Queue feature with Renovate, read our [GitHub Merge Queue](./key-concepts/automerge.md#github-merge-queue) docs.
40354035

4036-
## `platformCommit`
4037-
4038-
Only use this option if you run Renovate as a [GitHub App](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps).
4039-
It does not apply when you use a Personal Access Token as credential.
4040-
4041-
When `platformCommit` is enabled, Renovate will create commits with GitHub's API instead of using `git` directly.
4042-
This way Renovate can use GitHub's [Commit signing support for bots and other GitHub Apps](https://github.blog/2019-08-15-commit-signing-support-for-bots-and-other-github-apps/) feature.
4043-
4044-
!!! note
4045-
When using platform commits, GitHub determines the git author string to use and Renovate's own gitAuthor is ignored.
4046-
40474036
## `postUpdateOptions`
40484037

40494038
### `bundlerConservative`

docs/usage/self-hosted-configuration.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,6 +1045,17 @@ It also may mean that ignored directories like `node_modules` can be preserved a
10451045

10461046
## `platform`
10471047

1048+
## `platformCommit`
1049+
1050+
Only use this option if you run Renovate as a [GitHub App](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps).
1051+
It does not apply when you use a Personal Access Token as credential.
1052+
1053+
When `platformCommit` is enabled, Renovate will create commits with GitHub's API instead of using `git` directly.
1054+
This way Renovate can use GitHub's [Commit signing support for bots and other GitHub Apps](https://github.blog/2019-08-15-commit-signing-support-for-bots-and-other-github-apps/) feature.
1055+
1056+
!!! note
1057+
When using platform commits, GitHub determines the git author string to use and Renovate's own gitAuthor is ignored.
1058+
10481059
## `prCacheSyncMaxPages`
10491060

10501061
Maximum number of pages to fetch when syncing the pull request cache.

lib/config/global.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export class GlobalConfig {
4949
'onboardingNoDeps',
5050
'onboardingPrTitle',
5151
'platform',
52+
'platformCommit',
5253
'prCacheSyncMaxPages',
5354
'presetCachePersistence',
5455
'productLinks',

lib/config/options/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3395,6 +3395,7 @@ const options: Readonly<RenovateOptions>[] = [
33953395
'Use platform API to perform commits instead of using Git directly.',
33963396
type: 'string',
33973397
default: 'auto',
3398+
globalOnly: true,
33983399
allowedValues: ['auto', 'disabled', 'enabled'],
33993400
supportedPlatforms: ['github'],
34003401
},

lib/config/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ export interface RenovateSharedConfig {
128128

129129
pinDigests?: boolean;
130130
platformAutomerge?: boolean;
131-
platformCommit?: PlatformCommitOptions;
132131
postUpgradeTasks?: PostUpgradeTasks;
133132
prBodyColumns?: string[];
134133
prBodyDefinitions?: Record<string, string>;
@@ -259,6 +258,7 @@ export interface RepoGlobalConfig extends GlobalInheritableConfig {
259258
localDir?: string;
260259
migratePresets?: Record<string, string>;
261260
platform?: PlatformId;
261+
platformCommit?: PlatformCommitOptions;
262262
prCacheSyncMaxPages?: number;
263263
presetCachePersistence?: boolean;
264264
httpCacheTtlDays?: number;

lib/workers/repository/config-migration/branch/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export async function createConfigMigrationBranch(
7575
branchName: getMigrationBranchName(config),
7676
files,
7777
message: commitMessage.toString(),
78-
platformCommit: config.platformCommit,
78+
platformCommit: GlobalConfig.get('platformCommit'),
7979
force: true,
8080
// Only needed by Gerrit platform
8181
prTitle: commitMessageFactory.getPrTitle(),

lib/workers/repository/config-migration/branch/rebase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export async function rebaseMigrationBranch(
5353
},
5454
],
5555
message: commitMessage.toString(),
56-
platformCommit: config.platformCommit,
56+
platformCommit: GlobalConfig.get('platformCommit'),
5757
// Only needed by Gerrit platform
5858
prTitle: commitMessageFactory.getPrTitle(),
5959
});

lib/workers/repository/onboarding/branch/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export async function createOnboardingBranch(
5959
},
6060
],
6161
message: commitMessage,
62-
platformCommit: config.platformCommit,
62+
platformCommit: GlobalConfig.get('platformCommit'),
6363
force: true,
6464
// Only needed by Gerrit platform
6565
prTitle,

lib/workers/repository/onboarding/branch/rebase.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function rebaseOnboardingBranch(
6767
},
6868
],
6969
message: commitMessage.toString(),
70-
platformCommit: config.platformCommit,
70+
platformCommit: GlobalConfig.get('platformCommit'),
7171
// Only needed by Gerrit platform
7272
prTitle,
7373
});

lib/workers/repository/update/branch/commit.spec.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ describe('workers/repository/update/branch/commit', () => {
2020
updatedPackageFiles: [],
2121
updatedArtifacts: [],
2222
upgrades: [],
23-
platformCommit: 'auto',
2423
} satisfies BranchConfig;
2524
scm.commitAndPush.mockResolvedValueOnce('123test' as LongCommitSha);
2625
GlobalConfig.reset();

0 commit comments

Comments
 (0)