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
d2bd7606
Commit
d2bd7606
authored
Feb 26, 2018
by
James Edwards-Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moves GithubService changes to ee/ folders
parent
3ecfa112
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
74 additions
and
56 deletions
+74
-56
app/models/project.rb
app/models/project.rb
+0
-1
app/models/service.rb
app/models/service.rb
+1
-3
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+1
-0
ee/app/models/ee/service.rb
ee/app/models/ee/service.rb
+20
-0
lib/api/services.rb
lib/api/services.rb
+26
-26
lib/api/v3/services.rb
lib/api/v3/services.rb
+26
-26
No files found.
app/models/project.rb
View file @
d2bd7606
...
...
@@ -137,7 +137,6 @@ class Project < ActiveRecord::Base
has_one
:mock_monitoring_service
has_one
:microsoft_teams_service
has_one
:packagist_service
has_one
:github_service
# TODO: replace these relations with the fork network versions
has_one
:forked_project_link
,
foreign_key:
"forked_to_project_id"
...
...
app/models/service.rb
View file @
d2bd7606
# To add new service you should build a class inherited from Service
# and implement a set of methods
class
Service
<
ActiveRecord
::
Base
prepend
EE
::
Service
include
Sortable
include
Importable
...
...
@@ -240,11 +241,8 @@ class Service < ActiveRecord::Base
external_wiki
flowdock
gemnasium
github
hipchat
irker
jenkins
jenkins_deprecated
jira
kubernetes
mattermost_slash_commands
...
...
ee/app/models/ee/project.rb
View file @
d2bd7606
...
...
@@ -29,6 +29,7 @@ module EE
has_one
:index_status
has_one
:jenkins_service
has_one
:jenkins_deprecated_service
has_one
:github_service
has_many
:approvers
,
as: :target
,
dependent: :destroy
# rubocop:disable Cop/ActiveRecordDependent
has_many
:approver_groups
,
as: :target
,
dependent: :destroy
# rubocop:disable Cop/ActiveRecordDependent
...
...
ee/app/models/ee/service.rb
0 → 100644
View file @
d2bd7606
module
EE
module
Service
extend
ActiveSupport
::
Concern
module
ClassMethods
extend
::
Gitlab
::
Utils
::
Override
override
:available_services_names
def
available_services_names
ee_service_names
=
%w[
github
jenkins
jenkins_deprecated
]
(
super
+
ee_service_names
).
sort_by
(
&
:downcase
)
end
end
end
end
lib/api/services.rb
View file @
d2bd7606
...
...
@@ -368,32 +368,6 @@ module API
desc:
"The project's slug on gemnasium.com"
}
],
'github'
=>
[
{
required:
true
,
name: :token
,
type:
String
,
desc:
'GitHub API token with repo:status OAuth scope'
},
{
required:
false
,
name: :api_url
,
type:
String
,
desc:
'GitHub instance API URL, defaults to https://api.github.com'
},
{
required:
true
,
name: :owner
,
type:
String
,
desc:
'Owner or organization of the GitHub repo'
},
{
required:
true
,
name: :repository_name
,
type:
String
,
desc:
"GitHub repository name"
}
],
'hipchat'
=>
[
{
required:
true
,
...
...
@@ -699,6 +673,32 @@ module API
}
],
# EE-specific services
'github'
=>
[
{
required:
true
,
name: :token
,
type:
String
,
desc:
'GitHub API token with repo:status OAuth scope'
},
{
required:
false
,
name: :api_url
,
type:
String
,
desc:
'GitHub instance API URL, defaults to https://api.github.com'
},
{
required:
true
,
name: :owner
,
type:
String
,
desc:
'Owner or organization of the GitHub repo'
},
{
required:
true
,
name: :repository_name
,
type:
String
,
desc:
"GitHub repository name"
}
],
'jenkins'
=>
[
{
required:
true
,
...
...
lib/api/v3/services.rb
View file @
d2bd7606
...
...
@@ -250,32 +250,6 @@ module API
desc:
"The project's slug on gemnasium.com"
}
],
'github'
=>
[
{
required:
true
,
name: :token
,
type:
String
,
desc:
'GitHub API token with repo:status OAuth scope'
},
{
required:
false
,
name: :api_url
,
type:
String
,
desc:
'GitHub instance API URL, defaults to https://api.github.com'
},
{
required:
true
,
name: :owner
,
type:
String
,
desc:
'Owner or organization of the GitHub repo'
},
{
required:
true
,
name: :repository_name
,
type:
String
,
desc:
"GitHub repository name"
}
],
'hipchat'
=>
[
{
required:
true
,
...
...
@@ -587,6 +561,32 @@ module API
}
],
# EE-specific services
'github'
=>
[
{
required:
true
,
name: :token
,
type:
String
,
desc:
'GitHub API token with repo:status OAuth scope'
},
{
required:
false
,
name: :api_url
,
type:
String
,
desc:
'GitHub instance API URL, defaults to https://api.github.com'
},
{
required:
true
,
name: :owner
,
type:
String
,
desc:
'Owner or organization of the GitHub repo'
},
{
required:
true
,
name: :repository_name
,
type:
String
,
desc:
"GitHub repository name"
}
],
'jenkins'
=>
[
{
required:
true
,
...
...
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