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
Jérome Perrin
gitlab-ce
Commits
62c00661
Commit
62c00661
authored
Jan 20, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow creation of the jira and redmine services.
parent
9371c6b9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
app/controllers/projects/services_controller.rb
app/controllers/projects/services_controller.rb
+4
-2
app/models/project.rb
app/models/project.rb
+4
-1
No files found.
app/controllers/projects/services_controller.rb
View file @
62c00661
...
@@ -17,7 +17,8 @@ class Projects::ServicesController < Projects::ApplicationController
...
@@ -17,7 +17,8 @@ class Projects::ServicesController < Projects::ApplicationController
def
update
def
update
if
@service
.
update_attributes
(
service_params
)
if
@service
.
update_attributes
(
service_params
)
redirect_to
edit_project_service_path
(
@project
,
@service
.
to_param
)
redirect_to
edit_project_service_path
(
@project
,
@service
.
to_param
),
notice:
'Successfully updated.'
else
else
render
'edit'
render
'edit'
end
end
...
@@ -41,7 +42,8 @@ class Projects::ServicesController < Projects::ApplicationController
...
@@ -41,7 +42,8 @@ class Projects::ServicesController < Projects::ApplicationController
:title
,
:token
,
:type
,
:active
,
:api_key
,
:subdomain
,
:title
,
:token
,
:type
,
:active
,
:api_key
,
:subdomain
,
:room
,
:recipients
,
:project_url
,
:webhook
,
:room
,
:recipients
,
:project_url
,
:webhook
,
:user_key
,
:device
,
:priority
,
:sound
,
:bamboo_url
,
:username
,
:password
,
:user_key
,
:device
,
:priority
,
:sound
,
:bamboo_url
,
:username
,
:password
,
:build_key
,
:server
,
:teamcity_url
,
:build_type
:build_key
,
:server
,
:teamcity_url
,
:build_type
,
:description
,
:issues_url
,
:new_issue_url
)
)
end
end
end
end
app/models/project.rb
View file @
62c00661
...
@@ -68,6 +68,9 @@ class Project < ActiveRecord::Base
...
@@ -68,6 +68,9 @@ class Project < ActiveRecord::Base
has_one
:bamboo_service
,
dependent: :destroy
has_one
:bamboo_service
,
dependent: :destroy
has_one
:teamcity_service
,
dependent: :destroy
has_one
:teamcity_service
,
dependent: :destroy
has_one
:pushover_service
,
dependent: :destroy
has_one
:pushover_service
,
dependent: :destroy
has_one
:jira_service
,
dependent: :destroy
has_one
:redmine_service
,
dependent: :destroy
has_one
:forked_project_link
,
dependent: :destroy
,
foreign_key:
"forked_to_project_id"
has_one
:forked_project_link
,
dependent: :destroy
,
foreign_key:
"forked_to_project_id"
has_one
:forked_from_project
,
through: :forked_project_link
has_one
:forked_from_project
,
through: :forked_project_link
# Merge Requests for target project should be removed with it
# Merge Requests for target project should be removed with it
...
@@ -321,7 +324,7 @@ class Project < ActiveRecord::Base
...
@@ -321,7 +324,7 @@ class Project < ActiveRecord::Base
def
available_services_names
def
available_services_names
%w(gitlab_ci campfire hipchat pivotaltracker flowdock assembla
%w(gitlab_ci campfire hipchat pivotaltracker flowdock assembla
emails_on_push gemnasium slack pushover buildbox bamboo teamcity)
emails_on_push gemnasium slack pushover buildbox bamboo teamcity
jira redmine
)
end
end
def
gitlab_ci?
def
gitlab_ci?
...
...
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