MCPcopy Create free account
hub / github.com/remotemobprogramming/mob / getMobTimerRoom

Function getMobTimerRoom

timer.go:64–87  ·  view source on GitHub ↗
(configuration config.Configuration)

Source from the content-addressed store, hash-verified

62}
63
64func getMobTimerRoom(configuration config.Configuration) string {
65 if !isGit() {
66 say.Debug("timer not in git repository, using MOB_TIMER_ROOM for room name")
67 return configuration.TimerRoom
68 }
69
70 currentWipBranchQualifier := configuration.WipBranchQualifier
71 if currentWipBranchQualifier == "" {
72 currentBranch := gitCurrentBranch()
73 currentBaseBranch, _ := determineBranches(currentBranch, gitBranches(), configuration)
74
75 if currentBranch.IsWipBranch(configuration) {
76 wipBranchWithoutWipPrefix := currentBranch.removeWipPrefix(configuration).Name
77 currentWipBranchQualifier = removePrefix(removePrefix(wipBranchWithoutWipPrefix, currentBaseBranch.Name), configuration.WipBranchQualifierSeparator)
78 }
79 }
80
81 if configuration.TimerRoomUseWipBranchQualifier && currentWipBranchQualifier != "" {
82 say.Info("Using wip branch qualifier for room name")
83 return currentWipBranchQualifier
84 }
85
86 return configuration.TimerRoom
87}
88
89func StartBreakTimer(timerInMinutes string, configuration config.Configuration) {
90 if err := startBreakTimer(timerInMinutes, configuration); err != nil {

Callers 2

startTimerFunction · 0.85
startBreakTimerFunction · 0.85

Calls 9

DebugFunction · 0.92
InfoFunction · 0.92
isGitFunction · 0.85
gitCurrentBranchFunction · 0.85
determineBranchesFunction · 0.85
gitBranchesFunction · 0.85
removePrefixFunction · 0.85
IsWipBranchMethod · 0.80
removeWipPrefixMethod · 0.80

Tested by

no test coverage detected