-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GitHub] enable platformCommit
when we detect an app token
#29115
Comments
platformCommit
when we detect a app token and not disabledplatformCommit
when we detect a app token and not disabled
platformCommit
when we detect a app token and not disabledplatformCommit
when we detect an app token
Added breaking tag, let's do it for v38 |
Is it necessary to do it via When we perform initPlatform we use the token to check whether the platform is a GithubApp and store this information locally in the platformConfig object using renovate/lib/modules/platform/github/index.ts Lines 143 to 144 in f8f5184
|
So will the worker keep platformCommit=auto for the whole run? Where would the logic lie? |
We only use this option for Github so we can keep the logic in From renovate/lib/modules/platform/github/scm.ts Lines 10 to 13 in f8f5184
To export class GithubScm extends DefaultGitScm {
override commitAndPush(
commitConfig: CommitFilesConfig,
): Promise<LongCommitSha | null> {
let platformCommit = commitConfig.platformCommit;
if (platformCommit === 'auto' && isGHApp()) {
platformCommit = 'enabled';
}
return commitConfig.platformCommit === 'enabled'
? commitFiles(commitConfig)
: git.commitFiles(commitConfig);
}
} The export function isGHApp(): boolean {
return !!platformConfig.isGHApp;
} |
We can also move this logic to the renovate/lib/workers/repository/index.ts Lines 75 to 78 in f8f5184
This way |
Keeping the logic in platform sounds better |
Describe the proposed change(s).
Change
platformCommit
to enum like with valuesenabled
,auto
anddisabled
.Default to
auto
.Set to
enabled
when it's auto and we detect an github app token.i think they start with
ghs_
.renovate/lib/util/check-token.ts
Lines 67 to 69 in 66de046
The text was updated successfully, but these errors were encountered: