What part(s) of the article would you like to see updated?
When you rename a repository, all existing information, with the exception of project site URLs, is automatically redirected to the new name, including:
In addition to redirecting web traffic, all git clone, git fetch, or git push operations targeting the previous location will continue to function as if made on the new location. However, to reduce confusion, we strongly recommend updating any existing local clones to point to the new repository URL. You can do this by using git remote on the command line:
If you plan to rename a repository that has a GitHub Pages site, we recommend using a custom domain for your site. This ensures that the site's URL isn't impacted by renaming the repository. For more information, see "About custom domains and GitHub Pages site."
There should be a if you plan entry for if your repository hosts an action explaining that it will break all workflows relying on the old name.
The tip from lines 39 to 43 is not needed now that the article states this permissions requirement just under the title in large text. So we can convert this into a note for people who maintain repositories that host actions.
Change the tip callout into a note callout (see Formatting callouts for the syntax).
Replace the current text in the callout with an explanation that if the repository hosts an action they should avoid renaming the repository. Instead they should create a new repository with the new name and deprecate the old repository. If they rename the repository, all workflows that use the action will fail with the error repository not found. The action is not automatically redirected when a workflow runs to avoid security issues.
The text was updated successfully, but these errors were encountered:
@jsoref - thanks for passing on this feedback on the docs from the support community ✨
It was particularly helpful to have the link to the discussion, where the potential security implications of an automatic redirect were raised.
I agree that this article should flag the fact that this is an exception to the general redirection of URLs following the renaming of a repository. I suggest we check in with the Actions team on the best practice for renaming a repository that hosts an action, before deciding on the change to make to the article.
Hi @jsoref - I checked in with the Actions team and their advice is that it in this situation, it's probably better for people to keep the old repository and create a new one with the new name, instead of renaming. I suggest that we make the following changes to the article.
The tip from lines 39 to 43 is not needed now that the article states this permissions requirement just under the title in large text. So we can convert this into a note for people who maintain repositories that host actions.
Change the tip callout into a note callout (see Formatting callouts for the syntax).
Replace the current text in the callout with an explanation that if the repository hosts an action they should avoid renaming the repository. Instead they should create a new repository with the new name and deprecate the old repository. If they rename the repository, all workflows that use the action will fail with the error repository not found. The action is not automatically redirected when a workflow runs to avoid security issues.
@jsoref - Is this a change you were planning to make? If so, I'll leave this issue as is. If not, I'll update the issue summary with this content update plan and flag the issue as help wanted.
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/repositories/creating-and-managing-repositories/renaming-a-repository
What part(s) of the article would you like to see updated?
There should be a
if you plan
entry forif your repository hosts an action
explaining that it will break all workflows relying on the old name.Additional information
https://github.community/t/actions-not-auto-redirecting-when-action-repo-name-changes/229949
Maintainer update
Content update plan
Update the article on renaming repositories.
The tip from lines 39 to 43 is not needed now that the article states this permissions requirement just under the title in large text. So we can convert this into a note for people who maintain repositories that host actions.
repository not found
. The action is not automatically redirected when a workflow runs to avoid security issues.The text was updated successfully, but these errors were encountered: