Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f8066950
Commit
f8066950
authored
Sep 02, 2021
by
Steve Mathieu
Committed by
Alex Pooley
Sep 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include original project classification in forked projects
parent
beaf02e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
app/services/projects/fork_service.rb
app/services/projects/fork_service.rb
+2
-1
spec/services/projects/fork_service_spec.rb
spec/services/projects/fork_service_spec.rb
+3
-1
No files found.
app/services/projects/fork_service.rb
View file @
f8066950
...
...
@@ -61,7 +61,8 @@ module Projects
# initializing the project, as that would cause a foreign key constraint
# exception.
relations_block:
->
(
project
)
{
build_fork_network_member
(
project
)
},
skip_disk_validation:
skip_disk_validation
skip_disk_validation:
skip_disk_validation
,
external_authorization_classification_label:
@project
.
external_authorization_classification_label
}
if
@project
.
avatar
.
present?
&&
@project
.
avatar
.
image?
...
...
spec/services/projects/fork_service_spec.rb
View file @
f8066950
...
...
@@ -28,7 +28,8 @@ RSpec.describe Projects::ForkService do
namespace:
@from_namespace
,
star_count:
107
,
avatar:
avatar
,
description:
'wow such project'
)
description:
'wow such project'
,
external_authorization_classification_label:
'classification-label'
)
@to_user
=
create
(
:user
)
@to_namespace
=
@to_user
.
namespace
@from_project
.
add_user
(
@to_user
,
:developer
)
...
...
@@ -66,6 +67,7 @@ RSpec.describe Projects::ForkService do
it
{
expect
(
to_project
.
description
).
to
eq
(
@from_project
.
description
)
}
it
{
expect
(
to_project
.
avatar
.
file
).
to
be_exists
}
it
{
expect
(
to_project
.
ci_config_path
).
to
eq
(
@from_project
.
ci_config_path
)
}
it
{
expect
(
to_project
.
external_authorization_classification_label
).
to
eq
(
@from_project
.
external_authorization_classification_label
)
}
# This test is here because we had a bug where the from-project lost its
# avatar after being forked.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment