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
0e14a2f2
Commit
0e14a2f2
authored
Jan 11, 2017
by
Oswaldo Ferreira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add commment to Issue, Project and MergeRequest #to_reference
parent
660a755c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
0 deletions
+3
-0
app/models/issue.rb
app/models/issue.rb
+1
-0
app/models/merge_request.rb
app/models/merge_request.rb
+1
-0
app/models/project.rb
app/models/project.rb
+1
-0
No files found.
app/models/issue.rb
View file @
0e14a2f2
...
...
@@ -97,6 +97,7 @@ class Issue < ActiveRecord::Base
end
end
# `from` argument can be a Namespace or Project.
def
to_reference
(
from
=
nil
,
full:
false
)
reference
=
"
#{
self
.
class
.
reference_prefix
}#{
iid
}
"
...
...
app/models/merge_request.rb
View file @
0e14a2f2
...
...
@@ -179,6 +179,7 @@ class MergeRequest < ActiveRecord::Base
work_in_progress?
(
title
)
?
title
:
"WIP:
#{
title
}
"
end
# `from` argument can be a Namespace or Project.
def
to_reference
(
from
=
nil
,
full:
false
)
reference
=
"
#{
self
.
class
.
reference_prefix
}#{
iid
}
"
...
...
app/models/project.rb
View file @
0e14a2f2
...
...
@@ -591,6 +591,7 @@ class Project < ActiveRecord::Base
end
end
# `from` argument can be a Namespace or Project.
def
to_reference
(
from
=
nil
,
full:
false
)
if
full
||
cross_namespace_reference?
(
from
)
path_with_namespace
...
...
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