Skip to content

Setup: suggest the GitHub email for email.to #129

Closed

Description

@JacobStephens2

Parent

#126

What to build

Setup suggests the user's GitHub email as email.to instead of the commented-out line. The suggestion is the public profile email from gh api user; if that is null or the call fails, it is git config --global user.email, unless that ends in @users.noreply.github.com, which can't receive mail. With neither, the commented-out line stays. Setup never asks for extra gh scopes (a default gh auth login token lacks the user scope needed for private addresses).

The suggestion is Setup-time only: a Run never looks it up, and a Run with --email and no email.to still stops for want of an address. When Setup edits an existing User config, an email.to already set is kept. See the spec in #126.

Acceptance criteria

  • With gh api user returning an email, thirdshift setup (no terminal, no User config) writes email.to set to it.
  • With the profile email null or gh api user failing, it writes the git user.email.
  • A @users.noreply.github.com git email is never written; the commented-out line is written instead.
  • With neither available, the commented-out line is written.
  • An existing email.to is never replaced.
  • A Run with --email and no email.to still stops with the missing-address error, calling no gh api user.
  • The fake gh answers api user with an email, null, or a failure.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions