From 97a6ba9d0e01b0517b2136374df667dff637f1ba Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Apr 06 2020 20:26:16 +0000 Subject: Skip epel check Sometimes we need to skip epel check. For ex: https://pagure.io/releng/issue/9360 Signed-off-by: Mohan Boddu --- diff --git a/fedscm_admin/__init__.py b/fedscm_admin/__init__.py index 86fdfee..d2a2fea 100644 --- a/fedscm_admin/__init__.py +++ b/fedscm_admin/__init__.py @@ -94,7 +94,8 @@ STANDARD_BRANCH_SLAS = { INVALID_EPEL_ERROR = ( 'This package is already an EL package and is built on all supported ' 'arches, therefore, it cannot be in EPEL. If this is a mistake or you ' - 'have an exception, please contact the Release Engineering team.') + 'have an exception, please contact the Release Engineering team at' + 'https://pagure.io/releng/issues') today = datetime.utcnow().date() # Remove any branches that have gone EOL since these were hardcoded. This data # should really be in PDC, but there is not suitable API yet. diff --git a/fedscm_admin/utils.py b/fedscm_admin/utils.py index c34d763..5683041 100644 --- a/fedscm_admin/utils.py +++ b/fedscm_admin/utils.py @@ -347,8 +347,9 @@ def prompt_for_new_repo(issue_json, issue_body_json, force=False, # here, it'd have to be accompanied by a Bugzilla bug for the "Fedora EPEL" # product. So this will only trigger if the reviewer made a mistake. if is_epel(branch_name) and not valid_epel_package(repo, branch_name): - prompt_to_close_bad_ticket(issue_json, INVALID_EPEL_ERROR) - return + if not force: + prompt_to_close_bad_ticket(issue_json, INVALID_EPEL_ERROR) + return issue_id = issue_json['id'] issue_owner = issue_json['user']['name'] @@ -525,8 +526,9 @@ def prompt_for_new_branch(issue_json, issue_body_json, force=False, auto_approve branch_name = issue_body_json['branch'].strip() if is_epel(branch_name) and not valid_epel_package(repo, branch_name): - prompt_to_close_bad_ticket(issue_json, INVALID_EPEL_ERROR) - return + if not force: + prompt_to_close_bad_ticket(issue_json, INVALID_EPEL_ERROR) + return # Pagure uses plural names for namespaces, but PDC does not use the # plural version for branch types branch_type = fedscm_admin.pdc.component_type_to_singular(namespace)