Repository navigation
Setup: suggest the GitHub email for email.to - #137
Merged
Merged
Conversation
The public profile email from gh api user, else the global git user.email unless it is a @users.noreply.github.com address; with neither, email.to stays commented out. A Run never looks it up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Setup now suggests an address for
email.toinstead of always writing it commented out.Only Setup looks the address up. A Run never does, so
--emailwith no address and noemail.tostill stops the Run. Setup never asksghfor extra scopes. An existing User config is still left as it is, so anemail.tothat is already set is never replaced.The fake
ghnow answersapi userwith a public email ornull(user_email), andgh fake fails 'api user'makes it fail.Scenariohas three new helpers:github_email_is,github_profile_failsandgit_email_is.Evidence
thirdshift setupalways wrote# to = "you@example.com", even whengh api userknew the address.After:
tests/setup.rspasses 13/13, including these new tests:a_suggested_address_sets_email_to_in_place_of_the_commented_out_linechecks TOML quoting and comment alignment. The fullcargo testpasses and clippy is clean.Merge Danger
Door: two-way
The change only affects how a new User config is written. Reverting it brings back the commented-out line.
Blast Radius: small
Only
thirdshift setupon a machine with no User config is affected. It now makes one extragh api usercall, and if that call fails Setup falls back to git.Unaddressed findings
Standards
suggested_addressbuilds its ownGitand callsgithubdirectly instead of accepting dependencies: thirdshift setup #126 says "No new seam goes into the production code". The fakeghand the Scenario gitconfig are the seam this repo already uses.NO_EMAIL_TOcopies a line ofDEFAULTS: a unit test asserts thatDEFAULTScontains that line exactly, so the replacement can't silently stop matching.Spec
email.to: Setup doesn't edit existing files yet. Whether a suggestion fills a missing key belongs to the issue that adds key-merging.git_email_is(None)panics if the key is already unset: every Scenario setsuser.email, so this can't happen today.Closes #129
🤖 Generated with Claude Code