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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
c9659d4c
Commit
c9659d4c
authored
Nov 07, 2017
by
Vitaliy @blackst0ne Klachkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GFM reference links for closed milestones
parent
df7eaa85
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
5 deletions
+36
-5
changelogs/unreleased/bugfix_banzai_closed_milestones.yml
changelogs/unreleased/bugfix_banzai_closed_milestones.yml
+5
-0
lib/banzai/filter/milestone_reference_filter.rb
lib/banzai/filter/milestone_reference_filter.rb
+1
-1
spec/lib/banzai/filter/milestone_reference_filter_spec.rb
spec/lib/banzai/filter/milestone_reference_filter_spec.rb
+30
-4
No files found.
changelogs/unreleased/bugfix_banzai_closed_milestones.yml
0 → 100644
View file @
c9659d4c
---
title
:
Fix GFM reference links for closed milestones
merge_request
:
15234
author
:
Vitaliy @blackst0ne Klachkov
type
:
fixed
lib/banzai/filter/milestone_reference_filter.rb
View file @
c9659d4c
...
@@ -56,7 +56,7 @@ module Banzai
...
@@ -56,7 +56,7 @@ module Banzai
end
end
def
find_milestone_with_finder
(
project
,
params
)
def
find_milestone_with_finder
(
project
,
params
)
finder_params
=
{
project_ids:
[
project
.
id
],
order:
nil
}
finder_params
=
{
project_ids:
[
project
.
id
],
order:
nil
,
state:
'all'
}
# We don't support IID lookups for group milestones, because IIDs can
# We don't support IID lookups for group milestones, because IIDs can
# clash between group and project milestones.
# clash between group and project milestones.
...
...
spec/lib/banzai/filter/milestone_reference_filter_spec.rb
View file @
c9659d4c
...
@@ -294,8 +294,7 @@ describe Banzai::Filter::MilestoneReferenceFilter do
...
@@ -294,8 +294,7 @@ describe Banzai::Filter::MilestoneReferenceFilter do
end
end
end
end
context
'project milestones'
do
shared_context
'project milestones'
do
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
let
(
:reference
)
{
milestone
.
to_reference
(
format: :iid
)
}
let
(
:reference
)
{
milestone
.
to_reference
(
format: :iid
)
}
include_examples
'reference parsing'
include_examples
'reference parsing'
...
@@ -309,8 +308,7 @@ describe Banzai::Filter::MilestoneReferenceFilter do
...
@@ -309,8 +308,7 @@ describe Banzai::Filter::MilestoneReferenceFilter do
it_behaves_like
'cross project shorthand reference'
it_behaves_like
'cross project shorthand reference'
end
end
context
'group milestones'
do
shared_context
'group milestones'
do
let
(
:milestone
)
{
create
(
:milestone
,
group:
group
)
}
let
(
:reference
)
{
milestone
.
to_reference
(
format: :name
)
}
let
(
:reference
)
{
milestone
.
to_reference
(
format: :name
)
}
include_examples
'reference parsing'
include_examples
'reference parsing'
...
@@ -354,4 +352,32 @@ describe Banzai::Filter::MilestoneReferenceFilter do
...
@@ -354,4 +352,32 @@ describe Banzai::Filter::MilestoneReferenceFilter do
expect
(
result
.
css
(
'a'
).
first
.
attr
(
'href'
)).
to
eq
(
urls
.
milestone_url
(
milestone
))
expect
(
result
.
css
(
'a'
).
first
.
attr
(
'href'
)).
to
eq
(
urls
.
milestone_url
(
milestone
))
end
end
end
end
context
'when milestone is open'
do
context
'project milestones'
do
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
include_context
'project milestones'
end
context
'group milestones'
do
let
(
:milestone
)
{
create
(
:milestone
,
group:
group
)
}
include_context
'group milestones'
end
end
context
'when milestone is closed'
do
context
'project milestones'
do
let
(
:milestone
)
{
create
(
:milestone
,
:closed
,
project:
project
)
}
include_context
'project milestones'
end
context
'group milestones'
do
let
(
:milestone
)
{
create
(
:milestone
,
:closed
,
group:
group
)
}
include_context
'group milestones'
end
end
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