UNPKG

git-release-manager

Version:

A tool to generate release notes from git commit history

26 lines 1.17 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCurrentRepositoryAsync = getCurrentRepositoryAsync; const remoteHandler_1 = require("./remoteHandler"); const branchHandler_1 = require("./branchHandler"); const tagHandler_1 = require("./tagHandler"); const commitHandler_1 = require("./commitHandler"); const statusHandler_1 = require("./statusHandler"); const cmd_1 = require("../../../utils/cmd"); async function getCurrentRepositoryAsync() { const [{ stdout: remoteUrl }, { stdout: name }] = await Promise.all([ (0, cmd_1.execWithErrorHandling)('git config --get remote.origin.url'), (0, cmd_1.execWithErrorHandling)('git rev-parse --show-toplevel'), ]); const result = { name: name.trim(), path: name.trim(), remote: (0, remoteHandler_1.parseRemoteUrl)(remoteUrl.trim()), branches: await (0, branchHandler_1.getBranchesAsync)(), tags: await (0, tagHandler_1.getTagsAsync)(), commits: await (0, commitHandler_1.getCommitsAsync)(), status: await (0, statusHandler_1.getStatusAsync)(), }; return result; } //# sourceMappingURL=index.js.map