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
iv
gitlab-ce
Commits
94135e62
Commit
94135e62
authored
Jun 14, 2016
by
Ilan Shamir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove JiraIssue model and replace references with ExternalIssue
parent
400b4159
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
39 deletions
+11
-39
CHANGELOG
CHANGELOG
+1
-0
app/models/jira_issue.rb
app/models/jira_issue.rb
+0
-2
spec/helpers/merge_requests_helper_spec.rb
spec/helpers/merge_requests_helper_spec.rb
+3
-3
spec/lib/gitlab/reference_extractor_spec.rb
spec/lib/gitlab/reference_extractor_spec.rb
+2
-1
spec/models/jira_issue_spec.rb
spec/models/jira_issue_spec.rb
+0
-30
spec/models/project_services/jira_service_spec.rb
spec/models/project_services/jira_service_spec.rb
+4
-2
spec/services/system_note_service_spec.rb
spec/services/system_note_service_spec.rb
+1
-1
No files found.
CHANGELOG
View file @
94135e62
...
...
@@ -51,6 +51,7 @@ v 8.9.0 (unreleased)
- Projects pending deletion will render a 404 page
- Measure queue duration between gitlab-workhorse and Rails
- Make Omniauth providers specs to not modify global configuration
- Remove unused JiraIssue class and replace references with ExternalIssue
- Make authentication service for Container Registry to be compatible with < Docker 1.11
- Add Application Setting to configure Container Registry token expire delay (default 5min)
- Cache assigned issue and merge request counts in sidebar nav
...
...
app/models/jira_issue.rb
deleted
100644 → 0
View file @
400b4159
class
JiraIssue
<
ExternalIssue
end
spec/helpers/merge_requests_helper_spec.rb
View file @
94135e62
...
...
@@ -33,9 +33,9 @@ describe MergeRequestsHelper do
let
(
:project
)
{
create
(
:project
)
}
let
(
:issues
)
do
[
Jira
Issue
.
new
(
'JIRA-123'
,
project
),
Jira
Issue
.
new
(
'JIRA-456'
,
project
),
Jira
Issue
.
new
(
'FOOBAR-7890'
,
project
)
External
Issue
.
new
(
'JIRA-123'
,
project
),
External
Issue
.
new
(
'JIRA-456'
,
project
),
External
Issue
.
new
(
'FOOBAR-7890'
,
project
)
]
end
...
...
spec/lib/gitlab/reference_extractor_spec.rb
View file @
94135e62
...
...
@@ -105,7 +105,8 @@ describe Gitlab::ReferenceExtractor, lib: true do
it
'returns JIRA issues for a JIRA-integrated project'
do
subject
.
analyze
(
'JIRA-123 and FOOBAR-4567'
)
expect
(
subject
.
issues
).
to
eq
[
JiraIssue
.
new
(
'JIRA-123'
,
project
),
JiraIssue
.
new
(
'FOOBAR-4567'
,
project
)]
expect
(
subject
.
issues
).
to
eq
[
ExternalIssue
.
new
(
'JIRA-123'
,
project
),
ExternalIssue
.
new
(
'FOOBAR-4567'
,
project
)]
end
end
...
...
spec/models/jira_issue_spec.rb
deleted
100644 → 0
View file @
400b4159
require
'spec_helper'
describe
JiraIssue
do
let
(
:project
)
{
create
(
:project
)
}
subject
{
JiraIssue
.
new
(
'JIRA-123'
,
project
)
}
describe
'id'
do
subject
{
super
().
id
}
it
{
is_expected
.
to
eq
(
'JIRA-123'
)
}
end
describe
'iid'
do
subject
{
super
().
iid
}
it
{
is_expected
.
to
eq
(
'JIRA-123'
)
}
end
describe
'to_s'
do
subject
{
super
().
to_s
}
it
{
is_expected
.
to
eq
(
'JIRA-123'
)
}
end
describe
:==
do
specify
{
expect
(
subject
).
to
eq
(
JiraIssue
.
new
(
'JIRA-123'
,
project
))
}
specify
{
expect
(
subject
).
not_to
eq
(
JiraIssue
.
new
(
'JIRA-124'
,
project
))
}
it
'only compares with JiraIssues'
do
expect
(
subject
).
not_to
eq
(
'JIRA-123'
)
end
end
end
spec/models/project_services/jira_service_spec.rb
View file @
94135e62
...
...
@@ -76,7 +76,8 @@ describe JiraService, models: true do
end
it
"should call JIRA API"
do
@jira_service
.
execute
(
merge_request
,
JiraIssue
.
new
(
"JIRA-123"
,
project
))
@jira_service
.
execute
(
merge_request
,
ExternalIssue
.
new
(
"JIRA-123"
,
project
))
expect
(
WebMock
).
to
have_requested
(
:post
,
@comment_url
).
with
(
body:
/Issue solved with/
).
once
...
...
@@ -84,7 +85,8 @@ describe JiraService, models: true do
it
"calls the api with jira_issue_transition_id"
do
@jira_service
.
jira_issue_transition_id
=
'this-is-a-custom-id'
@jira_service
.
execute
(
merge_request
,
JiraIssue
.
new
(
"JIRA-123"
,
project
))
@jira_service
.
execute
(
merge_request
,
ExternalIssue
.
new
(
"JIRA-123"
,
project
))
expect
(
WebMock
).
to
have_requested
(
:post
,
@api_url
).
with
(
body:
/this-is-a-custom-id/
).
once
...
...
spec/services/system_note_service_spec.rb
View file @
94135e62
...
...
@@ -529,7 +529,7 @@ describe SystemNoteService, services: true do
let
(
:author
)
{
create
(
:user
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
let
(
:mergereq
)
{
create
(
:merge_request
,
:simple
,
target_project:
project
,
source_project:
project
)
}
let
(
:jira_issue
)
{
Jira
Issue
.
new
(
"JIRA-1"
,
project
)}
let
(
:jira_issue
)
{
External
Issue
.
new
(
"JIRA-1"
,
project
)}
let
(
:jira_tracker
)
{
project
.
create_jira_service
if
project
.
jira_service
.
nil?
}
let
(
:commit
)
{
project
.
commit
}
...
...
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