diff --git a/CHANGELOG.md b/CHANGELOG.md index b5790fbe..083f401e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # 3.1.5 - Add a more specific error message if `git` is not installed. +- Allow for using `mob timer` outside of git repositories. - Fix: `mob done --squash-wip` now successfully auto-merges auto-mergeable diverging changes. - Print the help output whenever any kind of help argument (`help`, `--help`, `-h`) is present in the command, e.g. `mob s 10 -h`. - Various fixes in suggestion of next typist: diff --git a/mob.go b/mob.go index 39f928e3..78aa6e42 100644 --- a/mob.go +++ b/mob.go @@ -951,6 +951,11 @@ func startTimer(timerInMinutes string, configuration Configuration) { } func getMobTimerRoom(configuration Configuration) string { + if !isGit() { + debugInfo("timer not in git repository, using MOB_TIMER_ROOM for room name") + return configuration.TimerRoom + } + currentWipBranchQualifier := configuration.WipBranchQualifier if currentWipBranchQualifier == "" { currentBranch := gitCurrentBranch() @@ -966,6 +971,7 @@ func getMobTimerRoom(configuration Configuration) string { sayInfo("Using wip branch qualifier for room name") return currentWipBranchQualifier } + return configuration.TimerRoom }