Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gyr committed Apr 3, 2023
1 parent 9216408 commit a7d8efc
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ install_requires =
argcomplete
requests
PyYAML
osc
osc>=1.0
jira
lxml
rpmfile
Expand Down
20 changes: 14 additions & 6 deletions sle_prjmgr_tools/list_accepted_pkgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ def osc_get_submit_requests(project: str):
:param project: The project that should be checked.
:return: The list of requests objects that are found with the state accepted and that are submitted.
"""
return core.get_review_list(
"https://api.suse.de", project=project, states=("accepted"), req_type="submit"
return core.get_request_collection(
apiurl="https://api.suse.de",
project=project,
states=("accepted",),
types=["submit"],
)


Expand All @@ -50,8 +53,11 @@ def osc_get_delete_requests(project: str):
:param project: The project that should be checked.
:return: The list of requests objects that are found with the state accepted and that are deleting a package.
"""
return core.get_review_list(
"https://api.suse.de", project=project, states=("accepted"), req_type="delete"
return core.get_request_collection(
apiurl="https://api.suse.de",
project=project,
states=("accepted",),
types=["delete"],
)


Expand Down Expand Up @@ -90,14 +96,16 @@ def main_cli(args):
print("==============================")
for request in submit_requests:
print(
f"{request.actions[0].src_package} ({request.state.when}) https://api.suse.de/{request.reqid}"
f"({request.state.when}) {request.actions[0].src_package} "
f"https://build.suse.de/request/show/{request.reqid}"
)
print("==============================")
print("DELETE REQUESTS")
print("==============================")
for request in delete_requests:
print(
f"{request.actions[0].src_package} ({request.state.when}) https://api.suse.de/{request.reqid}"
f"({request.state.when}) {request.actions[0].tgt_package} "
f"https://build.suse.de/request/show/{request.reqid}"
)


Expand Down

0 comments on commit a7d8efc

Please sign in to comment.