Skip to content

Let loopway config set the GitHub bot (token, name, email) - #59

Merged
mcwhittemore merged 2 commits into
mainfrom
issue-58-config-github-bot
Oct 8, 2026
Merged

mcwhittemore merged 2 commits into
mainfrom
issue-58-config-github-bot

Conversation

@mcwhittemore

@mcwhittemore mcwhittemore commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

loopway config can now set the GitHub bot that loopway threads sessions act as (added in #51). Before this you had to edit ~/.loopway/config.json or use the env vars.

What changed

  • loopway config has new --github-token, --github-name and --github-email flags.
  • In a terminal it prompts for each one after the URL. The token uses a password field. Name and email start from the saved value. An empty answer keeps the saved value.
  • It saves all three or none. A partial set is a usage error, and nothing is written. Without a terminal, any flag you leave out keeps its saved value, so loopway config --github-token ghp_new rotates just the token.
  • readGithubBot is split out of loadGithubBot so config can read the saved block without the env overrides. loadGithubBot's error now says to run loopway config.
  • Updated the README's "Acting as a GitHub bot" section and the command's help text.

Defaults I picked

  • If the token prompt is left empty and no token is saved, it doesn't ask for the name and email, since there's no bot to configure. Without a token, any name or email still has to come from flags, and a partial set is rejected.
  • After saving, config prints GitHub bot: <name> <email>.
  • There's no way to remove a saved bot from config, because an empty answer keeps the saved value. The issue didn't ask for one.

Tests

Added a test for config with only some of the bot set (rejected, nothing saved), with all three set, and with one flag changed (the others are kept). Typecheck, lint and prettier pass. The CLI suite is flaky when it runs in parallel with the web suite (npm test at the root): a different timing-sensitive test failed in 2 runs. The same flake happens on unmodified main (1 of 3 runs), and npm test in packages/cli alone passes.

No deploy steps.

Closes #58

🤖 Generated with Claude Code

Adds --github-token, --github-name and --github-email to `loopway config`.
In a terminal it prompts for each one, starting from the saved value, with
the token in a password field; an empty answer keeps the saved value. It
saves all three or none.

Closes #58

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
loopway Ready Ready Preview Oct 8, 2026 5:56pm UTC

Request Review

@mcwhittemore

Copy link
Copy Markdown
Collaborator Author

fix the conflicts

config no longer takes a key, so the GitHub bot is set alongside the URL
and written without a /me check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mcwhittemore

Copy link
Copy Markdown
Collaborator Author

Merged main to fix the conflicts with #57. config now sets only the URL (no key and no /me check), so it sets the URL and the GitHub bot together and writes them straight away. The partial-bot check still runs before anything is written. Typecheck, lint, prettier and the CLI tests pass. I also updated the PR description.

@mcwhittemore
mcwhittemore merged commit 6ee4e69 into main Oct 8, 2026
3 checks passed
@mcwhittemore
mcwhittemore deleted the issue-58-config-github-bot branch October 8, 2026 18:00

This branch was previously deployed

1 inactive deployment
Preview — b81cd996 Deployed Oct 8, 2026 by vercel[bot]
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.

loopway config should set the GitHub bot (token, name, email)

1 participant