1
Fork 0
mirror of https://github.com/RGBCube/github2forgejo synced 2026-01-13 00:31:02 +00:00

doc: mention that the script works for organizations too

This commit is contained in:
RGBCube 2025-10-24 19:36:51 +03:00
parent 0222427589
commit 18d6f21d6d
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
3 changed files with 44 additions and 20 deletions

View file

@ -10,16 +10,24 @@ Plain simple, just install [Nushell](https://nushell.sh) and run the script:
<summary>Help Output</summary>
```
Migrates a GitHub users repositories to a Forgejo instance.
Migrates a GitHub users or organizations repositories to a Forgejo instance.
Accepted environment variables:
GITHUB_USER: The user to fetch the repositories from. Case sensitive.
GITHUB_TOKEN: An access token for fetching private repositories. Optional.
GITHUB_USER:
The user or organization to fetch the repositories from.
Case sensitive.
GITHUB_TOKEN:
An access token for fetching private repositories.
Optional. Set to empty string to not ask interactively.
FORGEJO_URL: The URL to the Forgejo instance. Must include the protocol (https://).
FORGEJO_USER: The user to migrate the repositories to.
FORGEJO_TOKEN: An access token for the specified user.
FORGEJO_URL:
The URL to the Forgejo instance.
Must include the protocol (http(s)://) as it is not just a domain.
FORGEJO_USER:
The user or organization to migrate the repositories to.
FORGEJO_TOKEN:
An access token for the specified user.
STRATEGY:
The strategy. Valid options are "mirrored" or "cloned" (case insensitive).

View file

@ -43,19 +43,27 @@
You must set ALL of these environment variables:
GITHUB_USER: The user to fetch the repositories from.
GITHUB_TOKEN: An access token for fetching private repositories. Optional.
FORGEJO_URL: The URL to the Forgejo instance. Must include the protocol (https://).
FORGEJO_USER: The user to migrate the repositories to.
FORGEJO_TOKEN: An access token for the specified user.
GITHUB_USER:
The user or organization to fetch the repositories from.
Case sensitive.
GITHUB_TOKEN:
An access token for fetching private repositories.
Optional. Set to empty string to not ask interactively.
FORGEJO_URL:
The URL to the Forgejo instance.
Must include the protocol (http(s)://) as it is not just a domain.
FORGEJO_USER:
The user or organization to migrate the repositories to.
FORGEJO_TOKEN:
An access token for the specified user.
STRATEGY:
The strategy. Valid options are "mirrored" or "cloned" (case insensitive).
"mirrored" will mirror the repository and tell the Forgejo instance to
periodically update it, "cloned" will only clone once. "cloned" is
useful if you are never going to use GitHub again.
FORCE_SYNC:
Whether to delete a mirrored repo from the Forgejo instance if the
source on GitHub doesn't exist anymore. Must be either "true" or "false".

View file

@ -8,16 +8,24 @@ def or-default [default: closure] {
}
}
# Migrates a GitHub users repositories to a Forgejo instance.
# Migrates a GitHub users or organizations repositories to a Forgejo instance.
#
# Accepted environment variables:
#
# GITHUB_USER: The user to fetch the repositories from. Case sensitive.
# GITHUB_TOKEN: An access token for fetching private repositories. Optional.
# GITHUB_USER:
# The user or organization to fetch the repositories from.
# Case sensitive.
# GITHUB_TOKEN:
# An access token for fetching private repositories.
# Optional. Set to empty string to not ask interactively.
#
# FORGEJO_URL: The URL to the Forgejo instance. Must include the protocol (https://).
# FORGEJO_USER: The user to migrate the repositories to.
# FORGEJO_TOKEN: An access token for the specified user.
# FORGEJO_URL:
# The URL to the Forgejo instance.
# Must include the protocol (http(s)://) as it is not just a domain.
# FORGEJO_USER:
# The user or organization to migrate the repositories to.
# FORGEJO_TOKEN:
# An access token for the specified user.
#
# STRATEGY:
# The strategy. Valid options are "mirrored" or "cloned" (case insensitive).