Skip to content

Commit ec2c8ae

Browse files
committed
fix(scripts): prevent incosistent commit message
1 parent 208ab73 commit ec2c8ae

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

scripts/ci/codegen/pushGeneratedCode.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Co-authored-by: %an <%ae>
7575
);
7676

7777
if (IS_RELEASE_COMMIT && isMainBranch) {
78+
console.log('Processing release commit');
7879
message = text.commitReleaseMessage;
7980
}
8081

scripts/ci/codegen/spreadGeneration.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ async function spreadGeneration(): Promise<void> {
8888
// At this point, we know the release will happen on at least one client
8989
// So we want to set the released tag at the monorepo level too.
9090
if (IS_RELEASE_COMMIT) {
91+
console.log('Processing release commit');
92+
9193
// remove old `released` tag
9294
await run(
9395
`git fetch origin refs/tags/${RELEASED_TAG}:refs/tags/${RELEASED_TAG}`

scripts/ci/codegen/text.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { MAIN_BRANCH, REPO_URL, TODAY } from '../../common';
22

33
export default {
44
commitStartMessage: 'chore: generated code for commit',
5-
commitPrepareReleaseMessage: 'chore: prepare-release-',
5+
commitPrepareReleaseMessage: `chore: prepare release ${TODAY}`,
66
commitReleaseMessage: `chore: release ${TODAY}`,
77
notification: {
88
header: '### 🔨 The codegen job will run at the end of the CI.',

scripts/release/createReleasePR.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ async function createReleasePR(): Promise<void> {
355355
} = await octokit.pulls.create({
356356
owner: OWNER,
357357
repo: REPO,
358-
title: `chore: prepare release ${TODAY}`,
358+
title: generationCommitText.commitPrepareReleaseMessage,
359359
body: [
360360
TEXT.header,
361361
TEXT.summary,

scripts/release/updateAPIVersions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import semver from 'semver';
66

77
import clientsConfig from '../../config/clients.config.json';
88
import openapiConfig from '../../config/openapitools.json';
9+
import generationCommitText from '../ci/codegen/text';
910
import {
1011
ROOT_ENV_PATH,
1112
toAbsolutePath,
@@ -231,7 +232,7 @@ export async function updateAPIVersions(
231232
}
232233

233234
console.log(`Pushing updated changes to ${headBranch}`);
234-
const commitMessage = headBranch.replace('chore/', 'chore: ');
235+
const commitMessage = generationCommitText.commitPrepareReleaseMessage;
235236
await run(`git add clients config`, { verbose: true });
236237
if (process.env.LOCAL_TEST_DEV) {
237238
await run(`CI=true git commit -m "${commitMessage} [skip ci]"`, {

0 commit comments

Comments
 (0)