BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
a5314e79
Commit
a5314e79
authored
Sep 04, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix URL construction for merge requests, issues, notes, and commits for relative URL config
Closes
https://github.com/gitlabhq/gitlabhq/issues/9605
parent
e8bbc837
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
CHANGELOG
CHANGELOG
+1
-0
url_builder.rb
lib/gitlab/url_builder.rb
+2
-6
No files found.
CHANGELOG
View file @
a5314e79
Please view this file on the master branch, on stable branches it's out of date.
v 8.0.0 (unreleased)
- Fix URL construction for merge requests, issues, notes, and commits for relative URL config (Stan Hu)
- Omit filename in Content-Disposition header in raw file download to avoid RFC 6266 encoding issues (Stan HU)
- Prevent anchors from being hidden by header (Stan Hu)
- Fix bug where only the first 15 Bitbucket issues would be imported (Stan Hu)
...
...
lib/gitlab/url_builder.rb
View file @
a5314e79
...
...
@@ -23,12 +23,12 @@ module Gitlab
def
build_issue_url
(
id
)
issue
=
Issue
.
find
(
id
)
issue_url
(
issue
,
host:
Gitlab
.
config
.
gitlab
[
'url'
]
)
issue_url
(
issue
)
end
def
build_merge_request_url
(
id
)
merge_request
=
MergeRequest
.
find
(
id
)
merge_request_url
(
merge_request
,
host:
Gitlab
.
config
.
gitlab
[
'url'
]
)
merge_request_url
(
merge_request
)
end
def
build_note_url
(
id
)
...
...
@@ -37,22 +37,18 @@ module Gitlab
namespace_project_commit_url
(
namespace_id:
note
.
project
.
namespace
,
id:
note
.
commit_id
,
project_id:
note
.
project
,
host:
Gitlab
.
config
.
gitlab
[
'url'
],
anchor:
"note_
#{
note
.
id
}
"
)
elsif
note
.
for_issue?
issue
=
Issue
.
find
(
note
.
noteable_id
)
issue_url
(
issue
,
host:
Gitlab
.
config
.
gitlab
[
'url'
],
anchor:
"note_
#{
note
.
id
}
"
)
elsif
note
.
for_merge_request?
merge_request
=
MergeRequest
.
find
(
note
.
noteable_id
)
merge_request_url
(
merge_request
,
host:
Gitlab
.
config
.
gitlab
[
'url'
],
anchor:
"note_
#{
note
.
id
}
"
)
elsif
note
.
for_project_snippet?
snippet
=
Snippet
.
find
(
note
.
noteable_id
)
project_snippet_url
(
snippet
,
host:
Gitlab
.
config
.
gitlab
[
'url'
],
anchor:
"note_
#{
note
.
id
}
"
)
end
end
...
...
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