Skip to content

Conversation

@google-labs-jules
Copy link
Contributor

The manual_tests/reset_test.py script was failing because it attempted to create git commits without configuring a git user/email, which causes git to error out in environments where these are not globally configured. Additionally, the test was hanging on the mstl reset prompt because it wasn't running in auto-confirm mode.

This change:

  1. Explicitly sets user.email and user.name in the temporary test repository.
  2. Passes the --yes flag to the reset command invocation within the test to bypass the confirmation prompt.

PR created automatically by Jules for task 11029969726033920909 started by @keiji

- Add explicit git user configuration (email/name) in `setup_repo` to prevent commit failures in environments without global git config.
- Add `--yes` flag to `mstl reset` command in the test to ensure it runs non-interactively as expected.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions
Copy link

Test Coverage Report

Total Coverage: 63.8%

Detailed Report
File Function Coverage
mistletoe/cmd/mstl-gh/main.go:15: main 0.0%
mistletoe/cmd/mstl/main.go:15: main 0.0%
mistletoe/internal/app/config_search.go:14: SearchParentConfig 77.3%
mistletoe/internal/app/config_search.go:67: validateParentConfig 64.0%
mistletoe/internal/app/dependency.go:24: LoadDependencies 100.0%
mistletoe/internal/app/dependency.go:34: ParseDependencies 100.0%
mistletoe/internal/app/dependency.go:132: extractID 100.0%
mistletoe/internal/app/dependency.go:140: addDependency 100.0%
mistletoe/internal/app/fire.go:16: handleFire 0.0%
mistletoe/internal/app/fire.go:40: resolveConfigForFire 0.0%
mistletoe/internal/app/fire.go:47: fireCommand 96.2%
mistletoe/internal/app/fire.go:100: processFireRepo 73.7%
mistletoe/internal/app/fire.go:140: runGitFire 100.0%
mistletoe/internal/app/fire.go:150: getSafeUsername 41.7%
mistletoe/internal/app/fire.go:172: sanitizeName 83.3%
mistletoe/internal/app/fire.go:184: getShortUUID 80.0%
mistletoe/internal/app/flags.go:14: ParseFlagsFlexible 93.1%
mistletoe/internal/app/flags.go:71: CheckFlagDuplicates 100.0%
mistletoe/internal/app/flags.go:95: isBoolFlag 100.0%
mistletoe/internal/app/help.go:7: handleHelp 100.0%
mistletoe/internal/app/init.go:25: ensureBranchExistsLocally 27.3%
mistletoe/internal/app/init.go:58: isDirEmpty 80.0%
mistletoe/internal/app/init.go:76: checkRootDirectorySafety 93.8%
mistletoe/internal/app/init.go:134: validateEnvironment 63.5%
mistletoe/internal/app/init.go:229: PerformInit 75.0%
mistletoe/internal/app/init.go:307: validateAndPrepareInitDest 77.3%
mistletoe/internal/app/init.go:349: handleInit 100.0%
mistletoe/internal/app/init.go:353: initCommand 85.3%
mistletoe/internal/app/pr.go:9: HandlePr 0.0%
mistletoe/internal/app/pr_body_logic.go:25: GenerateMistletoeBody 98.3%
mistletoe/internal/app/pr_body_logic.go:231: GeneratePlaceholderMistletoeBody 0.0%
mistletoe/internal/app/pr_body_logic.go:261: EmbedMistletoeBody 96.2%
mistletoe/internal/app/pr_body_logic.go:325: ParseMistletoeBlock 87.2%
mistletoe/internal/app/pr_checkout.go:18: handlePrCheckout 0.0%
mistletoe/internal/app/pr_checkout.go:24: prCheckoutCommand 23.6%
mistletoe/internal/app/pr_checkout.go:324: writeDependencyFile 100.0%
mistletoe/internal/app/pr_common.go:58: CollectPrStatus 45.7%
mistletoe/internal/app/pr_common.go:267: getPrDisplayState 42.9%
mistletoe/internal/app/pr_common.go:284: SortPrs 92.9%
mistletoe/internal/app/pr_common.go:316: RenderPrStatusTable 78.9%
mistletoe/internal/app/pr_common.go:353: executePush 0.0%
mistletoe/internal/app/pr_common.go:406: updatePrDescriptions 0.0%
mistletoe/internal/app/pr_common.go:548: parsePrURL 81.8%
mistletoe/internal/app/pr_common.go:566: getRepoName 66.7%
mistletoe/internal/app/pr_common.go:576: resolveRemoteBranchHash 69.2%
mistletoe/internal/app/pr_common.go:607: checkGhAvailability 100.0%
mistletoe/internal/app/pr_common.go:622: verifyGithubRequirements 61.2%
mistletoe/internal/app/pr_common.go:750: LoadDependencyGraph 92.3%
mistletoe/internal/app/pr_common_helper.go:10: GetGhUser 0.0%
mistletoe/internal/app/pr_common_helper.go:20: ValidatePrPermissionAndOverwrite 0.0%
mistletoe/internal/app/pr_common_helper.go:51: isPrFromConfiguredRepo 100.0%
mistletoe/internal/app/pr_create.go:21: handlePrCreate 0.0%
mistletoe/internal/app/pr_create.go:28: prCreateCommand 16.0%
mistletoe/internal/app/pr_create.go:526: executePrCreationOnly 57.8%
mistletoe/internal/app/pr_input_logic.go:19: ParsePrTitleBody 93.3%
mistletoe/internal/app/pr_status.go:16: handlePrStatus 0.0%
mistletoe/internal/app/pr_status.go:22: prStatusCommand 50.0%
mistletoe/internal/app/pr_update.go:18: handlePrUpdate 0.0%
mistletoe/internal/app/pr_update.go:24: prUpdateCommand 27.1%
mistletoe/internal/app/pr_update.go:247: categorizePrUpdate 100.0%
mistletoe/internal/app/pr_verify.go:13: VerifyRevisionsUnchanged 87.5%
mistletoe/internal/app/push.go:15: handlePush 83.3%
mistletoe/internal/app/reset.go:25: resolveResetTarget 100.0%
mistletoe/internal/app/reset.go:45: verifyResetTargetWithResolution 85.7%
mistletoe/internal/app/reset.go:82: handleReset 75.2%
mistletoe/internal/app/run.go:31: parseArgs 80.0%
mistletoe/internal/app/run.go:44: getGitPath 66.7%
mistletoe/internal/app/run.go:51: getGhPath 0.0%
mistletoe/internal/app/run.go:58: validateGit 100.0%
mistletoe/internal/app/run.go:63: validateGh 100.0%
mistletoe/internal/app/run.go:68: validateGhAuth 100.0%
mistletoe/internal/app/run.go:74: Run 0.0%
mistletoe/internal/app/run.go:82: RunApp 53.7%
mistletoe/internal/app/snapshot.go:20: handleSnapshot 83.5%
mistletoe/internal/app/snapshot.go:245: GenerateSnapshot 0.0%
mistletoe/internal/app/snapshot.go:258: GenerateSnapshotVerbose 76.9%
mistletoe/internal/app/snapshot.go:345: GenerateSnapshotFromStatus 89.5%
mistletoe/internal/app/snapshot.go:428: CalculateSnapshotIdentifier 76.9%
mistletoe/internal/app/status.go:14: handleStatus 91.5%
mistletoe/internal/app/status_logic.go:40: ValidateRepositoriesIntegrity 88.9%
mistletoe/internal/app/status_logic.go:80: CollectStatus 100.0%
mistletoe/internal/app/status_logic.go:110: getRepoStatus 88.2%
mistletoe/internal/app/status_logic.go:299: RenderStatusTable 95.0%
mistletoe/internal/app/status_logic.go:357: ValidateStatusForAction 100.0%
mistletoe/internal/app/switch.go:16: branchExists 100.0%
mistletoe/internal/app/switch.go:21: configureUpstreamIfSafe 76.2%
mistletoe/internal/app/switch.go:65: handleSwitch 82.0%
mistletoe/internal/app/sync.go:16: handleSync 80.7%
mistletoe/internal/app/utils.go:24: formatDuration 100.0%
mistletoe/internal/app/utils.go:34: RunGit 100.0%
mistletoe/internal/app/utils.go:66: RunGitInteractive 100.0%
mistletoe/internal/app/utils.go:97: RunGh 73.3%
mistletoe/internal/app/utils.go:128: RunEditor 76.0%
mistletoe/internal/app/utils.go:176: ResolveCommonValues 92.1%
mistletoe/internal/app/utils.go:266: DetermineJobs 100.0%
mistletoe/internal/app/version_common.go:11: printCommonVersionInfo 0.0%
mistletoe/internal/app/version_gh.go:11: handleVersionGh 0.0%
mistletoe/internal/app/version_mstl.go:4: handleVersionMstl 0.0%
mistletoe/internal/config/config.go:64: ParseConfig 100.0%
mistletoe/internal/config/config.go:84: validateConfig 95.0%
mistletoe/internal/config/config.go:163: isValidGitRef 100.0%
mistletoe/internal/config/config.go:173: GetRepoDirName 100.0%
mistletoe/internal/config/config.go:188: GetRepoPath 100.0%
mistletoe/internal/config/config.go:193: LoadConfigData 100.0%
mistletoe/internal/config/config.go:207: LoadConfigFile 78.6%
mistletoe/internal/ui/ui.go:16: AskForConfirmation 0.0%
mistletoe/internal/ui/ui.go:37: AskForConfirmationRequired 0.0%
mistletoe/internal/ui/ui.go:69: NewSpinner 0.0%
mistletoe/internal/ui/ui.go:78: Start 0.0%
mistletoe/internal/ui/ui.go:102: Stop 0.0%

@keiji keiji marked this pull request as ready for review January 21, 2026 14:24
@keiji keiji merged commit 44d1d58 into main Jan 21, 2026
1 check passed
@keiji keiji deleted the fix-reset-test-git-config-11029969726033920909 branch January 21, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants