#430 Changes for default branches on different namespaces
Merged 3 years ago by onosek. Opened 3 years ago by mohanboddu.
mohanboddu/fedpkg default_branches  into  master

file modified
+3 -3
@@ -169,7 +169,7 @@ 

                  "--define 'rhel %s'" % macros['rhel'],

              ]

          # rawhide (previously master branch)

-         elif re.match(r'(master|rawhide|main)$', self.branch_merge):

+         elif re.match(r'(rawhide|main)$', self.branch_merge):

              self._distval = self._findrawhidebranch()

              self._distvar = 'fedora'

              self._disttag = 'fc%s' % self._distval
@@ -204,13 +204,13 @@ 

              self._rpmdefines.extend(extra_rpmdefines)

  

      def build_target(self, release):

-         if release in ('rawhide', 'main', 'master'):

+         if release in ('rawhide', 'main'):

              return 'rawhide'

          else:

              return '%s-candidate' % release

  

      def load_container_build_target(self):

-         if self.branch_merge in ('rawhide', 'main', 'master'):

+         if self.branch_merge in ('rawhide', 'main'):

              self._container_build_target = 'rawhide-%s-candidate' % self.ns

          else:

              super(Commands, self).load_container_build_target()

file modified
+4 -1
@@ -912,7 +912,7 @@ 

  

              ticket_body = {

                  'action': 'new_repo',

-                 'branch': 'rawhide',

+                 'branch': 'main',

                  'bug_id': bug or '',

                  'monitor': 'no-monitoring',

                  'namespace': 'tests',
@@ -920,6 +920,9 @@ 

                  'description': description,

              }

          else:

+             # Default branch is rawhide, but for flatpaks namespace its 'stable'

+             if ns == 'flatpaks':

+                 branch = 'stable'

              ticket_body = {

                  'action': 'new_repo',

                  'branch': branch,

file modified
+2 -2
@@ -436,7 +436,7 @@ 

      # should be ok to remove if from this list.

      stream_branches = []

      for item in branches:

-         if item['name'] in ('master', 'rawhide', 'main'):

+         if item['name'] in ('rawhide', 'main'):

we lost "master" but we gained "stable". Does it make sense place it here (and/or other places)?

hmm, this was probably an invalid comment.

              continue

          elif re.match(r'^(f|el)\d+$', item['name']):

              continue
@@ -469,7 +469,7 @@ 

          returned from `get_release_branches`.

      :return: list of releases, for example ``[f28]``, or ``[el6, epel7]``.

      """

-     if rel in ('master', 'rawhide', 'main'):

+     if rel in ('rawhide', 'main'):

          return ['rawhide']

      elif rel == 'fedora':

          return active_releases['fedora']

Also removing all the unnecessary references to master as we moved away from master.

rebased onto a54e971

3 years ago

do we need this elif branch with 'tests' when there is separated method request_tests_repo?

we lost "master" but we gained "stable". Does it make sense place it here (and/or other places)?

hmm, this was probably an invalid comment.

I would prefer just pass branch='rawhide' and inside of "_request_repo" have (if ns=="flatpak": branch = "stable"). It would look easier.

1 new commit added

  • Cleaner approach of default branch in new repo request
3 years ago

I updated PR as per the requests.

we lost "master" but we gained "stable". Does it make sense place it here (and/or other places)?

hmm, this was probably an invalid comment.

Yeah, all the master references are related to rpms namespace only.

FYI, it doesn't handle the case of requesting a default branch of their own for modules as it just requests rawhide branch. But it will serve the purposes that is needed for now.

Commit f9530a4 fixes this pull-request

Pull-Request has been merged by onosek

3 years ago

Thanks @mohanboddu. I just modified the commit message, squashed commits and repaired unittests.

I suppose that fedpkg patch with this change is expected now.

@mohanboddu There are patches in Bodhi with this change. So far except f34, where I am waiting for stable rpkg. Please confirm that it is OK. I don't want to release something early again :-).