remotemobprogramming / mob

Tool for smooth git handover.
https://mob.sh
MIT License
1.66k stars 149 forks source link

MOB_SKIP_CI_PUSH_OPTION_ENABLED is evaluated incorrectly #434

Closed stefanscheidt closed 2 months ago

stefanscheidt commented 2 months ago

The new config option MOB_SKIP_CI_PUSH_OPTION_ENABLED is evaluated incorrectly. When set to true, no push option is appended. When set to false, the push option "ci.skip" is appended. It should be the other way around, right?

see mob.go func gitPushArgs:

func gitPushArgs(c config.Configuration) []string {
    pushArgs := []string{"push"}
    if c.SkipCiPushOptionEnabled {
        return pushArgs
    } else {
        return append(pushArgs, "--push-option", "ci.skip")
    }
}

P.S.: The new option is not yet documented in the README.

hollesse commented 2 months ago

Hi @stefanscheidt thanks for your bug report. You are right this is a bug and should be fixed!

stefanscheidt commented 2 months ago

mob_test.go::TestStartWithCISkip also looks a little bit suspicious.

I'm currently on vacation. Maybe I'll find the time to learn a little bit of Go and create a PR ...