dcloud git repositories importImport a repository from GitHub, GitLab or a git URL, optionally as a mirror
Answers 202 with the new repository; `importState.status` goes queued → running → succeeded/failed, with counts of branches, tags and pull requests. History, branches, tags, pull requests (as pull requests here, original author and link in the body) and the wiki (as `{name}.wiki`) come over; issues and releases are not carried over. The fetch runs on the server, so there is no 2 GiB push limit.
Synopsis
dcloud git repositories import --name name --source source [flags]Flags
--nameRequiredstring
Unique within the organization; part of the clone URL
Constraints: 1-100 chars, /^[A-Za-z0-9][A-Za-z0-9._-]*$/
--descriptionOptionalstring
One line about the repository, shown in lists and the About column
Constraints: max 500 chars
--visibilityOptionalenum
Who can see it; private when absent. public also needs git:PublishRepository
One of:
private,public--sourceRequiredobject
Where to import from: its URL and, optionally, the provider
Constraints: JSON
--tokenOptionalstring
GitHub/GitLab token for a private source or a higher API limit; kept (sealed) only for a mirror
Constraints: 1-500 chars
--includeOptionalobject
What comes over besides the git history: pull requests and the wiki (both by default)
Constraints: JSON
--mirrorOptionalobject
Keep following the source; pushes are refused while it mirrors
Constraints: JSON
--tagsOptionalmap of string
Tags for the new resource, e.g. {"env": "prod", "project": "shop"}. Keys your organization marks required must be present, or the create is refused with the missing keys (GET /tags/api/keys lists them).
Constraints: key=value
Example
dcloud git repositories import --name example --source '{}'Generated from the API description, the same one the API checks requests against and the CLI is built from.