refactors the search to enable users to filter and sort branches at the
same time and writes tests accordingly changes schema.db removes duplicate field inside CHANGELOG fix db/schema
This commit is contained in:
parent
3ec01e576e
commit
1c39395964
5 changed files with 2 additions and 7 deletions
|
@ -8,7 +8,6 @@ v 8.10.0 (unreleased)
|
||||||
- Add the functionality to be able to rename a file. !5049 (tiagonbotelho)
|
- Add the functionality to be able to rename a file. !5049 (tiagonbotelho)
|
||||||
- Disable PostgreSQL statement timeout during migrations
|
- Disable PostgreSQL statement timeout during migrations
|
||||||
- Fix projects dropdown loading performance with a simplified api cal. !5113 (tiagonbotelho)
|
- Fix projects dropdown loading performance with a simplified api cal. !5113 (tiagonbotelho)
|
||||||
- User can now filter branches by name on /branches page. !5144 (tiagonbotelho)
|
|
||||||
- Fix commit builds API, return all builds for all pipelines for given commit. !4849
|
- Fix commit builds API, return all builds for all pipelines for given commit. !4849
|
||||||
- Replace Haml with Hamlit to make view rendering faster. !3666
|
- Replace Haml with Hamlit to make view rendering faster. !3666
|
||||||
- Refresh the branch cache after `git gc` runs
|
- Refresh the branch cache after `git gc` runs
|
||||||
|
|
|
@ -125,10 +125,6 @@ class Repository
|
||||||
commits
|
commits
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_similar_branches(search)
|
|
||||||
raw_repository.branches.select { |branch| branch.name.include?(search) }
|
|
||||||
end
|
|
||||||
|
|
||||||
def find_branch(name)
|
def find_branch(name)
|
||||||
raw_repository.branches.find { |branch| branch.name == name }
|
raw_repository.branches.find { |branch| branch.name == name }
|
||||||
end
|
end
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
= sort_title_recently_updated
|
= sort_title_recently_updated
|
||||||
= link_to filter_branches_path(sort: 'last_updated') do
|
= link_to filter_branches_path(sort: 'last_updated') do
|
||||||
= sort_title_oldest_updated
|
= sort_title_oldest_updated
|
||||||
|
|
||||||
= link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do
|
= link_to new_namespace_project_branch_path(@project.namespace, @project), class: 'btn btn-create' do
|
||||||
New branch
|
New branch
|
||||||
- if @branches.any?
|
- if @branches.any?
|
||||||
|
|
|
@ -84,10 +84,10 @@ ActiveRecord::Schema.define(version: 20160716115710) do
|
||||||
t.string "health_check_access_token"
|
t.string "health_check_access_token"
|
||||||
t.boolean "send_user_confirmation_email", default: false
|
t.boolean "send_user_confirmation_email", default: false
|
||||||
t.integer "container_registry_token_expire_delay", default: 5
|
t.integer "container_registry_token_expire_delay", default: 5
|
||||||
|
t.boolean "user_default_external", default: false, null: false
|
||||||
t.text "after_sign_up_text"
|
t.text "after_sign_up_text"
|
||||||
t.string "repository_storage", default: "default"
|
t.string "repository_storage", default: "default"
|
||||||
t.string "enabled_git_access_protocol"
|
t.string "enabled_git_access_protocol"
|
||||||
t.boolean "user_default_external", default: false, null: false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "audit_events", force: :cascade do |t|
|
create_table "audit_events", force: :cascade do |t|
|
||||||
|
|
|
@ -17,6 +17,7 @@ describe BranchesFinder do
|
||||||
|
|
||||||
it 'sorts by recently_updated' do
|
it 'sorts by recently_updated' do
|
||||||
branches_finder = described_class.new(repository, { sort: 'recently_updated' })
|
branches_finder = described_class.new(repository, { sort: 'recently_updated' })
|
||||||
|
|
||||||
result = branches_finder.execute
|
result = branches_finder.execute
|
||||||
|
|
||||||
expect(result.first.name).to eq('expand-collapse-lines')
|
expect(result.first.name).to eq('expand-collapse-lines')
|
||||||
|
|
Loading…
Reference in a new issue