Skip to content

Commit cd70b92

Browse files
ryan-williamsclaude
andcommitted
Fix CI: set git identity env vars in auto-init test
CI runners have no global `user.email`/`user.name`, so the auto- inited nested repo couldn't commit. Pre-existing tests pass because they `git init` + `git config user.email/name` on the nested repo themselves; the new test relies on `_ensure_nested_git_repo` to create the repo, so identity must come from env. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5cf2dbf commit cd70b92

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/test_create.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ def test_create_issue_succeeds_with_gh_gitignored(self, tmp_path, monkeypatch):
151151
(draft_dir / 'DESCRIPTION.md').write_text('# Test Issue\n\nBody\n')
152152

153153
monkeypatch.chdir(draft_dir)
154+
# Identity for the nested repo `_ensure_nested_git_repo` will create
155+
# (CI runners have no global git config)
156+
for var in ('GIT_AUTHOR_EMAIL', 'GIT_COMMITTER_EMAIL'):
157+
monkeypatch.setenv(var, 't@example.com')
158+
for var in ('GIT_AUTHOR_NAME', 'GIT_COMMITTER_NAME'):
159+
monkeypatch.setenv(var, 'T')
154160

155161
from ghpr.commands import create as create_mod
156162

0 commit comments

Comments
 (0)