actually test the previous commit in action ;(
This commit is contained in:
parent
3cb64d8381
commit
9160515913
@ -209,7 +209,7 @@ def do_staging(self, subcmd, opts, *args):
|
||||
api.rq_to_prj(rq, stprj)
|
||||
else:
|
||||
api.rm_from_prj(stprj, request_id=rq)
|
||||
api.add_review(request_id, by_group='factory-staging',
|
||||
api.add_review(rq, by_group='factory-staging',
|
||||
msg='Please recheck')
|
||||
elif cmd in ['move']:
|
||||
sprj = api.prj_from_letter(args[1])
|
||||
|
@ -630,7 +630,7 @@ class StagingAPI(object):
|
||||
|
||||
return list
|
||||
|
||||
def add_review(self, request_id, by_project=None, by_group=None):
|
||||
def add_review(self, request_id, by_project=None, by_group=None, msg=None):
|
||||
"""
|
||||
Adds review by project to the request
|
||||
:param request_id: request to add review to
|
||||
@ -645,16 +645,18 @@ class StagingAPI(object):
|
||||
if by_group and i.by_group == by_group and i.state == 'new':
|
||||
return
|
||||
|
||||
query = { 'cmd': 'addreview' }
|
||||
msg = None
|
||||
query = {}
|
||||
if by_project:
|
||||
query['by_project'] = by_project
|
||||
msg='Being evaluated by staging project "{0}"'.format(by_project)
|
||||
if not msg:
|
||||
msg = 'Being evaluated by staging project "{0}"'.format(by_project)
|
||||
if by_group:
|
||||
query['by_group'] = by_group
|
||||
msg='Being evaluated by group "{0}"'.format(by_group)
|
||||
if not msg:
|
||||
msg = 'Being evaluated by group "{0}"'.format(by_group)
|
||||
if len(query) == 0:
|
||||
raise oscerr.WrongArgs("We need a group or a project")
|
||||
query['cmd'] = 'addreview'
|
||||
url = makeurl(self.apiurl, ['request', str(request_id)], query)
|
||||
http_POST(url, data=msg)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user