remove review_url and --build

This commit is contained in:
江畅
2020-08-21 17:42:12 +08:00
parent 75a83bb190
commit 520fed2cbc
3 changed files with 23 additions and 23 deletions
+2 -2
View File
@@ -1365,8 +1365,8 @@ class Project(object):
if not branch.LocalMerge:
raise GitError('branch %s does not track a remote' % branch.name)
if not opt.ignore_review and branch.remote.review:
raise GitError('remote %s has review url, use `repo upload` instead.' % branch.remote.name)
# if not opt.ignore_review and branch.remote.review:
# raise GitError('remote %s has review url, use `repo upload` instead or use `repo push --`.' % branch.remote.name)
if opt.new_branch:
dest_branch = branch.name
+18 -18
View File
@@ -25,13 +25,13 @@ class GiteePr(Command):
common = True
helpSummary = "Show gitee pull request list"
helpUsage = """
%prog [--build] [<project>...]
%prog [<project>...]
"""
def _Options(self, p):
p.add_option('--build',
dest='build', action='store_true',
help="To trigger ci with repo's config hook")
# def _Options(self, p):
# p.add_option('--build',
# dest='build', action='store_true',
# help="To trigger ci with repo's config hook")
def Execute(self, opt, args):
"""
@@ -84,19 +84,19 @@ class GiteePr(Command):
except Exception as e:
sys.stderr.write('ERROR: %s\n' % e)
sys.exit(1)
if opt.build:
hook_url = self.manifest.manifestProject.config.GetString('repo.hook')
if not hook_url:
sys.stderr.write('repo.hook is None, Please set it, you need `repo config -h`\n')
sys.exit(1)
try:
response = requests.post(hook_url, json=json.dumps(result), timeout=5)
except Exception as e:
sys.stderr.write('POST HOOK ERROR: %s\n' % e)
sys.exit(1)
print('POST HOOK SUCCESS')
print('STATUS: %s' % response.status_code)
print('BODY: %s' % response.content)
# if opt.build:
# hook_url = self.manifest.manifestProject.config.GetString('repo.hook')
# if not hook_url:
# sys.stderr.write('repo.hook is None, Please set it, you need `repo config -h`\n')
# sys.exit(1)
# try:
# response = requests.post(hook_url, json=json.dumps(result), timeout=5)
# except Exception as e:
# sys.stderr.write('POST HOOK ERROR: %s\n' % e)
# sys.exit(1)
# print('POST HOOK SUCCESS')
# print('STATUS: %s' % response.status_code)
# print('BODY: %s' % response.content)
+3 -3
View File
@@ -142,9 +142,9 @@ Gerrit Code Review: http://code.google.com/p/gerrit/
p.add_option('--br',
type='string', action='store', dest='branch',
help='branch to push.')
p.add_option('--ignore_review',
dest='ignore_review', action='store_true',
help='run even has review defined.')
# p.add_option('--ignore_review',
# dest='ignore_review', action='store_true',
# help='run even has review defined.')
def _SingleBranch(self, opt, branch, peoples):
project = branch.project