blob: 4e479fdb392cd390857d1394b0c697d399ad6e86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
description = "Clone a public git repository into the user's project tree. The folder comes from the host: github.com -> GITHUB, gitlab.com -> GITLAB, forge.slackware.nl -> FORGE, plus hosts remembered from earlier clones. The repository lands in its owner's name, e.g. https://github.com/evgen2571/wallpapers goes to GITHUB/evgen2571-wallpapers (just the repo name when the URL has no owner or owner and repo are the same). Call it with url and nothing else; when the host is known and the repo is not there yet it clones straight away. If it answers that the host has no folder, or that the repo is already cloned, it did nothing: ask the user exactly as that answer says, then call again with the to or update it names. Never clone a repo under a different name when it is already there; offer to update it."
command = ["clone.sh", "{url}", "{to}", "{update}"]
timeout = 300
[params.url]
type = "string"
description = "Repository URL, e.g. https://github.com/owner/repo.git"
[params.to]
type = "string"
description = "Only when the user approved a new host folder: the folder name (e.g. CODEBERG). Empty otherwise."
[params.update]
type = "string"
description = "1 to pull an already-cloned repository. Empty otherwise."
|