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
cc6132d6
Commit
cc6132d6
authored
Mar 12, 2020
by
Francisco Javier López
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove snippet sync after git action
parent
b9ec8706
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
23 deletions
+0
-23
app/workers/post_receive.rb
app/workers/post_receive.rb
+0
-5
spec/workers/post_receive_spec.rb
spec/workers/post_receive_spec.rb
+0
-18
No files found.
app/workers/post_receive.rb
View file @
cc6132d6
...
...
@@ -77,11 +77,6 @@ class PostReceive # rubocop:disable Scalability/IdempotentWorker
return
false
unless
user
# We can remove once we implement multi-file snippets
# https://gitlab.com/gitlab-org/gitlab/-/issues/39269
blob
=
snippet
.
blobs
.
first
snippet
.
update
(
file_name:
blob
.
path
,
content:
blob
.
data
)
if
blob
# At the moment, we only expires the repository caches.
# In the future we might need to call ProjectCacheWorker
# (or the custom class we create) to update the snippet
...
...
spec/workers/post_receive_spec.rb
View file @
cc6132d6
...
...
@@ -421,24 +421,6 @@ describe PostReceive do
perform
end
end
it
'updates the snippet db information'
do
blob
=
snippet
.
blobs
.
first
expect
(
snippet
).
to
receive
(
:update
).
with
(
file_name:
blob
.
path
,
content:
blob
.
data
)
perform
end
context
'when snippet does not have any blob'
do
it
'does not update snippet db information'
do
allow
(
snippet
).
to
receive
(
:blobs
).
and_return
([])
expect
(
snippet
).
not_to
receive
(
:update
)
perform
end
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