提交 1eb734a1 编写于 作者: S Shinwell Hu

check if repo already exist

上级 280f1765
......@@ -40,6 +40,11 @@ if __name__ == "__main__":
nr["protected_branches"] = ["master"]
nr["type"] = "public"
exist = [ x for x in repo["repositories"] if x["name"] == args.name ]
if exist != []:
print("Repo already exist")
sys.exit(1)
if repo["community"] == "openeuler":
repo["repositories"].append(nr)
elif repo["community"] == "src-openeuler":
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册