Skip to content

Commit

Permalink
chore(eslint): fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
BorysShulyak committed Dec 10, 2024
1 parent c2b5900 commit 2966331
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions cli/changelog/src/commands/apply.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import { getChangelogJsonFilePath } from '../utils/paths/getChangelogJsonFilePat
import { getChangelogTextFilePath } from '../utils/paths/getChangelogTextFilePath';
import { getPackageJsonFilePath } from '../utils/paths/getPackageJsonFilePath';
import { bumpSemver } from '../utils/semver/bumpSemver';
import { verify } from './verify';

export const apply = async (options?: { targetBranch?: string }) => {
const targetBranch = options?.targetBranch || execSync(GIT_COMMANDS.defaultBranchName()).toString().trim();
const targetBranch =
options?.targetBranch || execSync(GIT_COMMANDS.defaultBranchName()).toString().trim();

createChangelogTextFile();
createChangelogJsonFile();
Expand Down
6 changes: 3 additions & 3 deletions cli/changelog/src/commands/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import { getExistingChangeFilePath } from '../utils/paths/getExistingChangeFileP

export const change = async (options?: { targetBranch?: string }) => {
execSync(GIT_COMMANDS.fetchOrigin());
const sourceBranch =
execSync(GIT_COMMANDS.currentBranchName()).toString().trim();
const targetBranch = options?.targetBranch || execSync(GIT_COMMANDS.defaultBranchName()).toString().trim();
const sourceBranch = execSync(GIT_COMMANDS.currentBranchName()).toString().trim();
const targetBranch =
options?.targetBranch || execSync(GIT_COMMANDS.defaultBranchName()).toString().trim();

try {
const commitsCount = getCommitsCount(`origin/${targetBranch}`, sourceBranch);
Expand Down
8 changes: 5 additions & 3 deletions cli/changelog/src/commands/verify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ import { GIT_COMMANDS } from '../utils/git/command';
import { getCommitsCount } from '../utils/git/getCommitsCount';
import { getExistingChangeFilePath } from '../utils/paths/getExistingChangeFilePath';

export const verify = async (options?: { sourceBranch?: string, targetBranch?: string }) => {
export const verify = async (options?: { sourceBranch?: string; targetBranch?: string }) => {
execSync(GIT_COMMANDS.fetchOrigin());
const sourceBranch = options?.sourceBranch || execSync(GIT_COMMANDS.currentBranchName()).toString().trim();
const targetBranch = options?.targetBranch || execSync(GIT_COMMANDS.defaultBranchName()).toString().trim();
const sourceBranch =
options?.sourceBranch || execSync(GIT_COMMANDS.currentBranchName()).toString().trim();
const targetBranch =
options?.targetBranch || execSync(GIT_COMMANDS.defaultBranchName()).toString().trim();

try {
const commitsCount = getCommitsCount(`origin/${targetBranch}`, sourceBranch);
Expand Down

0 comments on commit 2966331

Please sign in to comment.