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: commits_controller.rb
    path of file: ./repos/commit-watcher/app/controllers/api/v1
    
    the code of the file until where you have to start completion: =begin
Copyr
    
  def index
    page_no = (params[:page] || 1).to_i
    page_size = (params[:size] || 100).to_i

    begin
      if params[:project_id]
        content = Commits.where(project_id: params[:project_id].to_i).paginate(page_no, page_size)
      else
        content = Commits.dataset.paginate(page_no, page_size)
      end