Commit 9a250ad6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Filter commits by search parameter

Signed-off-by: default avatarDmitriy Zaporozhets <>
parent 61561a9e
......@@ -8,10 +8,16 @@ class Projects::CommitsController < Projects::ApplicationController
before_action :authorize_download_code!
def show
@repo = @project.repository
@limit, @offset = (params[:limit] || 40).to_i, (params[:offset] || 0).to_i
search = params[:search]
@commits =
if search.present?
@repository.commits(@ref, @path, @limit, @offset)
@commits = @repo.commits(@ref, @path, @limit, @offset)
@note_counts = project.notes.where(commit_id:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment