Commit fe656c59 authored by Rubén Dávila's avatar Rubén Dávila

Update CHANGELOG-EE and refactor Repository and MirrorsController

parent bac5017d
......@@ -82,9 +82,6 @@ v 8.6.2
- Gracefully handle notes on deleted commits in merge requests (Stan Hu). !3402
- Fixed issue with notification settings not saving. !3452
v 8.6.2 (unreleased)
- Comments on confidential issues don't show up in activity feed to non-members
v 8.6.1
- Add option to reload the schema before restoring a database backup. !2807
- Display navigation controls on mobile. !3214
......
......@@ -4,6 +4,7 @@ v 8.7.0 (unreleased)
- Update GitLab Pages to 0.2.1: support user-defined 404 pages
- Refactor group sync to pull access level logic to its own class. !306
- [Elastic] Stabilize database indexer if database is inconsistent
- Add ability to sync to remote mirrors. !249
v 8.6.5
- No EE-specific changes
......
......@@ -29,16 +29,14 @@ class Projects::MirrorsController < Projects::ApplicationController
end
def update_now
if params[:sync_remote]
@project.update_remote_mirrors
flash[:notice] = "The remote repository is being updated..."
else
@project.update_mirror
flash[:notice] = "The repository is being updated..."
redirect_back_or_default(default: namespace_project_path(@project.namespace, @project))
end
def update_remote_now
@project.update_remote_mirrors
flash[:notice] = "The remote repository is being updated..."
redirect_back_or_default(default: namespace_project_path(@project.namespace, @project))
end
......
......@@ -3,7 +3,6 @@ require 'forwardable'
class Repository
include Elastic::RepositoriesSearch
extend Forwardable
class CommitError < StandardError; end
......@@ -18,7 +17,7 @@ class Repository
attr_accessor :path_with_namespace, :project
def_delegators :gitlab_shell, :push_remote_branches, :delete_remote_branches
delegate :push_remote_branches, :delete_remote_branches, to: :gitlab_shell
def self.clean_old_archives
repository_downloads_path = Gitlab.config.gitlab.repository_downloads_path
......
......@@ -12,7 +12,7 @@
%span.btn.disabled.update-mirror-button.has-tooltip{title: "Updating remote repository..."}
= icon('refresh')
- else
= link_to update_remote_now_namespace_project_mirror_path(@project.namespace, @project), method: :post, class: "btn update-mirror-button has-tooltip", title: "Update remote repository" do
= link_to update_now_namespace_project_mirror_path(@project.namespace, @project, sync_remote: true), method: :post, class: "btn update-mirror-button has-tooltip", title: "Update remote repository" do
= icon('refresh')
- elsif @project.has_remote_mirror? && @project.mirror?
.btn-group
......@@ -28,4 +28,4 @@
- if @project.updating_remote_mirror?
%span.prepend-left-10.disabled-item Updating remote repository...
- else
= link_to "Update remote repository", update_remote_now_namespace_project_mirror_path(@project.namespace, @project), method: :post
= link_to "Update remote repository", update_now_namespace_project_mirror_path(@project.namespace, @project, sync_remote: true), method: :post
......@@ -4,6 +4,6 @@
= icon('refresh')
Updating&hellip;
- else
= link_to update_remote_now_namespace_project_mirror_path(@project.namespace, @project), method: :post, class: "btn" do
= link_to update_now_namespace_project_mirror_path(@project.namespace, @project, sync_remote: true), method: :post, class: "btn" do
= icon('refresh')
Update Now
......@@ -699,7 +699,6 @@ Rails.application.routes.draw do
resource :mirror, only: [:show, :update] do
member do
post :update_now
post :update_remote_now
end
end
resources :git_hooks, constraints: { id: /\d+/ }
......
Markdown is supported
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