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
affb8e23
Commit
affb8e23
authored
Jun 17, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename redmine service to integration
Renames the redmine project association from _service to _integration.
parent
f296268b
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
20 additions
and
19 deletions
+20
-19
app/models/integration.rb
app/models/integration.rb
+1
-0
app/models/project.rb
app/models/project.rb
+1
-1
spec/factories/integrations.rb
spec/factories/integrations.rb
+1
-1
spec/factories/projects.rb
spec/factories/projects.rb
+1
-1
spec/lib/banzai/filter/references/external_issue_reference_filter_spec.rb
...filter/references/external_issue_reference_filter_spec.rb
+1
-1
spec/lib/gitlab/import_export/all_models.yml
spec/lib/gitlab/import_export/all_models.yml
+1
-1
spec/models/integration_spec.rb
spec/models/integration_spec.rb
+1
-1
spec/models/project_spec.rb
spec/models/project_spec.rb
+1
-1
spec/requests/api/graphql/project/base_service_spec.rb
spec/requests/api/graphql/project/base_service_spec.rb
+1
-1
spec/services/admin/propagate_integration_service_spec.rb
spec/services/admin/propagate_integration_service_spec.rb
+1
-1
spec/views/projects/services/_form.haml_spec.rb
spec/views/projects/services/_form.haml_spec.rb
+1
-1
spec/workers/propagate_integration_group_worker_spec.rb
spec/workers/propagate_integration_group_worker_spec.rb
+2
-2
spec/workers/propagate_integration_inherit_descendant_worker_spec.rb
...s/propagate_integration_inherit_descendant_worker_spec.rb
+2
-2
spec/workers/propagate_integration_inherit_worker_spec.rb
spec/workers/propagate_integration_inherit_worker_spec.rb
+3
-3
spec/workers/propagate_integration_project_worker_spec.rb
spec/workers/propagate_integration_project_worker_spec.rb
+2
-2
No files found.
app/models/integration.rb
View file @
affb8e23
...
@@ -51,6 +51,7 @@ class Integration < ApplicationRecord
...
@@ -51,6 +51,7 @@ class Integration < ApplicationRecord
jenkins jira
jenkins jira
packagist pipelines_email pivotaltracker pushover
packagist pipelines_email pivotaltracker pushover
mattermost mattermost_slash_commands microsoft_teams mock_ci mock_monitoring
mattermost mattermost_slash_commands microsoft_teams mock_ci mock_monitoring
redmine
]
.
to_set
.
freeze
]
.
to_set
.
freeze
def
self
.
renamed?
(
name
)
def
self
.
renamed?
(
name
)
...
...
app/models/project.rb
View file @
affb8e23
...
@@ -184,7 +184,7 @@ class Project < ApplicationRecord
...
@@ -184,7 +184,7 @@ class Project < ApplicationRecord
has_one
:pivotaltracker_integration
,
class_name:
'Integrations::Pivotaltracker'
has_one
:pivotaltracker_integration
,
class_name:
'Integrations::Pivotaltracker'
has_one
:prometheus_service
,
class_name:
'Integrations::Prometheus'
,
inverse_of: :project
has_one
:prometheus_service
,
class_name:
'Integrations::Prometheus'
,
inverse_of: :project
has_one
:pushover_integration
,
class_name:
'Integrations::Pushover'
has_one
:pushover_integration
,
class_name:
'Integrations::Pushover'
has_one
:redmine_
service
,
class_name:
'Integrations::Redmine'
has_one
:redmine_
integration
,
class_name:
'Integrations::Redmine'
has_one
:slack_service
,
class_name:
'Integrations::Slack'
has_one
:slack_service
,
class_name:
'Integrations::Slack'
has_one
:slack_slash_commands_service
,
class_name:
'Integrations::SlackSlashCommands'
has_one
:slack_slash_commands_service
,
class_name:
'Integrations::SlackSlashCommands'
has_one
:teamcity_service
,
class_name:
'Integrations::Teamcity'
has_one
:teamcity_service
,
class_name:
'Integrations::Teamcity'
...
...
spec/factories/integrations.rb
View file @
affb8e23
...
@@ -91,7 +91,7 @@ FactoryBot.define do
...
@@ -91,7 +91,7 @@ FactoryBot.define do
issue_tracker
issue_tracker
end
end
factory
:redmine_
service
,
class:
'Integrations::Redmine'
do
factory
:redmine_
integration
,
class:
'Integrations::Redmine'
do
project
project
active
{
true
}
active
{
true
}
issue_tracker
issue_tracker
...
...
spec/factories/projects.rb
View file @
affb8e23
...
@@ -396,7 +396,7 @@ FactoryBot.define do
...
@@ -396,7 +396,7 @@ FactoryBot.define do
factory
:redmine_project
,
parent: :project
do
factory
:redmine_project
,
parent: :project
do
has_external_issue_tracker
{
true
}
has_external_issue_tracker
{
true
}
redmine_
service
redmine_
integration
end
end
factory
:youtrack_project
,
parent: :project
do
factory
:youtrack_project
,
parent: :project
do
...
...
spec/lib/banzai/filter/references/external_issue_reference_filter_spec.rb
View file @
affb8e23
...
@@ -118,7 +118,7 @@ RSpec.describe Banzai::Filter::References::ExternalIssueReferenceFilter do
...
@@ -118,7 +118,7 @@ RSpec.describe Banzai::Filter::References::ExternalIssueReferenceFilter do
end
end
context
"redmine project"
do
context
"redmine project"
do
let_it_be
(
:
service
)
{
create
(
:redmine_service
,
project:
project
)
}
let_it_be
(
:
integration
)
{
create
(
:redmine_integration
,
project:
project
)
}
before
do
before
do
project
.
update!
(
issues_enabled:
false
)
project
.
update!
(
issues_enabled:
false
)
...
...
spec/lib/gitlab/import_export/all_models.yml
View file @
affb8e23
...
@@ -387,7 +387,7 @@ project:
...
@@ -387,7 +387,7 @@ project:
-
teamcity_service
-
teamcity_service
-
pushover_integration
-
pushover_integration
-
jira_integration
-
jira_integration
-
redmine_
service
-
redmine_
integration
-
youtrack_service
-
youtrack_service
-
custom_issue_tracker_integration
-
custom_issue_tracker_integration
-
bugzilla_integration
-
bugzilla_integration
...
...
spec/models/integration_spec.rb
View file @
affb8e23
...
@@ -70,7 +70,7 @@ RSpec.describe Integration do
...
@@ -70,7 +70,7 @@ RSpec.describe Integration do
describe
'.by_type'
do
describe
'.by_type'
do
let!
(
:service1
)
{
create
(
:jira_integration
)
}
let!
(
:service1
)
{
create
(
:jira_integration
)
}
let!
(
:service2
)
{
create
(
:jira_integration
)
}
let!
(
:service2
)
{
create
(
:jira_integration
)
}
let!
(
:service3
)
{
create
(
:redmine_
service
)
}
let!
(
:service3
)
{
create
(
:redmine_
integration
)
}
subject
{
described_class
.
by_type
(
type
)
}
subject
{
described_class
.
by_type
(
type
)
}
...
...
spec/models/project_spec.rb
View file @
affb8e23
...
@@ -61,7 +61,7 @@ RSpec.describe Project, factory_default: :keep do
...
@@ -61,7 +61,7 @@ RSpec.describe Project, factory_default: :keep do
it
{
is_expected
.
to
have_one
(
:bamboo_integration
)
}
it
{
is_expected
.
to
have_one
(
:bamboo_integration
)
}
it
{
is_expected
.
to
have_one
(
:teamcity_service
)
}
it
{
is_expected
.
to
have_one
(
:teamcity_service
)
}
it
{
is_expected
.
to
have_one
(
:jira_integration
)
}
it
{
is_expected
.
to
have_one
(
:jira_integration
)
}
it
{
is_expected
.
to
have_one
(
:redmine_
service
)
}
it
{
is_expected
.
to
have_one
(
:redmine_
integration
)
}
it
{
is_expected
.
to
have_one
(
:youtrack_service
)
}
it
{
is_expected
.
to
have_one
(
:youtrack_service
)
}
it
{
is_expected
.
to
have_one
(
:custom_issue_tracker_integration
)
}
it
{
is_expected
.
to
have_one
(
:custom_issue_tracker_integration
)
}
it
{
is_expected
.
to
have_one
(
:bugzilla_integration
)
}
it
{
is_expected
.
to
have_one
(
:bugzilla_integration
)
}
...
...
spec/requests/api/graphql/project/base_service_spec.rb
View file @
affb8e23
...
@@ -9,7 +9,7 @@ RSpec.describe 'query Jira service' do
...
@@ -9,7 +9,7 @@ RSpec.describe 'query Jira service' do
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:project
)
{
create
(
:project
)
}
let_it_be
(
:jira_integration
)
{
create
(
:jira_integration
,
project:
project
)
}
let_it_be
(
:jira_integration
)
{
create
(
:jira_integration
,
project:
project
)
}
let_it_be
(
:bugzilla_integration
)
{
create
(
:bugzilla_integration
,
project:
project
)
}
let_it_be
(
:bugzilla_integration
)
{
create
(
:bugzilla_integration
,
project:
project
)
}
let_it_be
(
:redmine_
service
)
{
create
(
:redmine_service
,
project:
project
)
}
let_it_be
(
:redmine_
integration
)
{
create
(
:redmine_integration
,
project:
project
)
}
let
(
:query
)
do
let
(
:query
)
do
%(
%(
...
...
spec/services/admin/propagate_integration_service_spec.rb
View file @
affb8e23
...
@@ -20,7 +20,7 @@ RSpec.describe Admin::PropagateIntegrationService do
...
@@ -20,7 +20,7 @@ RSpec.describe Admin::PropagateIntegrationService do
end
end
let_it_be
(
:different_type_inherited_integration
)
do
let_it_be
(
:different_type_inherited_integration
)
do
create
(
:redmine_
service
,
project:
project
,
inherit_from_id:
instance_integration
.
id
)
create
(
:redmine_
integration
,
project:
project
,
inherit_from_id:
instance_integration
.
id
)
end
end
context
'with inherited integration'
do
context
'with inherited integration'
do
...
...
spec/views/projects/services/_form.haml_spec.rb
View file @
affb8e23
...
@@ -15,7 +15,7 @@ RSpec.describe 'projects/services/_form' do
...
@@ -15,7 +15,7 @@ RSpec.describe 'projects/services/_form' do
current_user:
user
,
current_user:
user
,
can?:
true
,
can?:
true
,
current_application_settings:
Gitlab
::
CurrentSettings
.
current_application_settings
,
current_application_settings:
Gitlab
::
CurrentSettings
.
current_application_settings
,
integration:
project
.
redmine_
service
,
integration:
project
.
redmine_
integration
,
request:
double
(
referer:
'/services'
)
request:
double
(
referer:
'/services'
)
)
)
end
end
...
...
spec/workers/propagate_integration_group_worker_spec.rb
View file @
affb8e23
...
@@ -8,7 +8,7 @@ RSpec.describe PropagateIntegrationGroupWorker do
...
@@ -8,7 +8,7 @@ RSpec.describe PropagateIntegrationGroupWorker do
let_it_be
(
:another_group
)
{
create
(
:group
)
}
let_it_be
(
:another_group
)
{
create
(
:group
)
}
let_it_be
(
:subgroup1
)
{
create
(
:group
,
parent:
group
)
}
let_it_be
(
:subgroup1
)
{
create
(
:group
,
parent:
group
)
}
let_it_be
(
:subgroup2
)
{
create
(
:group
,
parent:
group
)
}
let_it_be
(
:subgroup2
)
{
create
(
:group
,
parent:
group
)
}
let_it_be
(
:integration
)
{
create
(
:redmine_
service
,
:instance
)
}
let_it_be
(
:integration
)
{
create
(
:redmine_
integration
,
:instance
)
}
let
(
:job_args
)
{
[
integration
.
id
,
group
.
id
,
subgroup2
.
id
]
}
let
(
:job_args
)
{
[
integration
.
id
,
group
.
id
,
subgroup2
.
id
]
}
...
@@ -22,7 +22,7 @@ RSpec.describe PropagateIntegrationGroupWorker do
...
@@ -22,7 +22,7 @@ RSpec.describe PropagateIntegrationGroupWorker do
end
end
context
'with a group integration'
do
context
'with a group integration'
do
let_it_be
(
:integration
)
{
create
(
:redmine_
service
,
group:
group
,
project:
nil
)
}
let_it_be
(
:integration
)
{
create
(
:redmine_
integration
,
group:
group
,
project:
nil
)
}
it
'calls to BulkCreateIntegrationService'
do
it
'calls to BulkCreateIntegrationService'
do
expect
(
BulkCreateIntegrationService
).
to
receive
(
:new
)
expect
(
BulkCreateIntegrationService
).
to
receive
(
:new
)
...
...
spec/workers/propagate_integration_inherit_descendant_worker_spec.rb
View file @
affb8e23
...
@@ -5,8 +5,8 @@ require 'spec_helper'
...
@@ -5,8 +5,8 @@ require 'spec_helper'
RSpec
.
describe
PropagateIntegrationInheritDescendantWorker
do
RSpec
.
describe
PropagateIntegrationInheritDescendantWorker
do
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:group
)
{
create
(
:group
)
}
let_it_be
(
:subgroup
)
{
create
(
:group
,
parent:
group
)
}
let_it_be
(
:subgroup
)
{
create
(
:group
,
parent:
group
)
}
let_it_be
(
:group_integration
)
{
create
(
:redmine_
service
,
group:
group
,
project:
nil
)
}
let_it_be
(
:group_integration
)
{
create
(
:redmine_
integration
,
group:
group
,
project:
nil
)
}
let_it_be
(
:subgroup_integration
)
{
create
(
:redmine_
service
,
group:
subgroup
,
project:
nil
,
inherit_from_id:
group_integration
.
id
)
}
let_it_be
(
:subgroup_integration
)
{
create
(
:redmine_
integration
,
group:
subgroup
,
project:
nil
,
inherit_from_id:
group_integration
.
id
)
}
it_behaves_like
'an idempotent worker'
do
it_behaves_like
'an idempotent worker'
do
let
(
:job_args
)
{
[
group_integration
.
id
,
subgroup_integration
.
id
,
subgroup_integration
.
id
]
}
let
(
:job_args
)
{
[
group_integration
.
id
,
subgroup_integration
.
id
,
subgroup_integration
.
id
]
}
...
...
spec/workers/propagate_integration_inherit_worker_spec.rb
View file @
affb8e23
...
@@ -4,10 +4,10 @@ require 'spec_helper'
...
@@ -4,10 +4,10 @@ require 'spec_helper'
RSpec
.
describe
PropagateIntegrationInheritWorker
do
RSpec
.
describe
PropagateIntegrationInheritWorker
do
describe
'#perform'
do
describe
'#perform'
do
let_it_be
(
:integration
)
{
create
(
:redmine_
service
,
:instance
)
}
let_it_be
(
:integration
)
{
create
(
:redmine_
integration
,
:instance
)
}
let_it_be
(
:integration1
)
{
create
(
:redmine_
service
,
inherit_from_id:
integration
.
id
)
}
let_it_be
(
:integration1
)
{
create
(
:redmine_
integration
,
inherit_from_id:
integration
.
id
)
}
let_it_be
(
:integration2
)
{
create
(
:bugzilla_integration
,
inherit_from_id:
integration
.
id
)
}
let_it_be
(
:integration2
)
{
create
(
:bugzilla_integration
,
inherit_from_id:
integration
.
id
)
}
let_it_be
(
:integration3
)
{
create
(
:redmine_
service
)
}
let_it_be
(
:integration3
)
{
create
(
:redmine_
integration
)
}
it_behaves_like
'an idempotent worker'
do
it_behaves_like
'an idempotent worker'
do
let
(
:job_args
)
{
[
integration
.
id
,
integration1
.
id
,
integration3
.
id
]
}
let
(
:job_args
)
{
[
integration
.
id
,
integration1
.
id
,
integration3
.
id
]
}
...
...
spec/workers/propagate_integration_project_worker_spec.rb
View file @
affb8e23
...
@@ -8,7 +8,7 @@ RSpec.describe PropagateIntegrationProjectWorker do
...
@@ -8,7 +8,7 @@ RSpec.describe PropagateIntegrationProjectWorker do
let_it_be
(
:project1
)
{
create
(
:project
)
}
let_it_be
(
:project1
)
{
create
(
:project
)
}
let_it_be
(
:project2
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:project2
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:project3
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:project3
)
{
create
(
:project
,
group:
group
)
}
let_it_be
(
:integration
)
{
create
(
:redmine_
service
,
:instance
)
}
let_it_be
(
:integration
)
{
create
(
:redmine_
integration
,
:instance
)
}
let
(
:job_args
)
{
[
integration
.
id
,
project1
.
id
,
project3
.
id
]
}
let
(
:job_args
)
{
[
integration
.
id
,
project1
.
id
,
project3
.
id
]
}
...
@@ -22,7 +22,7 @@ RSpec.describe PropagateIntegrationProjectWorker do
...
@@ -22,7 +22,7 @@ RSpec.describe PropagateIntegrationProjectWorker do
end
end
context
'with a group integration'
do
context
'with a group integration'
do
let_it_be
(
:integration
)
{
create
(
:redmine_
service
,
group:
group
,
project:
nil
)
}
let_it_be
(
:integration
)
{
create
(
:redmine_
integration
,
group:
group
,
project:
nil
)
}
it
'calls to BulkCreateIntegrationService'
do
it
'calls to BulkCreateIntegrationService'
do
expect
(
BulkCreateIntegrationService
).
to
receive
(
:new
)
expect
(
BulkCreateIntegrationService
).
to
receive
(
:new
)
...
...
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