UNPKG

backport

Version:

A CLI tool that automates the process of backporting commits

24 lines 793 B
import os from 'node:os'; import path from 'node:path'; export function getBackportDirPath() { return path.join(os.homedir(), '.backport'); } export function getLogfilePath({ logFilePath, logLevel, }) { if (logFilePath) { return path.resolve(logFilePath); } return path.join(os.homedir(), '.backport', `backport.${logLevel}.log`); } export function getGlobalConfigPath(globalConfigFile) { if (globalConfigFile) { return path.resolve(globalConfigFile); } return path.join(os.homedir(), '.backport', 'config.json'); } export function getRepoPath({ repoOwner, repoName, workdir, }) { if (workdir) { return workdir; } return path.join(os.homedir(), '.backport', 'repositories', repoOwner, repoName); } //# sourceMappingURL=env.js.map