Skip to content

Fix stale repo name in deploy links after GitHub rename - #1225

Merged
oscarlevin merged 4 commits into
PreTeXtBook:mainfrom
kylemonette:deploy-repo-name
Nov 22, 2026
Merged

oscarlevin merged 4 commits into
PreTeXtBook:mainfrom
kylemonette:deploy-repo-name

Conversation

@kylemonette

Copy link
Copy Markdown
Contributor

utils.py builds links in the deploy output from the GitHub repo name/owner parsed out of the local git remote URL.
Therefore, if the name of the repository or the owner changes, the links are never updated and may fail: for example,

Your built project will soon be available to the public at: https://johnsmith.github.io/old_repo_name

might not be a valid link if old_repo_name was changed after the first deployment.

Now it resolves the current name via the GitHub API after parsing the remote, falling back to the locally parsed name if that call fails.

kylemonette and others added 4 commits September 1, 2026 08:05
…elog

The GitHub API lookup now runs only when we are about to push to a
github.com remote: with --no-push the links it corrects are never printed
(and the user may be offline), and for other hosts the same owner/name on
GitHub could be an unrelated repository. Also import requests at module
level, since it is a required dependency, and record the fix in the
changelog, including that deploy no longer prints a token-bearing remote URL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@oscarlevin
oscarlevin merged commit 825ab49 into PreTeXtBook:main Nov 22, 2026
8 checks passed
@oscarlevin

Copy link
Copy Markdown
Member

Thanks for this and your patience with my slow merge

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