Skip to content

feat: add remote_repo variable - #3745

Open
canac wants to merge 1 commit into
max-sixty:mainfrom
canac:remote-repo-var
Open

feat: add remote_repo variable#3745
canac wants to merge 1 commit into
max-sixty:mainfrom
canac:remote-repo-var

Conversation

@canac

@canac canac commented Aug 5, 2026

Copy link
Copy Markdown

Add a remote_repo variable that returns the repo name from the remote URL. Unlike repo, it stays consistent even if the clone was renamed.

Feel free to reject, or suggest other names for the variable. But this change would improve my workflow. I hope you don't mind my submitting a PR before opening an issue. Thanks for an amazing developer tool!

AI Disclosure 🤖: I used Claude Code to generate the changes, but reviewed every line and made adjustments.

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both sites that populate ownerbuild_hook_context and UserConfig::format_path — are updated, so the changelog's "available everywhere owner is" holds; GitRemoteUrl::repo() already strips .git in split_namespace_repo, and REPO_VARS, the help table, and the generated doc mirrors all move together.

On the name you asked about: remote_repo reads well beside the existing remote and remote_url, and the prefix is what disambiguates it from repo (the directory on disk), so I'd keep it. Worth an explicit call from @max-sixty before it ships, though — template variable names are part of the config surface, so renaming after a release is a break.

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.

2 participants