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
00549635
Commit
00549635
authored
May 23, 2017
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unecessary commit pattern check
parent
e44016b9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
11 deletions
+1
-11
app/workers/process_commit_worker.rb
app/workers/process_commit_worker.rb
+1
-3
spec/workers/process_commit_worker_spec.rb
spec/workers/process_commit_worker_spec.rb
+0
-8
No files found.
app/workers/process_commit_worker.rb
View file @
00549635
...
...
@@ -25,8 +25,6 @@ class ProcessCommitWorker
commit
=
build_commit
(
project
,
commit_hash
)
return
unless
commit
.
matches_cross_reference_regex?
author
=
commit
.
author
||
user
process_commit_message
(
project
,
commit
,
user
,
author
,
default
)
...
...
@@ -80,7 +78,7 @@ class ProcessCommitWorker
private
# Avoid
to re-process commits messages that already exists
in the upstream
# Avoid
reprocessing commits that already exist
in the upstream
# when project is forked. This will also prevent duplicated system notes.
def
commit_exists_in_upstream?
(
project
,
commit_hash
)
return
false
unless
project
.
forked?
...
...
spec/workers/process_commit_worker_spec.rb
View file @
00549635
...
...
@@ -20,14 +20,6 @@ describe ProcessCommitWorker do
worker
.
perform
(
project
.
id
,
-
1
,
commit
.
to_hash
)
end
it
'does not process the commit when no issues are referenced'
do
allow
(
worker
).
to
receive
(
:build_commit
).
and_return
(
double
(
matches_cross_reference_regex?:
false
))
expect
(
worker
).
not_to
receive
(
:process_commit_message
)
worker
.
perform
(
project
.
id
,
user
.
id
,
commit
.
to_hash
)
end
it
'processes the commit message'
do
expect
(
worker
).
to
receive
(
:process_commit_message
).
and_call_original
...
...
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