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
0b882ca5
Commit
0b882ca5
authored
Nov 21, 2016
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix calls to after_push_commit after CE upstream merge
parent
32bb98c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
app/workers/geo_repository_update_worker.rb
app/workers/geo_repository_update_worker.rb
+3
-3
spec/workers/geo_repository_update_worker_spec.rb
spec/workers/geo_repository_update_worker_spec.rb
+1
-1
No files found.
app/workers/geo_repository_update_worker.rb
View file @
0b882ca5
...
@@ -24,12 +24,12 @@ class GeoRepositoryUpdateWorker
...
@@ -24,12 +24,12 @@ class GeoRepositoryUpdateWorker
def
process_hooks
def
process_hooks
if
@push_data
[
'type'
]
==
'push'
if
@push_data
[
'type'
]
==
'push'
branch
=
Gitlab
::
Git
.
ref_name
(
@push_data
[
'ref'
])
branch
=
Gitlab
::
Git
.
ref_name
(
@push_data
[
'ref'
])
process_push
(
branch
,
@push_data
[
'after'
]
)
process_push
(
branch
)
end
end
end
end
def
process_push
(
branch
,
revision
)
def
process_push
(
branch
)
@project
.
repository
.
after_push_commit
(
branch
,
revision
)
@project
.
repository
.
after_push_commit
(
branch
)
if
push_remove_branch?
if
push_remove_branch?
@project
.
repository
.
after_remove_branch
@project
.
repository
.
after_remove_branch
...
...
spec/workers/geo_repository_update_worker_spec.rb
View file @
0b882ca5
...
@@ -86,7 +86,7 @@ describe GeoRepositoryUpdateWorker do
...
@@ -86,7 +86,7 @@ describe GeoRepositoryUpdateWorker do
before
{
allow
(
subject
).
to
receive
(
:fetch_repository
)
}
before
{
allow
(
subject
).
to
receive
(
:fetch_repository
)
}
it
'executes after_push_commit'
do
it
'executes after_push_commit'
do
expect
(
project
.
repository
).
to
receive
(
:after_push_commit
).
at_least
(
:once
).
with
(
'master'
,
newrev
)
expect
(
project
.
repository
).
to
receive
(
:after_push_commit
).
at_least
(
:once
).
with
(
'master'
)
performed
performed
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