Skip to content

Commit

Permalink
use commit message as initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-gupta7 committed Dec 30, 2024
1 parent 01b878d commit a7e25e3
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,6 @@ export class GitlabTokenStorage extends GitTokenStorage {
await this.createBranch(branch, sourceBranch);
}

const pushRules = await this.gitlabClient.ProjectPushRules.show(this.projectId);
const initialCommitMessage = pushRules?.commit_message_regex ? 'chore: Initial Commit' : 'Initial Commit';
// Directories cannot be created empty (Source: https://gitlab.com/gitlab-org/gitlab/-/issues/247503)
const pathToCreate = this.path.endsWith('.json') ? this.path : `${this.path}/.gitkeep`;
try {
Expand All @@ -229,7 +227,7 @@ export class GitlabTokenStorage extends GitTokenStorage {
pathToCreate,
branch,
'{}',
initialCommitMessage,
message,
);
}

Expand Down

0 comments on commit a7e25e3

Please sign in to comment.