Skip to content
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

fix(server): first PR commit body #8687

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions packages/amplication-server/src/core/build/build.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,13 @@ export const ACTION_LOG_LEVEL: {
debug: EnumActionLogLevel.Debug,
};

const INITIAL_ONBOARDING_COMMIT_MESSAGE_BODY = `Congratulations on your first commit with Amplication!
We encourage you to continue exploring the many ways Amplication can supercharge your development.

If you find Amplication useful, please show your support and give our GitHub repo a star ⭐️
This simple action helps our open-source project grow and reach more developers like you.
Thank you and happy coding!`;
const FIRST_COMMIT_MESSAGE_BODY = `Congratulations on your first commit!

We encourage you to continue exploring how Amplication can enhance your development process, including easy management of entities, API generation, and the simplification of backend services management through extensive plugin system.

Remember, [Amplication](https://amplication.com/) is the fastest way in the world to build production-ready backend services : )

Happy coding!`;

export function createInitialStepData(
version: string,
Expand Down Expand Up @@ -774,11 +775,11 @@ export class BuildService {
const url = `${clientHost}/${project.workspaceId}/${project.id}/${resource.id}/builds/${build.id}`;
const buildLinkHTML = `[${url}](${url})`;

const commitMessage = oldBuild
const commitMessage = oldBuild?.id
? commit.message && `Commit message: ${commit.message}.`
: INITIAL_ONBOARDING_COMMIT_MESSAGE_BODY;
: FIRST_COMMIT_MESSAGE_BODY; // this message will be shown only on the first commit to the repository

const commitBody = `Amplication build # ${build.id}\n${commitMessage}\nBuild URL: ${buildLinkHTML}`;
const commitBody = `Amplication build # ${build.id}\n\n${commitMessage}\n\nBuild URL: ${buildLinkHTML}`;

const canUseCustomBaseBranch =
await this.billingService.getBooleanEntitlement(
Expand Down
Loading