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
6b7d8dbd
Commit
6b7d8dbd
authored
Apr 03, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
a086aa81
7700e029
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
97 deletions
+19
-97
app/services/git/tag_push_service.rb
app/services/git/tag_push_service.rb
+0
-12
changelogs/unreleased/52560-fix-duplicate-tag-system-hooks.yml
...elogs/unreleased/52560-fix-duplicate-tag-system-hooks.yml
+5
-0
spec/services/git/tag_push_service_spec.rb
spec/services/git/tag_push_service_spec.rb
+14
-0
spec/support/shared_examples/time_tracking_shared_examples.rb
.../support/shared_examples/time_tracking_shared_examples.rb
+0
-85
No files found.
app/services/git/tag_push_service.rb
View file @
6b7d8dbd
...
...
@@ -13,7 +13,6 @@ module Git
EventCreateService
.
new
.
push
(
project
,
current_user
,
push_data
)
Ci
::
CreatePipelineService
.
new
(
project
,
current_user
,
push_data
).
execute
(
:push
,
pipeline_options
)
SystemHooksService
.
new
.
execute_hooks
(
build_system_push_data
,
:tag_push_hooks
)
project
.
execute_hooks
(
push_data
.
dup
,
:tag_push_hooks
)
project
.
execute_services
(
push_data
.
dup
,
:tag_push_hooks
)
...
...
@@ -50,17 +49,6 @@ module Git
push_options:
params
[
:push_options
]
||
[])
end
def
build_system_push_data
Gitlab
::
DataBuilder
::
Push
.
build
(
project
,
current_user
,
params
[
:oldrev
],
params
[
:newrev
],
params
[
:ref
],
[],
''
)
end
def
pipeline_options
{}
# to be overridden in EE
end
...
...
changelogs/unreleased/52560-fix-duplicate-tag-system-hooks.yml
0 → 100644
View file @
6b7d8dbd
---
title
:
Only execute system hooks once when pushing tags
merge_request
:
26888
author
:
type
:
fixed
spec/services/git/tag_push_service_spec.rb
View file @
6b7d8dbd
...
...
@@ -31,6 +31,20 @@ describe Git::TagPushService do
end
end
describe
'System Hooks'
do
let!
(
:push_data
)
{
service
.
tap
(
&
:execute
).
push_data
}
it
"executes system hooks after pushing a tag"
do
expect_next_instance_of
(
SystemHooksService
)
do
|
system_hooks_service
|
expect
(
system_hooks_service
)
.
to
receive
(
:execute_hooks
)
.
with
(
push_data
,
:tag_push_hooks
)
end
service
.
execute
end
end
describe
"Pipelines"
do
subject
{
service
.
execute
}
...
...
spec/support/shared_examples/time_tracking_shared_examples.rb
deleted
100644 → 0
View file @
a086aa81
shared_examples
'issuable time tracker'
do
it
'renders the sidebar component empty state'
do
page
.
within
'.time-tracking-no-tracking-pane'
do
expect
(
page
).
to
have_content
'No estimate or time spent'
end
end
it
'updates the sidebar component when estimate is added'
do
submit_time
(
'/estimate 3w 1d 1h'
)
wait_for_requests
page
.
within
'.time-tracking-estimate-only-pane'
do
expect
(
page
).
to
have_content
'3w 1d 1h'
end
end
it
'updates the sidebar component when spent is added'
do
submit_time
(
'/spend 3w 1d 1h'
)
wait_for_requests
page
.
within
'.time-tracking-spend-only-pane'
do
expect
(
page
).
to
have_content
'3w 1d 1h'
end
end
it
'shows the comparison when estimate and spent are added'
do
submit_time
(
'/estimate 3w 1d 1h'
)
submit_time
(
'/spend 3w 1d 1h'
)
wait_for_requests
page
.
within
'.time-tracking-comparison-pane'
do
expect
(
page
).
to
have_content
'3w 1d 1h'
end
end
it
'updates the sidebar component when estimate is removed'
do
submit_time
(
'/estimate 3w 1d 1h'
)
submit_time
(
'/remove_estimate'
)
page
.
within
'.time-tracking-component-wrap'
do
expect
(
page
).
to
have_content
'No estimate or time spent'
end
end
it
'updates the sidebar component when spent is removed'
do
submit_time
(
'/spend 3w 1d 1h'
)
submit_time
(
'/remove_time_spent'
)
page
.
within
'.time-tracking-component-wrap'
do
expect
(
page
).
to
have_content
'No estimate or time spent'
end
end
it
'shows the help state when icon is clicked'
do
page
.
within
'.time-tracking-component-wrap'
do
find
(
'.help-button'
).
click
expect
(
page
).
to
have_content
'Track time with quick actions'
expect
(
page
).
to
have_content
'Learn more'
end
end
it
'hides the help state when close icon is clicked'
do
page
.
within
'.time-tracking-component-wrap'
do
find
(
'.help-button'
).
click
find
(
'.close-help-button'
).
click
expect
(
page
).
not_to
have_content
'Track time with quick actions'
expect
(
page
).
not_to
have_content
'Learn more'
end
end
it
'displays the correct help url'
do
page
.
within
'.time-tracking-component-wrap'
do
find
(
'.help-button'
).
click
expect
(
find_link
(
'Learn more'
)[
:href
]).
to
have_content
(
'/help/workflow/time_tracking.md'
)
end
end
end
def
submit_time
(
quick_action
)
fill_in
'note[note]'
,
with:
quick_action
find
(
'.js-comment-submit-button'
).
click
wait_for_requests
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