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
c35a1c5f
Commit
c35a1c5f
authored
Dec 17, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubucop offenses
parent
cd94c62a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
9 additions
and
10 deletions
+9
-10
app/models/geo_node.rb
app/models/geo_node.rb
+2
-2
app/services/merge_requests/refresh_service.rb
app/services/merge_requests/refresh_service.rb
+2
-2
config/initializers/elastic_client_setup.rb
config/initializers/elastic_client_setup.rb
+1
-1
lib/api/helpers/internal_helpers.rb
lib/api/helpers/internal_helpers.rb
+1
-1
lib/gitlab/checks/change_access.rb
lib/gitlab/checks/change_access.rb
+1
-2
lib/gitlab/geo.rb
lib/gitlab/geo.rb
+2
-2
No files found.
app/models/geo_node.rb
View file @
c35a1c5f
...
...
@@ -108,8 +108,8 @@ class GeoNode < ActiveRecord::Base
def
validate
(
record
)
# Prevent locking yourself out
if
record
.
host
==
Gitlab
.
config
.
gitlab
.
host
&&
record
.
port
==
Gitlab
.
config
.
gitlab
.
port
&&
record
.
relative_url_root
==
Gitlab
.
config
.
gitlab
.
relative_url_root
&&
!
record
.
primary
record
.
port
==
Gitlab
.
config
.
gitlab
.
port
&&
record
.
relative_url_root
==
Gitlab
.
config
.
gitlab
.
relative_url_root
&&
!
record
.
primary
record
.
errors
[
:base
]
<<
'Current node must be the primary node or you will be locking yourself out'
end
end
...
...
app/services/merge_requests/refresh_service.rb
View file @
c35a1c5f
...
...
@@ -81,8 +81,8 @@ module MergeRequests
target_project
=
merge_request
.
target_project
if
target_project
.
approvals_before_merge
.
nonzero?
&&
target_project
.
reset_approvals_on_push
&&
merge_request
.
rebase_commit_sha
!=
@newrev
target_project
.
reset_approvals_on_push
&&
merge_request
.
rebase_commit_sha
!=
@newrev
merge_request
.
approvals
.
destroy_all
end
...
...
config/initializers/elastic_client_setup.rb
View file @
c35a1c5f
...
...
@@ -24,7 +24,7 @@ module Elasticsearch
def
es_configuration_changed?
@es_host
!=
current_application_settings
.
elasticsearch_host
||
@es_port
!=
current_application_settings
.
elasticsearch_port
@es_port
!=
current_application_settings
.
elasticsearch_port
end
end
end
...
...
lib/api/helpers/internal_helpers.rb
View file @
c35a1c5f
...
...
@@ -55,7 +55,7 @@ module API
def
log_user_activity
(
actor
)
commands
=
Gitlab
::
GitAccess
::
DOWNLOAD_COMMANDS
+
Gitlab
::
GitAccess
::
GIT_ANNEX_COMMANDS
Gitlab
::
GitAccess
::
GIT_ANNEX_COMMANDS
::
Users
::
ActivityService
.
new
(
actor
,
'Git SSH'
).
execute
if
commands
.
include?
(
params
[
:action
])
end
...
...
lib/gitlab/checks/change_access.rb
View file @
c35a1c5f
...
...
@@ -90,8 +90,7 @@ module Gitlab
commit_validation
=
push_rule
.
try
(
:commit_validation?
)
# if newrev is blank, the branch was deleted
return
if
Gitlab
::
Git
.
blank_ref?
(
@newrev
)
||
!
(
commit_validation
||
validate_path_locks?
)
return
if
Gitlab
::
Git
.
blank_ref?
(
@newrev
)
||
!
(
commit_validation
||
validate_path_locks?
)
commits
.
each
do
|
commit
|
next
if
commit_from_annex_sync?
(
commit
.
safe_message
)
...
...
lib/gitlab/geo.rb
View file @
c35a1c5f
...
...
@@ -49,8 +49,8 @@ module Gitlab
def
self
.
oauth_authentication
return
false
unless
Gitlab
::
Geo
.
secondary?
RequestStore
.
store
[
:geo_oauth_application
]
||=
Gitlab
::
Geo
.
current_node
.
oauth_application
or
raise
OauthApplicationUndefinedError
RequestStore
.
store
[
:geo_oauth_application
]
||=
Gitlab
::
Geo
.
current_node
.
oauth_application
or
raise
OauthApplicationUndefinedError
end
end
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