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
e723dc13
Commit
e723dc13
authored
Sep 12, 2017
by
Maxim Rydkin
Committed by
Robert Speicher
Sep 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Decrease Perceived Complexity threshold to 15
parent
467dffa6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
13 deletions
+26
-13
.rubocop.yml
.rubocop.yml
+1
-1
app/models/event.rb
app/models/event.rb
+20
-12
changelogs/unreleased/31358_decrease_perceived_complexity_threshold_step2.yml
...d/31358_decrease_perceived_complexity_threshold_step2.yml
+5
-0
No files found.
.rubocop.yml
View file @
e723dc13
...
...
@@ -665,7 +665,7 @@ Metrics/ParameterLists:
# A complexity metric geared towards measuring complexity for a human reader.
Metrics/PerceivedComplexity
:
Enabled
:
true
Max
:
1
7
Max
:
1
5
# Lint ########################################################################
...
...
app/models/event.rb
View file @
e723dc13
...
...
@@ -241,13 +241,7 @@ class Event < ActiveRecord::Base
def
action_name
if
push?
if
new_ref?
"pushed new"
elsif
rm_ref?
"deleted"
else
"pushed to"
end
push_action_name
elsif
closed?
"closed"
elsif
merged?
...
...
@@ -263,11 +257,7 @@ class Event < ActiveRecord::Base
elsif
commented?
"commented on"
elsif
created_project?
if
project
.
external_import?
"imported"
else
"created"
end
created_project_action_name
else
"opened"
end
...
...
@@ -360,6 +350,24 @@ class Event < ActiveRecord::Base
private
def
push_action_name
if
new_ref?
"pushed new"
elsif
rm_ref?
"deleted"
else
"pushed to"
end
end
def
created_project_action_name
if
project
.
external_import?
"imported"
else
"created"
end
end
def
recent_update?
project
.
last_activity_at
>
RESET_PROJECT_ACTIVITY_INTERVAL
.
ago
end
...
...
changelogs/unreleased/31358_decrease_perceived_complexity_threshold_step2.yml
0 → 100644
View file @
e723dc13
---
title
:
Decrease Perceived Complexity threshold to
15
merge_request
:
14160
author
:
Maxim Rydkin
type
:
other
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