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
a12617bd
Commit
a12617bd
authored
Apr 22, 2020
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add target_project arg to Group#to_reference
This will be the same as User#to_reference
parent
253591a3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
app/models/group.rb
app/models/group.rb
+1
-1
changelogs/unreleased/215326-moving-an-issue-referencing-a-group-in-a-note-can-fail.yml
...oving-an-issue-referencing-a-group-in-a-note-can-fail.yml
+5
-0
spec/lib/gitlab/gfm/reference_rewriter_spec.rb
spec/lib/gitlab/gfm/reference_rewriter_spec.rb
+12
-0
No files found.
app/models/group.rb
View file @
a12617bd
...
...
@@ -169,7 +169,7 @@ class Group < Namespace
notification_settings
.
find
{
|
n
|
n
.
notification_email
.
present?
}
&
.
notification_email
end
def
to_reference
(
_from
=
nil
,
full:
nil
)
def
to_reference
(
_from
=
nil
,
target_project:
nil
,
full:
nil
)
"
#{
self
.
class
.
reference_prefix
}#{
full_path
}
"
end
...
...
changelogs/unreleased/215326-moving-an-issue-referencing-a-group-in-a-note-can-fail.yml
0 → 100644
View file @
a12617bd
---
title
:
Fix moving an issue when there is a group reference
merge_request
:
30185
author
:
type
:
fixed
spec/lib/gitlab/gfm/reference_rewriter_spec.rb
View file @
a12617bd
...
...
@@ -147,6 +147,18 @@ describe Gitlab::Gfm::ReferenceRewriter do
it
{
is_expected
.
to
eq
text
}
end
context
'when referring to a group'
do
let
(
:text
)
{
"group @
#{
group
.
full_path
}
"
}
it
{
is_expected
.
to
eq
text
}
end
context
'when referring to a user'
do
let
(
:text
)
{
"user @
#{
user
.
full_path
}
"
}
it
{
is_expected
.
to
eq
text
}
end
context
'when referable has a nil reference'
do
before
do
create
(
:milestone
,
title:
'9.0'
,
project:
old_project
)
...
...
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