Browse Source

Merge branch 'release/1.8.0'

liuyuqi-dellpc 4 months ago
parent
commit
107808106e

+ 2 - 1
repo_sync/platform/aliyun.py

@@ -48,7 +48,8 @@ class AliyunDevOps(BasePlatform):
         else:
             print(r.json())
             print(f'{bcolors.OKGREEN}create project {project_name} success{bcolors.ENDC}')
-
+            print(f'{bcolors.OKGREEN}{self._host}/{self.username}/{project_name}{bcolors.ENDC}')
+            
     def get_project_info(self, project_name: str):
         """get project info"""
         url = f'{self._api}/api/4/groups/find_by_path'

+ 1 - 0
repo_sync/platform/coding/coding.py

@@ -223,6 +223,7 @@ class CodingIE(BasePlatform):
                 r = self.sess.post(self.url, json=data)
                 if r.status_code == 200:
                     print(bcolors.OKGREEN + f'Create repo {repo_name} success' + bcolors.ENDC)
+                    print(bcolors.OKGREEN + f'https://e.coding.net/{self.username}/{self.project_name}/{repo_name}' + bcolors.ENDC)
                     return True
                 else:
                     print(bcolors.FAIL + 'Failed to create repo' + bcolors.ENDC)

+ 2 - 1
repo_sync/platform/gitcode.py

@@ -46,7 +46,8 @@ class GitcodeIE(BasePlatform):
                 print(bcolors.FAIL + f'create repo {repo_name} failed, status code {r.status_code}' + bcolors.ENDC)
                 return
             print(bcolors.OKGREEN + f'create repo {repo_name} success' + bcolors.ENDC)
-    
+            print(f'{bcolors.OKGREEN}{self._host}/{self.username}/{repo_name}{bcolors.ENDC}')
+            
     def delete(self, repo_name: str):
         """ delete a repo """
         url = f'{self._api}/repos/{self.username}/{repo_name}'

+ 2 - 1
repo_sync/platform/gitee.py

@@ -36,7 +36,8 @@ class GiteeIE(BasePlatform):
                 print(bcolors.FAIL + f'create repo {repo_name} failed, status code {r.status_code}' + bcolors.ENDC)
                 return
             print(bcolors.OKGREEN + f'create repo {repo_name} success' + bcolors.ENDC)
-    
+            print(bcolors.OKGREEN + f'{self._host}/{self.username}/{repo_name}' + bcolors.ENDC)
+
     def delete(self, repo_name: str):
         """delete a repo"""
         url = f'{self._api}/repos/{self.username}/{repo_name}'

+ 2 - 1
repo_sync/platform/github.py

@@ -40,7 +40,8 @@ class GithubIE(BasePlatform):
                 print(f'{bcolors.FAIL}create repo {repo_name} failed, status code {r.status_code}{bcolors.ENDC}')
                 return
             print(f'{bcolors.OKGREEN}create repo {repo_name} success{bcolors.ENDC}')
-
+            print(f'{bcolors.OKGREEN}{self._host}/{self.username}/{repo_name}{bcolors.ENDC}')
+            
     def delete(self, repo_name: str):
         """delete a repo, maybe request a confirm by input"""
         url = f'{self._host}/repos/{self.username}/{repo_name}'

+ 1 - 0
repo_sync/platform/gitlab.py

@@ -38,6 +38,7 @@ class GitlabIE(BasePlatform):
                 print(f"{bcolors.FAIL}create repo {repo_name} failed, status code {r.status_code}{bcolors.ENDC}")
                 return
             print(f"{bcolors.OKGREEN}create repo {repo_name} success{bcolors.ENDC}")
+            print(f'{bcolors.OKGREEN}{self.host}/{self.username}/{repo_name}{bcolors.ENDC}')
             # for repo in self.repos:
             #     if repo.name == repo_name:
             #         repo.url = r.json()["web_url"]

+ 2 - 1
repo_sync/platform/gogs.py

@@ -36,7 +36,8 @@ class GogsIE(BasePlatform):
             print(bcolors.FAIL + f'create org repo {repo_name} failed, status code {r.status_code}' + bcolors.ENDC)
             return
         print(bcolors.OKGREEN + f'create org repo {repo_name} success' + bcolors.ENDC)
-
+        print(f'{bcolors.OKGREEN}{self._host}/{org_name}/{repo_name}{bcolors.ENDC}')
+        
     def create_repo(self, repo_name: str):
         """create a repo"""
         url = f'{self._host}/api/v1/user/repos'