1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-11-13 07:56:14 +01:00

Merge pull request #1250 from dmach/revert-1107-do-not-list-declined-requests-by-default

Revert "Do not list declined requests by default"
This commit is contained in:
Daniel Mach 2023-02-02 21:19:18 +01:00 committed by GitHub
commit b047154ee5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -2487,7 +2487,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
@cmdln.option('-f', '--force', action='store_true', @cmdln.option('-f', '--force', action='store_true',
help='enforce state change, can be used to ignore open reviews') help='enforce state change, can be used to ignore open reviews')
@cmdln.option('-s', '--state', @cmdln.option('-s', '--state',
help='only list requests in one of the comma separated given states (new/review/accepted/revoked/declined) or "all" [default="new,review"]') help='only list requests in one of the comma separated given states (new/review/accepted/revoked/declined) or "all" [default="new,review,declined"]')
@cmdln.option('-D', '--days', metavar='DAYS', @cmdln.option('-D', '--days', metavar='DAYS',
help='only list requests in state "new" or changed in the last DAYS.') help='only list requests in state "new" or changed in the last DAYS.')
@cmdln.option('-U', '--user', metavar='USER', @cmdln.option('-U', '--user', metavar='USER',
@ -2621,7 +2621,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
state_list = ["all"] state_list = ["all"]
else: else:
if not opts.state: if not opts.state:
opts.state = "new,review" opts.state = "new,review,declined"
state_list = opts.state.split(",") state_list = opts.state.split(",")
state_list = [i for i in state_list if i.strip()] state_list = [i for i in state_list if i.strip()]

View File

@ -4657,7 +4657,7 @@ def get_request_collection(
raise ValueError("Project must be set to query a package; see https://github.com/openSUSE/open-build-service/issues/13075") raise ValueError("Project must be set to query a package; see https://github.com/openSUSE/open-build-service/issues/13075")
query["package"] = package query["package"] = package
states = states or ("new", "review") states = states or ("new", "review", "declined")
if states: if states:
if "all" not in states: if "all" not in states:
query["states"] = ",".join(states) query["states"] = ",".join(states)
@ -4772,6 +4772,7 @@ def get_user_projpkgs_request_list(
req_state=( req_state=(
"new", "new",
"review", "review",
"declined",
), ),
req_type=None, req_type=None,
exclude_projects=None, exclude_projects=None,
@ -8033,7 +8034,7 @@ def get_commit_msg(wc_dir, pacs):
return msg return msg
def print_request_list(apiurl, project, package=None, states=('new', 'review'), force=False): def print_request_list(apiurl, project, package=None, states=("new", "review"), force=False):
""" """
prints list of pending requests for the specified project/package if "check_for_request_on_action" prints list of pending requests for the specified project/package if "check_for_request_on_action"
is enabled in the config or if "force" is set to True is enabled in the config or if "force" is set to True