summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/controllers/projects/forks_controller.rb4
-rw-r--r--app/views/projects/forks/index.html.haml2
-rw-r--r--app/views/shared/projects/_project.html.haml2
-rw-r--r--features/project/fork.feature2
-rw-r--r--features/steps/project/fork.rb5
5 files changed, 4 insertions, 11 deletions
diff --git a/app/controllers/projects/forks_controller.rb b/app/controllers/projects/forks_controller.rb
index 045ac16599f..e61e01c4a59 100644
--- a/app/controllers/projects/forks_controller.rb
+++ b/app/controllers/projects/forks_controller.rb
@@ -5,9 +5,7 @@ class Projects::ForksController < Projects::ApplicationController
def index
@sort = params[:sort] || 'id_desc'
- @all_forks = project.forks.includes(:creator).order_by(@sort).reject do |project|
- project.repository.raw_repository.nil?
- end
+ @all_forks = project.forks.includes(:creator).order_by(@sort)
@public_forks, @protected_forks = @all_forks.partition do |project|
can?(current_user, :read_project, project)
diff --git a/app/views/projects/forks/index.html.haml b/app/views/projects/forks/index.html.haml
index 42fa6fdb782..3e636533bb4 100644
--- a/app/views/projects/forks/index.html.haml
+++ b/app/views/projects/forks/index.html.haml
@@ -30,7 +30,7 @@
= sort_title_oldest_updated
- if current_user && can?(current_user, :fork_project, @project)
- - if current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
+ - if current_user && current_user.already_forked?(@project) && current_user.manageable_namespaces.size < 2
= link_to namespace_project_path(current_user, current_user.fork_of(@project)), title: 'Go to your fork', class: 'btn btn-new' do
= icon('code-fork fw')
Fork
diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml
index 00bf9dcd2d5..900d7939ae9 100644
--- a/app/views/shared/projects/_project.html.haml
+++ b/app/views/shared/projects/_project.html.haml
@@ -4,7 +4,7 @@
- ci = false unless local_assigns[:ci] == true
- skip_namespace = false unless local_assigns[:skip_namespace] == true
- css_class = '' unless local_assigns[:css_class]
-- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true
+- show_last_commit_as_description = false unless local_assigns[:show_last_commit_as_description] == true && !project.empty_repo? && project.commit
- css_class += " no-description" if project.description.blank? && !show_last_commit_as_description
- ci_commit = project.ci_commit(project.commit.sha) if ci && !project.empty_repo? && project.commit
- cache_key = [project.namespace, project, controller.controller_name, controller.action_name, current_application_settings, 'v2.2']
diff --git a/features/project/fork.feature b/features/project/fork.feature
index 5f55b64c4ac..ca3f2771aa5 100644
--- a/features/project/fork.feature
+++ b/features/project/fork.feature
@@ -37,7 +37,7 @@ Feature: Project Fork
When I fork to my namespace
And I make forked repo invalid
And I visit the forks page of the "Shop" project
- Then I should not see the invalid fork listed
+ Then I should see my fork on the list
Scenario: Viewing private forks of a Project
Given There is an existent fork of the "Shop" project
diff --git a/features/steps/project/fork.rb b/features/steps/project/fork.rb
index 7e5160bae2f..527f7853da9 100644
--- a/features/steps/project/fork.rb
+++ b/features/steps/project/fork.rb
@@ -68,11 +68,6 @@ class Spinach::Features::ProjectFork < Spinach::FeatureSteps
project.save!
end
- step 'I should not see the invalid fork listed' do
- project = @user.fork_of(@project)
- expect(page).not_to have_content("#{project.namespace.human_name} / #{project.name}")
- end
-
step 'There is an existent fork of the "Shop" project' do
user = create(:user, name: 'Mike')
@forked_project = Projects::ForkService.new(@project, user).execute