#46 Multiple changes
Merged 3 years ago by mohanboddu. Opened 3 years ago by humaton.
humaton/fedscm-admin add_f33_slas  into  master

@@ -54,6 +54,10 @@ 

          'security_fixes': '2020-11-30',

          'bug_fixes': '2020-11-30'

      },

+     'f33': {

+         'bug_fixes': '2021-11-16',

+         'security_fixes': '2021-11-16'

+     },

      'f32': {

          'bug_fixes': '2021-05-25',

          'security_fixes': '2021-05-25'

file modified
+30 -29
@@ -94,8 +94,7 @@ 

      for sla, eol in sla_dict.items():

          if not isinstance(eol, string_types):

              raise ValidationError(

-                 'The SL\'s EOL is not a string. It was type "{0}".'

-                 .format(type(eol).__name__))

+                 'The SL\'s EOL is not a string. It was type "{0}".'.format(type(eol).__name__))

          if re.match(eol_date_regex, eol):

              eol_date = datetime.strptime(eol, '%Y-%m-%d').date()

              today = datetime.utcnow().date()
@@ -104,8 +103,7 @@ 

                      'The SL "{0}" is already expired'.format(eol))

              elif eol_date.month not in [6, 12] or eol_date.day != 1:

                  raise ValidationError(

-                     'The SL "{0}" must expire on June 1st or December 1st'

-                     .format(eol))

+                     'The SL "{0}" must expire on June 1st or December 1st'.format(eol))

          else:

              raise ValidationError(

                  'The EOL date "{0}" is in an invalid format'.format(eol))
@@ -316,7 +314,7 @@ 

          prompt_to_close_bad_ticket(issue_json, error)

          return

  

-     if force or exception is True or namespace in ('modules', 'flatpaks', 'tests'):

+     if force or exception is True or namespace in ('modules', 'flatpaks', 'tests', 'containers'):

          skip_msg = '- Skipping verification of RHBZ'

          if bug_id:

              skip_msg = '{0} #{1}'.format(skip_msg, bug_id)
@@ -357,10 +355,8 @@ 

      pagure_url = get_config_item(CONFIG, 'pagure_dist_git_url')

      if not fedscm_admin.pagure.user_exists(issue_owner):

          sync_comment = ('@{0} needs to login to {1} to sync accounts '

-                         'before we can proceed.'.format(

-                             issue_owner, pagure_url))

-         question = '{0}  Post this comment to the ticket?'.format(

-             sync_comment)

+                         'before we can proceed.'.format(issue_owner, pagure_url))

+         question = '{0}  Post this comment to the ticket?'.format(sync_comment)

          if click.confirm(question):

              fedscm_admin.pagure.add_comment_to_issue(issue_id, sync_comment)

          return
@@ -430,22 +426,26 @@ 

          dist_git_url = '{0}/{1}/{2}'.format(

              pagure_url.rstrip('/'), namespace, repo)

          # If the global component already exists, this will not create another

-         fedscm_admin.pdc.new_global_component(repo, dist_git_url)

+         # Skip for tests namespace

+         if namespace != 'tests':

+             fedscm_admin.pdc.new_global_component(repo, dist_git_url)

          # 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)

          # If the branch requested isn't master, still create a master branch

          # in PDC anyways.

-         if branch_name != 'master':

-             fedscm_admin.pdc.new_branch(repo, 'master', branch_type)

-             for sla, eol in fedscm_admin.STANDARD_BRANCH_SLAS['master'].items():

+         # Skip pdc magic for tests namespace

+         if namespace != 'tests':

+             if branch_name != 'master':

+                 fedscm_admin.pdc.new_branch(repo, 'master', branch_type)

+                 for sla, eol in fedscm_admin.STANDARD_BRANCH_SLAS['master'].items():

+                     fedscm_admin.pdc.new_sla_to_branch(

+                         sla, eol, repo, 'master', branch_type)

+ 

+             fedscm_admin.pdc.new_branch(repo, branch_name, branch_type)

+             for sla, eol in issue_body_json['sls'].items():

                  fedscm_admin.pdc.new_sla_to_branch(

-                     sla, eol, repo, 'master', branch_type)

- 

-         fedscm_admin.pdc.new_branch(repo, branch_name, branch_type)

-         for sla, eol in issue_body_json['sls'].items():

-             fedscm_admin.pdc.new_sla_to_branch(

-                 sla, eol, repo, branch_name, branch_type)

+                     sla, eol, repo, branch_name, branch_type)

  

          # Create the Pagure repo

          fedscm_admin.pagure.new_project(
@@ -535,12 +535,12 @@ 

      pdc_branch = fedscm_admin.pdc.get_branch(repo, branch_name, branch_type)

      if pdc_branch:

          ticket_text = \

-             "The branch in PDC already exists, you can now create it yourself as follows:\n"\

-             "Check in the project's settings if you have activated the git hook preventing"\

-             "new git branches from being created and if you did, de-activate it.\n"\

-             "Then simply run in cloned repository: "\

-             "``git checkout -b <branch_name> && git push -u origin <branch_name>``.\n"\

-             "``<branch_name>`` is the name of the branch you requested. \n"\

+             "The branch in PDC already exists, you can now create it yourself as follows:\n" \

+             "Check in the project's settings if you have activated the git hook preventing" \

+             "new git branches from being created and if you did, de-activate it.\n" \

+             "Then simply run in cloned repository: " \

+             "``git checkout -b <branch_name> && git push -u origin <branch_name>``.\n" \

+             "``<branch_name>`` is the name of the branch you requested. \n" \

              "You only need to do this once and you can then use fedpkg as you normally do."

          prompt_to_close_bad_ticket(

              issue_json, ticket_text)
@@ -558,8 +558,9 @@ 

          click.secho(msg, fg='yellow')

      else:

          # Get the list of maintainers of the package

-         maintainers = set(project['access_users']['owner']) | set(project['access_users']['admin'])\

-             | set(project['access_users']['commit'])

+         maintainers = set(project['access_users']['owner']) | \

+                       set(project['access_users']['admin']) | \

+                       set(project['access_users']['commit'])

          # Get the list of FAS groups who can maintain the package

          access_groups = set(project['access_groups']['admin'])\

              | set(project['access_groups']['commit'])
@@ -841,5 +842,5 @@ 

  

      branch_name = issue['branch'].strip()

      standard_branch = is_valid_standard_branch(branch_name)

-     return not(standard_branch and not re.match(r'^(el|epel)[0-9]+$',

-                branch_name))

+     return not (standard_branch and not re.match(r'^(el|epel)[0-9]+$',

+                                                  branch_name))

no initial comment

Build failed.

  • tox : FAILURE in 6m 26s

1 new commit added

  • Fix formating of utils.py
3 years ago

Build succeeded.

  • tox : SUCCESS in 6m 10s

Pull-Request has been merged by mohanboddu

3 years ago