An error occurred fetching the project authors.
  1. 02 Mar, 2022 1 commit
  2. 11 May, 2021 2 commits
  3. 28 Aug, 2019 1 commit
  4. 28 Mar, 2019 2 commits
  5. 15 Jan, 2019 1 commit
  6. 14 Jan, 2019 1 commit
  7. 13 Dec, 2018 1 commit
  8. 12 Dec, 2018 1 commit
    • Yorick Peterse's avatar
      Reinstate changes lost due to automatic merging · 749ebc1c
      Yorick Peterse authored
      The automatic merging code used `--strategy=ours`, which turned out to
      be incorrect; instead we wanted `--strategy=recursive
      --strategy-option=ours`. This small difference results in merging
      throwing away _all_ EE changes in favour of CE changes, instead of only
      doing this for conflicts.
      
      This commit ensures that EE has all the appropriate changes. The diff
      was generated by cherry picking all merge commits made since two days
      ago, picking them with `--strategy=recursive --strategy-option=ours`.
      749ebc1c
  9. 11 Dec, 2018 1 commit
    • Yorick Peterse's avatar
      Refactor Project#create_or_update_import_data · 26378511
      Yorick Peterse authored
      In https://gitlab.com/gitlab-org/release/framework/issues/28 we found
      that this method was changed a lot over the years: 43 times if our
      calculations were correct. Looking at the method, it had quite a few
      branches going on:
      
          def create_or_update_import_data(data: nil, credentials: nil)
            return if data.nil? && credentials.nil?
      
            project_import_data = import_data || build_import_data
      
            if data
              project_import_data.data ||= {}
              project_import_data.data = project_import_data.data.merge(data)
            end
      
            if credentials
              project_import_data.credentials ||= {}
              project_import_data.credentials =
                project_import_data.credentials.merge(credentials)
            end
      
            project_import_data
          end
      
      If we turn the || and ||= operators into regular if statements, we can
      see a bit more clearly that this method has quite a lot of branches in
      it:
      
          def create_or_update_import_data(data: nil, credentials: nil)
            if data.nil? && credentials.nil?
              return
            else
              project_import_data =
                if import_data
                  import_data
                else
                  build_import_data
                end
      
              if data
                if project_import_data.data
                  # nothing
                else
                  project_import_data.data = {}
                end
      
                project_import_data.data =
                  project_import_data.data.merge(data)
              end
      
              if credentials
                if project_import_data.credentials
                  # nothing
                else
                  project_import_data.credentials = {}
                end
      
                project_import_data.credentials =
                  project_import_data.credentials.merge(credentials)
              end
      
              project_import_data
            end
          end
      
      The number of if statements and branches here makes it easy to make
      mistakes. To resolve this, we refactor this code in such a way that we
      can get rid of all but the first `if data.nil? && credentials.nil?`
      statement. We can do this by simply sending `to_h` to `nil` in the right
      places, which removes the need for statements such as `if data`.
      
      Since this data gets written to a database, in ProjectImportData we do
      make sure to not write empty Hash values. This requires an `unless`
      (which is really a `if !`), but the resulting code is still very easy to
      read.
      26378511
  10. 01 Aug, 2018 1 commit
  11. 26 Jul, 2018 1 commit
  12. 01 Jun, 2018 1 commit
  13. 29 May, 2018 1 commit
  14. 09 Aug, 2017 1 commit
  15. 07 Aug, 2017 2 commits
  16. 06 Jul, 2017 2 commits
  17. 31 May, 2017 1 commit
  18. 28 Jun, 2016 2 commits
  19. 03 Jun, 2016 2 commits
  20. 30 May, 2016 1 commit
  21. 09 May, 2016 1 commit
  22. 06 May, 2016 2 commits
  23. 19 Apr, 2016 1 commit
  24. 11 Apr, 2016 1 commit
  25. 06 Apr, 2016 2 commits
  26. 05 Apr, 2016 1 commit
  27. 01 Apr, 2016 1 commit
  28. 21 Mar, 2016 2 commits
  29. 07 Mar, 2016 1 commit
  30. 04 Mar, 2016 2 commits