diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aeb29e4..7194f183 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`. - Adds a warning to `mob start` in case the wip branch diverges from the main branch. diff --git a/mob.go b/mob.go index 89e654d3..3ff2ca3e 100644 --- a/mob.go +++ b/mob.go @@ -964,6 +964,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() @@ -979,6 +984,7 @@ func getMobTimerRoom(configuration Configuration) string { sayInfo("Using wip branch qualifier for room name") return currentWipBranchQualifier } + return configuration.TimerRoom }