BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
68f73024
Commit
68f73024
authored
Jan 28, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a scope for visible services, code styling changes for easier readability.
parent
c6c7552e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
7 deletions
+5
-7
services_controller.rb
app/controllers/projects/services_controller.rb
+1
-1
project.rb
app/models/project.rb
+1
-5
gitlab_issue_tracker_service.rb
app/models/project_services/gitlab_issue_tracker_service.rb
+1
-1
service.rb
app/models/service.rb
+2
-0
No files found.
app/controllers/projects/services_controller.rb
View file @
68f73024
...
...
@@ -9,7 +9,7 @@ class Projects::ServicesController < Projects::ApplicationController
def
index
@project
.
build_missing_services
@services
=
@project
.
services
.
where
.
not
(
type:
'GitlabIssueTrackerService'
)
.
reload
@services
=
@project
.
services
.
visible
.
reload
end
def
edit
...
...
app/models/project.rb
View file @
68f73024
...
...
@@ -317,11 +317,7 @@ class Project < ActiveRecord::Base
end
def
default_issue_tracker
unless
gitlab_issue_tracker_service
create_gitlab_issue_tracker_service
end
gitlab_issue_tracker_service
gitlab_issue_tracker_service
||=
create_gitlab_issue_tracker_service
end
def
issues_tracker
...
...
app/models/project_services/gitlab_issue_tracker_service.rb
View file @
68f73024
...
...
@@ -20,6 +20,6 @@ class GitlabIssueTrackerService < IssueTrackerService
end
def
issue_url
(
iid
)
"
#{
Gitlab
.
config
.
gitlab
.
url
}#{
project_issue_path
project_id:
project
,
id:
iid
}
"
"
#{
Gitlab
.
config
.
gitlab
.
url
}#{
project_issue_path
(
project_id:
project
,
id:
iid
)
}
"
end
end
app/models/service.rb
View file @
68f73024
...
...
@@ -26,6 +26,8 @@ class Service < ActiveRecord::Base
validates
:project_id
,
presence:
true
scope
:visible
,
->
{
where
.
not
(
type:
'GitlabIssueTrackerService'
)
}
def
activated?
active
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