summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-03-18 02:24:14 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-03-18 02:24:14 +0900
commitb73eb710e42985789c0e029bd982a44be614105e (patch)
treeef2ccc98132bd24627cbf167537bf3d3a6d9277c /src/utils
parentFix (diff)
downloadsharkey-b73eb710e42985789c0e029bd982a44be614105e.tar.gz
sharkey-b73eb710e42985789c0e029bd982a44be614105e.tar.bz2
sharkey-b73eb710e42985789c0e029bd982a44be614105e.zip
Clean up
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/lastCommitInfo.ts21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/utils/lastCommitInfo.ts b/src/utils/lastCommitInfo.ts
deleted file mode 100644
index 9682365dad..0000000000
--- a/src/utils/lastCommitInfo.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import Logger from './logger';
-import * as chalk from 'chalk';
-import prominence = require('prominence');
-import git = require('git-last-commit');
-
-export default class {
- static async show(): Promise<void> {
- let logger = new Logger('LastCommit');
- try {
- const commit = await prominence(git).getLastCommit();
- const shortHash: string = commit.shortHash;
- const hash: string = commit.hash;
- const commitDate = new Date(parseInt(commit.committedOn, 10) * 1000).toLocaleDateString('ja-JP');
- const commitTime = new Date(parseInt(commit.committedOn, 10) * 1000).toLocaleTimeString('ja-JP');
- logger.info(`${shortHash}${chalk.gray(hash.substr(shortHash.length))}`);
- logger.info(`${commit.subject} ${chalk.green(`(${commitDate} ${commitTime})`)} ${chalk.blue(`<${commit.author.name}>`)}`);
- } catch (e) {
- logger.info('No commit information found');
- }
- }
-}