Skip to content

[pull] trunk from cli:trunk - #215

Merged
pull[bot] merged 7 commits into
arc675:trunkfrom
cli:trunk
Aug 11, 2026
Merged

[pull] trunk from cli:trunk#215
pull[bot] merged 7 commits into
arc675:trunkfrom
cli:trunk

Conversation

@pull

@pull pull Bot commented Aug 11, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

BagToad and others added 7 commits August 10, 2026 12:44
Matches the convention already used by internal/prompter, pkg/cmd/run/shared,
and pkg/cmd/workflow/shared for their test helper files.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Config from GIT_CONFIG_COUNT and GIT_CONFIG_PARAMETERS is command line scope,
which outranks both the global and system files, so pointing GIT_CONFIG_GLOBAL
at an empty file was not enough on its own. An inherited safe.bareRepository=explicit
made git refuse to open the bare fixtures at all.

Replaces the copy of this helper in each of the two packages that needed it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
go-gh reads GH_TOKEN and friends ahead of any stored config, so isolating the
config file left tests authenticated for anyone with a token exported. Nine
packages failed as a result.

The token test set its own env vars before building the config, which the
clearing would undo, so it now sets them after.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The helper only ever produced an empty config, so tests needing populated hosts
had to reach for the mock instead and lost the env isolation that comes with it.

Test_mightBeGHESUser was one of those. Its cases named "no env vars" never
cleared any, so they failed whenever GH_ENTERPRISE_TOKEN or GH_HOST was set.
Its table now holds config strings rather than prebuilt configs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Neither mock constructor had a doc comment, so nothing signalled which of the
three to reach for. Each now says what it does and points at the other.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
NewBlankConfig and NewFromString gave no hint that what came back was a mock,
which made them the default choice even where the real config was wanted. Every
other mock constructor in the repo already announces itself, as in NewMockPrompter
and NewMockFinder.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Isolate tests from local machine's auth and git configuration
@pull pull Bot locked and limited conversation to collaborators Aug 11, 2026
@pull pull Bot added the ⤵️ pull label Aug 11, 2026
@pull
pull Bot merged commit a526307 into arc675:trunk Aug 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants