Skip to content

Commit

Permalink
Merge pull request #295 from maciej-stanuch/mob_timer_should_work_any…
Browse files Browse the repository at this point in the history
…where_on_the_system

[#293] Mob timer should work anywhere on the system
  • Loading branch information
simonharrer authored Jul 12, 2022
2 parents dabfa7d + 3dc99fe commit 9705b9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions mob.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -979,6 +984,7 @@ func getMobTimerRoom(configuration Configuration) string {
sayInfo("Using wip branch qualifier for room name")
return currentWipBranchQualifier
}

return configuration.TimerRoom
}

Expand Down

0 comments on commit 9705b9a

Please sign in to comment.