mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-02 17:56:15 +01:00
update review/request docu and fix some status code parsing
This commit is contained in:
parent
42866b1e12
commit
5cdc422774
@ -165,10 +165,6 @@ def run(prg):
|
|||||||
print >>sys.stderr, e.msg
|
print >>sys.stderr, e.msg
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
except AttributeError, e:
|
|
||||||
print >>sys.stderr, e
|
|
||||||
return 1
|
|
||||||
|
|
||||||
except RPMError, e:
|
except RPMError, e:
|
||||||
print >>sys.stderr, e
|
print >>sys.stderr, e
|
||||||
return 1
|
return 1
|
||||||
|
@ -1546,21 +1546,14 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
help='print the buildstatus of the source package (only works with "show")')
|
help='print the buildstatus of the source package (only works with "show")')
|
||||||
@cmdln.alias("rq")
|
@cmdln.alias("rq")
|
||||||
@cmdln.alias("review")
|
@cmdln.alias("review")
|
||||||
|
# FIXME: rewrite this mess and split request and review
|
||||||
def do_request(self, subcmd, opts, *args):
|
def do_request(self, subcmd, opts, *args):
|
||||||
"""${cmd_name}: Show and modify requests
|
"""${cmd_name}: Show or modify requests and reviews
|
||||||
|
|
||||||
[See http://en.opensuse.org/openSUSE:Build_Service_Collaboration
|
[See http://en.opensuse.org/openSUSE:Build_Service_Collaboration
|
||||||
for information on this topic.]
|
for information on this topic.]
|
||||||
|
|
||||||
This command shows and modifies existing requests. To create new requests
|
The 'request' command has the following sub commands:
|
||||||
you need to call one of the following:
|
|
||||||
osc submitrequest
|
|
||||||
osc deleterequest
|
|
||||||
osc changedevelrequest
|
|
||||||
To send low level requests to the buildservice API, use:
|
|
||||||
osc api
|
|
||||||
|
|
||||||
This command has the following sub commands:
|
|
||||||
|
|
||||||
"list" lists open requests attached to a project or package or person.
|
"list" lists open requests attached to a project or package or person.
|
||||||
Uses the project/package of the current directory if none of
|
Uses the project/package of the current directory if none of
|
||||||
@ -1571,19 +1564,29 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
"show" will show the request itself, and generate a diff for review, if
|
"show" will show the request itself, and generate a diff for review, if
|
||||||
used with the --diff option. The keyword show can be omitted if the ID is numeric.
|
used with the --diff option. The keyword show can be omitted if the ID is numeric.
|
||||||
|
|
||||||
"decline" will change the request state to "declined" and append a
|
"decline" will change the request state to "declined"
|
||||||
message that you specify with the --message option.
|
|
||||||
|
|
||||||
"wipe" will permanently delete a request.
|
"wipe" will permanently delete a request
|
||||||
|
|
||||||
"revoke" will set the request state to "revoked" and append a
|
"revoke" will set the request state to "revoked"
|
||||||
message that you specify with the --message option.
|
|
||||||
|
|
||||||
"accept" will change the request state to "accepted" and will trigger
|
"accept" will change the request state to "accepted" and will trigger
|
||||||
the actual submit process. That would normally be a server-side copy of
|
the actual submit process. That would normally be a server-side copy of
|
||||||
the source package to the target package.
|
the source package to the target package.
|
||||||
|
|
||||||
"checkout" will checkout the request's source package. This only works for "submit" requests.
|
"checkout" will checkout the request's source package ("submit" requests only).
|
||||||
|
|
||||||
|
The 'review' command has the following sub commands:
|
||||||
|
|
||||||
|
"list" lists open requests that need to be reviewed by the
|
||||||
|
specified user or group
|
||||||
|
|
||||||
|
"add" adds a person or group as reviewer to a request
|
||||||
|
|
||||||
|
"accept" mark the review positive
|
||||||
|
|
||||||
|
"decline" mark the review negative. A negative review will
|
||||||
|
decline the request.
|
||||||
|
|
||||||
usage:
|
usage:
|
||||||
osc request list [-M] [-U USER] [-s state] [-D DAYS] [-t type] [-B] [PRJ [PKG]]
|
osc request list [-M] [-U USER] [-s state] [-D DAYS] [-t type] [-B] [PRJ [PKG]]
|
||||||
@ -1604,8 +1607,6 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
osc review add [-m TEXT] [-U USER] [-G GROUP] ID
|
osc review add [-m TEXT] [-U USER] [-G GROUP] ID
|
||||||
osc review accept [-m TEXT] ID
|
osc review accept [-m TEXT] ID
|
||||||
osc review decline [-m TEXT] ID
|
osc review decline [-m TEXT] ID
|
||||||
osc my sr # for submit requests I made
|
|
||||||
osc my rq # for requests for my packages/projects
|
|
||||||
|
|
||||||
${cmd_option_list}
|
${cmd_option_list}
|
||||||
"""
|
"""
|
||||||
@ -1694,7 +1695,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
if not opts.message:
|
if not opts.message:
|
||||||
opts.message = edit_message()
|
opts.message = edit_message()
|
||||||
r = http_POST(url, data=opts.message)
|
r = http_POST(url, data=opts.message)
|
||||||
print r.read()
|
print ET.parse(r).getroot().attrib['code']
|
||||||
|
|
||||||
# list and approvenew
|
# list and approvenew
|
||||||
elif cmd == 'list' or cmd == 'approvenew':
|
elif cmd == 'list' or cmd == 'approvenew':
|
||||||
|
@ -3300,7 +3300,8 @@ def change_review_state(apiurl, reqid, newstate, by_user='', message='', superse
|
|||||||
['request', reqid],
|
['request', reqid],
|
||||||
query={'cmd': 'changereviewstate', 'newstate': newstate, 'by_user': by_user, 'superseded_by': supersed})
|
query={'cmd': 'changereviewstate', 'newstate': newstate, 'by_user': by_user, 'superseded_by': supersed})
|
||||||
f = http_POST(u, data=message)
|
f = http_POST(u, data=message)
|
||||||
return f.read()
|
root = ET.parse(f).getroot()
|
||||||
|
return root.attrib['code']
|
||||||
|
|
||||||
def change_request_state(apiurl, reqid, newstate, message='', supersed=''):
|
def change_request_state(apiurl, reqid, newstate, message='', supersed=''):
|
||||||
u = makeurl(apiurl,
|
u = makeurl(apiurl,
|
||||||
|
Loading…
Reference in New Issue
Block a user