[ADD] fork project with fast option
- Ignore the repo if already created
This commit is contained in:
parent
face278168
commit
47714027ab
1 changed files with 4 additions and 0 deletions
|
|
@ -39,6 +39,8 @@ def get_config():
|
||||||
help="Ignore fork to generate only manifest.")
|
help="Ignore fork to generate only manifest.")
|
||||||
parser.add_argument('-f', "--force", action="store_true",
|
parser.add_argument('-f', "--force", action="store_true",
|
||||||
help="Force rewrite remote.")
|
help="Force rewrite remote.")
|
||||||
|
parser.add_argument("--fast", action="store_true",
|
||||||
|
help="Ignore if repo already exist.")
|
||||||
parser.add_argument('--github_token', dest="github_token",
|
parser.add_argument('--github_token', dest="github_token",
|
||||||
default=config.get(CST_EL_GITHUB_TOKEN),
|
default=config.get(CST_EL_GITHUB_TOKEN),
|
||||||
help="GitHub token generated by user")
|
help="GitHub token generated by user")
|
||||||
|
|
@ -69,6 +71,8 @@ def main():
|
||||||
for repo in lst_repo:
|
for repo in lst_repo:
|
||||||
i += 1
|
i += 1
|
||||||
print(f"Nb element {i}/{total} - {repo.get('project_name')}")
|
print(f"Nb element {i}/{total} - {repo.get('project_name')}")
|
||||||
|
if config.fast and repo.get("is_submodule") and os.path.isdir(repo.get("path")):
|
||||||
|
continue
|
||||||
url = repo.get("url")
|
url = repo.get("url")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue