You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: submodule_helper.rb
    path of file: ./repos/gitlabhq/app/helpers
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module SubmoduleHelper
  extend self

  VALID_SUBMODULE_PROTOCOLS = %w[http https git ssh].freeze

  # links to 
    
  def github_com_tree_links(namespace, project, commit, old_commit)
    base = ['https://github.com/', namespace, '/', project].join('')
    [
      base,
      [base, '/tree/', commit].join(''),
      ([base, '/compare/', old_commit, '...', commit].join('') if old_commit)
    ]
  end