Skip to content

Commit

Permalink
🎨 Improve code style
Browse files Browse the repository at this point in the history
  • Loading branch information
carloscuesta committed Oct 13, 2017
1 parent 42182b4 commit 390a0ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
19 changes: 9 additions & 10 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@ const getAutoAdd = () => config.get(constants.AUTO_ADD)
const getEmojiFormat = () => config.get(constants.EMOJI_FORMAT)
const getIssueFormat = () => config.get(constants.ISSUE_FORMAT)
const getSignedCommit = () => config.get(constants.SIGNED_COMMIT)

const setAutoAdd = (autoAdd) => config.set(constants.AUTO_ADD, autoAdd)
const setEmojiFormat = (emojiFormat) =>
config.set(constants.EMOJI_FORMAT, emojiFormat
)
const setIssueFormat = (issueFormat) =>
config.set(constants.ISSUE_FORMAT, issueFormat
)
const setSignedCommit = (signedCommit) =>
config.set(constants.SIGNED_COMMIT, signedCommit
)
const setEmojiFormat = (emojiFormat) => {
config.set(constants.EMOJI_FORMAT, emojiFormat)
}
const setIssueFormat = (issueFormat) => {
config.set(constants.ISSUE_FORMAT, issueFormat)
}
const setSignedCommit = (signedCommit) => {
config.set(constants.SIGNED_COMMIT, signedCommit)
}

module.exports = {
getAutoAdd,
Expand Down
4 changes: 1 addition & 3 deletions src/gitmoji.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,7 @@ class GitmojiCli {
const reference = (answers.reference)
? `${prefixReference}${answers.reference}`
: ''
const signed = config.getSignedCommit()
? '-S'
: ''
const signed = config.getSignedCommit() ? '-S' : ''
const body = `${answers.message} ${reference}`
const commit = `git commit ${signed} -m "${title}" -m "${body}"`

Expand Down

0 comments on commit 390a0ff

Please sign in to comment.