mirror of
https://github.com/RGBCube/GitHub2Forgejo
synced 2025-05-31 10:48:11 +00:00
Better if arm placement
This commit is contained in:
parent
2805a41c63
commit
e5976fcaed
1 changed files with 6 additions and 6 deletions
12
migrate.nu
12
migrate.nu
|
@ -61,19 +61,19 @@ def main [
|
|||
$repo_urls | each {|url|
|
||||
let repo_name = $url | split row "/" | last
|
||||
|
||||
let repo_is_private = if $github_token != "" {
|
||||
let repo_is_private = if $github_token == "" {
|
||||
false
|
||||
} else {
|
||||
(
|
||||
http get ("https://api.github.com/repos/" + $github_user + "/" + $repo_name)
|
||||
-H [ Authorization $"token ($github_token)" ]
|
||||
).private
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
||||
let url = if $repo_is_private {
|
||||
$"https://($github_token)@github.com/($github_user)/($repo_name)"
|
||||
} else {
|
||||
let url = if not $repo_is_private {
|
||||
$url
|
||||
} else {
|
||||
$"https://($github_token)@github.com/($github_user)/($repo_name)"
|
||||
}
|
||||
|
||||
print --no-newline $"(ansi blue)($strategy | str replace "ed" "ing") ([public private] | get ($repo_is_private | into int)) repository to ($gitea_url)/($gitea_user)/($repo_name)..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue