No description
- Shell 100%
| copy.sh | copy: Only specify "repo_owner" for Org repos. | |
| README.md | readme: Add org creation step for copy script. | |
| redirect.sh | Update permissions on redirect.sh | |
| template.md | First commit. | |
Some scripts I quickly wrote to copy my GitHub repositories over to Codeberg.
Copy
This script:
- Iterates through repositories (defaults to "user" repos only unless specified otherwise).
- If the target repository is from a GitHub organization, create the same organization on Codeberg if it doesn't exist.
- Migrates the code and issues from GitHub to a public repo on Codeberg.
Requirements:
- github-cli - Because I couldn't be bothered handling API pagination.
- GH_TOKEN - Environment variable holding your GitHub Personal Access Token
- CB_TOKEN - Environment variable holding your Codeberg Personal Access Token
Usage: ./copy.sh [-t <all|org|user>]
options:
-t the type of repositories to process. Defaults to 'user'.
Redirect
This script:
- Iterates through a user’s repositories.
- Deletes the repository (to get rid of history, issues, etc).
- Creates and clones a repository of the same name.
- Adds a README.md pointing to the new location.
- Pushes the file over to GitHub over SSH.
Requirements:
- github-cli - Because I had it installed for the previous script
- GH_TOKEN - Environment variable holding your GitHub Personal Access Token
- Replace cb-username with your Codeberg username
- Replace gh-username with your GitHub username