Skip to content

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

Open
kylemonette wants to merge 1 commit into
PreTeXtBook:mainfrom
kylemonette:deploy-repo-name
Open

Fix stale repo name in deploy links after GitHub rename#1225
kylemonette wants to merge 1 commit into
PreTeXtBook:mainfrom
kylemonette:deploy-repo-name

Conversation

@kylemonette

Copy link
Copy Markdown

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.

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.

1 participant