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
69a23cbe
Commit
69a23cbe
authored
Nov 22, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
ea4762d4
Changes
16
Show whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
65 additions
and
53 deletions
+65
-53
app/assets/javascripts/releases/list/components/release_block.vue
...ts/javascripts/releases/list/components/release_block.vue
+1
-3
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+5
-0
app/assets/stylesheets/framework/selects.scss
app/assets/stylesheets/framework/selects.scss
+1
-1
app/controllers/projects/releases_controller.rb
app/controllers/projects/releases_controller.rb
+0
-2
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+10
-0
app/models/merge_request.rb
app/models/merge_request.rb
+0
-20
app/presenters/release_presenter.rb
app/presenters/release_presenter.rb
+1
-2
app/views/layouts/header/_current_user_dropdown.html.haml
app/views/layouts/header/_current_user_dropdown.html.haml
+1
-1
app/views/projects/merge_requests/_mr_title.html.haml
app/views/projects/merge_requests/_mr_title.html.haml
+3
-2
changelogs/unreleased/37000-reduce-start-a-trial-emoji-rocket-size.yml
...released/37000-reduce-start-a-trial-emoji-rocket-size.yml
+5
-0
changelogs/unreleased/fix-padding-in-project-settings-members.yml
...gs/unreleased/fix-padding-in-project-settings-members.yml
+5
-0
lib/gitlab/danger/teammate.rb
lib/gitlab/danger/teammate.rb
+1
-1
spec/frontend/releases/list/components/release_block_spec.js
spec/frontend/releases/list/components/release_block_spec.js
+0
-6
spec/helpers/merge_requests_helper_spec.rb
spec/helpers/merge_requests_helper_spec.rb
+25
-0
spec/lib/gitlab/danger/teammate_spec.rb
spec/lib/gitlab/danger/teammate_spec.rb
+7
-7
spec/presenters/release_presenter_spec.rb
spec/presenters/release_presenter_spec.rb
+0
-8
No files found.
app/assets/javascripts/releases/list/components/release_block.vue
View file @
69a23cbe
...
@@ -82,9 +82,7 @@ export default {
...
@@ -82,9 +82,7 @@ export default {
return
n__
(
'
Milestone
'
,
'
Milestones
'
,
this
.
release
.
milestones
.
length
);
return
n__
(
'
Milestone
'
,
'
Milestones
'
,
this
.
release
.
milestones
.
length
);
},
},
shouldShowEditButton
()
{
shouldShowEditButton
()
{
return
Boolean
(
return
Boolean
(
this
.
release
.
_links
&&
this
.
release
.
_links
.
edit_url
);
this
.
glFeatures
.
releaseEditPage
&&
this
.
release
.
_links
&&
this
.
release
.
_links
.
edit_url
,
);
},
},
shouldShowEvidence
()
{
shouldShowEvidence
()
{
return
this
.
glFeatures
.
releaseEvidenceCollection
;
return
this
.
glFeatures
.
releaseEvidenceCollection
;
...
...
app/assets/stylesheets/framework/header.scss
View file @
69a23cbe
...
@@ -552,6 +552,11 @@
...
@@ -552,6 +552,11 @@
svg
{
svg
{
vertical-align
:
text-top
;
vertical-align
:
text-top
;
}
}
a
.trial-link
gl-emoji
{
font-size
:
$gl-font-size
;
vertical-align
:
baseline
;
}
}
}
}
}
...
...
app/assets/stylesheets/framework/selects.scss
View file @
69a23cbe
...
@@ -118,7 +118,7 @@
...
@@ -118,7 +118,7 @@
background
:
none
;
background
:
none
;
.select2-search-field
input
{
.select2-search-field
input
{
padding
:
5px
$gl-
padding
/
2
;
padding
:
5px
$gl-
input-padding
;
height
:
auto
;
height
:
auto
;
font-family
:
inherit
;
font-family
:
inherit
;
font-size
:
inherit
;
font-size
:
inherit
;
...
...
app/controllers/projects/releases_controller.rb
View file @
69a23cbe
...
@@ -6,7 +6,6 @@ class Projects::ReleasesController < Projects::ApplicationController
...
@@ -6,7 +6,6 @@ class Projects::ReleasesController < Projects::ApplicationController
before_action
:release
,
only:
%i[edit update]
before_action
:release
,
only:
%i[edit update]
before_action
:authorize_read_release!
before_action
:authorize_read_release!
before_action
do
before_action
do
push_frontend_feature_flag
(
:release_edit_page
,
project
,
default_enabled:
true
)
push_frontend_feature_flag
(
:release_issue_summary
,
project
)
push_frontend_feature_flag
(
:release_issue_summary
,
project
)
push_frontend_feature_flag
(
:release_evidence_collection
,
project
)
push_frontend_feature_flag
(
:release_evidence_collection
,
project
)
end
end
...
@@ -44,7 +43,6 @@ class Projects::ReleasesController < Projects::ApplicationController
...
@@ -44,7 +43,6 @@ class Projects::ReleasesController < Projects::ApplicationController
private
private
def
authorize_update_release!
def
authorize_update_release!
access_denied!
unless
Feature
.
enabled?
(
:release_edit_page
,
project
,
default_enabled:
true
)
access_denied!
unless
can?
(
current_user
,
:update_release
,
release
)
access_denied!
unless
can?
(
current_user
,
:update_release
,
release
)
end
end
...
...
app/helpers/merge_requests_helper.rb
View file @
69a23cbe
...
@@ -27,6 +27,16 @@ module MergeRequestsHelper
...
@@ -27,6 +27,16 @@ module MergeRequestsHelper
classes
.
join
(
' '
)
classes
.
join
(
' '
)
end
end
def
state_name_with_icon
(
merge_request
)
if
merge_request
.
merged?
[
_
(
"Merged"
),
"git-merge"
]
elsif
merge_request
.
closed?
[
_
(
"Closed"
),
"close"
]
else
[
_
(
"Open"
),
"issue-open-m"
]
end
end
def
ci_build_details_path
(
merge_request
)
def
ci_build_details_path
(
merge_request
)
build_url
=
merge_request
.
source_project
.
ci_service
.
build_page
(
merge_request
.
diff_head_sha
,
merge_request
.
source_branch
)
build_url
=
merge_request
.
source_project
.
ci_service
.
build_page
(
merge_request
.
diff_head_sha
,
merge_request
.
source_branch
)
return
unless
build_url
return
unless
build_url
...
...
app/models/merge_request.rb
View file @
69a23cbe
...
@@ -1149,26 +1149,6 @@ class MergeRequest < ApplicationRecord
...
@@ -1149,26 +1149,6 @@ class MergeRequest < ApplicationRecord
actual_head_pipeline
.
environments
actual_head_pipeline
.
environments
end
end
def
state_human_name
if
merged?
"Merged"
elsif
closed?
"Closed"
else
"Open"
end
end
def
state_icon_name
if
merged?
"git-merge"
elsif
closed?
"close"
else
"issue-open-m"
end
end
def
fetch_ref!
def
fetch_ref!
target_project
.
repository
.
fetch_source_branch!
(
source_project
.
repository
,
source_branch
,
ref_path
)
target_project
.
repository
.
fetch_source_branch!
(
source_project
.
repository
,
source_branch
,
ref_path
)
end
end
...
...
app/presenters/release_presenter.rb
View file @
69a23cbe
...
@@ -58,7 +58,6 @@ class ReleasePresenter < Gitlab::View::Presenter::Delegated
...
@@ -58,7 +58,6 @@ class ReleasePresenter < Gitlab::View::Presenter::Delegated
end
end
def
release_edit_page_available?
def
release_edit_page_available?
::
Feature
.
enabled?
(
:release_edit_page
,
project
,
default_enabled:
true
)
&&
can?
(
current_user
,
:update_release
,
release
)
can?
(
current_user
,
:update_release
,
release
)
end
end
end
end
app/views/layouts/header/_current_user_dropdown.html.haml
View file @
69a23cbe
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
=
link_to
s_
(
"CurrentUser|Profile"
),
current_user
,
class:
'profile-link'
,
data:
{
user:
current_user
.
username
}
=
link_to
s_
(
"CurrentUser|Profile"
),
current_user
,
class:
'profile-link'
,
data:
{
user:
current_user
.
username
}
-
if
current_user_menu?
(
:start_trial
)
-
if
current_user_menu?
(
:start_trial
)
%li
%li
%a
.
profile
-link
{
href:
trials_link_url
}
%a
.
trial
-link
{
href:
trials_link_url
}
=
s_
(
"CurrentUser|Start a Gold trial"
)
=
s_
(
"CurrentUser|Start a Gold trial"
)
=
emoji_icon
(
'rocket'
)
=
emoji_icon
(
'rocket'
)
-
if
current_user_menu?
(
:settings
)
-
if
current_user_menu?
(
:settings
)
...
...
app/views/projects/merge_requests/_mr_title.html.haml
View file @
69a23cbe
-
can_update_merge_request
=
can?
(
current_user
,
:update_merge_request
,
@merge_request
)
-
can_update_merge_request
=
can?
(
current_user
,
:update_merge_request
,
@merge_request
)
-
can_reopen_merge_request
=
can?
(
current_user
,
:reopen_merge_request
,
@merge_request
)
-
can_reopen_merge_request
=
can?
(
current_user
,
:reopen_merge_request
,
@merge_request
)
-
state_human_name
,
state_icon_name
=
state_name_with_icon
(
@merge_request
)
-
if
@merge_request
.
closed_without_fork?
-
if
@merge_request
.
closed_without_fork?
.alert.alert-danger
.alert.alert-danger
...
@@ -8,9 +9,9 @@
...
@@ -8,9 +9,9 @@
.detail-page-header
.detail-page-header
.detail-page-header-body
.detail-page-header-body
.issuable-status-box.status-box
{
class:
status_box_class
(
@merge_request
)
}
.issuable-status-box.status-box
{
class:
status_box_class
(
@merge_request
)
}
=
sprite_icon
(
@merge_request
.
state_icon_name
,
size:
16
,
css_class:
'd-block d-sm-none'
)
=
sprite_icon
(
state_icon_name
,
size:
16
,
css_class:
'd-block d-sm-none'
)
%span
.d-none.d-sm-block
%span
.d-none.d-sm-block
=
@merge_request
.
state_human_name
=
state_human_name
.issuable-meta
.issuable-meta
-
if
@merge_request
.
discussion_locked?
-
if
@merge_request
.
discussion_locked?
...
...
changelogs/unreleased/37000-reduce-start-a-trial-emoji-rocket-size.yml
0 → 100644
View file @
69a23cbe
---
title
:
Reduce start a trial rocket emoji size
merge_request
:
20579
author
:
type
:
changed
changelogs/unreleased/fix-padding-in-project-settings-members.yml
0 → 100644
View file @
69a23cbe
---
title
:
Fix multi select input padding in project and group user select
merge_request
:
20520
author
:
Kevin Lee
type
:
fixed
lib/gitlab/danger/teammate.rb
View file @
69a23cbe
...
@@ -63,7 +63,7 @@ module Gitlab
...
@@ -63,7 +63,7 @@ module Gitlab
def
has_capability?
(
project
,
category
,
kind
,
labels
)
def
has_capability?
(
project
,
category
,
kind
,
labels
)
case
category
case
category
when
:test
when
:test
area
=
role
[
/
Test Automation Engineer
(?:.*?, (\w+))/
,
1
]
area
=
role
[
/
Software Engineer in Test
(?:.*?, (\w+))/
,
1
]
area
&&
labels
.
any?
(
"devops::
#{
area
.
downcase
}
"
)
if
kind
==
:reviewer
area
&&
labels
.
any?
(
"devops::
#{
area
.
downcase
}
"
)
if
kind
==
:reviewer
when
:engineering_productivity
when
:engineering_productivity
...
...
spec/frontend/releases/list/components/release_block_spec.js
View file @
69a23cbe
...
@@ -30,7 +30,6 @@ describe('Release block', () => {
...
@@ -30,7 +30,6 @@ describe('Release block', () => {
},
},
provide
:
{
provide
:
{
glFeatures
:
{
glFeatures
:
{
releaseEditPage
:
true
,
releaseIssueSummary
:
true
,
releaseIssueSummary
:
true
,
...
featureFlags
,
...
featureFlags
,
},
},
...
@@ -180,11 +179,6 @@ describe('Release block', () => {
...
@@ -180,11 +179,6 @@ describe('Release block', () => {
});
});
});
});
it
(
'
does not render an edit button if the releaseEditPage feature flag is disabled
'
,
()
=>
factory
(
releaseClone
,
{
releaseEditPage
:
false
}).
then
(()
=>
{
expect
(
editButton
().
exists
()).
toBe
(
false
);
}));
it
(
'
does not render the milestone list if no milestones are associated to the release
'
,
()
=>
{
it
(
'
does not render the milestone list if no milestones are associated to the release
'
,
()
=>
{
delete
releaseClone
.
milestones
;
delete
releaseClone
.
milestones
;
...
...
spec/helpers/merge_requests_helper_spec.rb
View file @
69a23cbe
...
@@ -26,6 +26,31 @@ describe MergeRequestsHelper do
...
@@ -26,6 +26,31 @@ describe MergeRequestsHelper do
end
end
end
end
describe
'#state_name_with_icon'
do
using
RSpec
::
Parameterized
::
TableSyntax
let
(
:merge_request
)
{
MergeRequest
.
new
}
where
(
:state
,
:expected_name
,
:expected_icon
)
do
:merged?
|
'Merged'
|
'git-merge'
:closed?
|
'Closed'
|
'close'
:opened?
|
'Open'
|
'issue-open-m'
end
with_them
do
before
do
allow
(
merge_request
).
to
receive
(
state
).
and_return
(
true
)
end
it
'returns name and icon'
do
name
,
icon
=
helper
.
state_name_with_icon
(
merge_request
)
expect
(
name
).
to
eq
(
expected_name
)
expect
(
icon
).
to
eq
(
expected_icon
)
end
end
end
describe
'#format_mr_branch_names'
do
describe
'#format_mr_branch_names'
do
describe
'within the same project'
do
describe
'within the same project'
do
let
(
:merge_request
)
{
create
(
:merge_request
)
}
let
(
:merge_request
)
{
create
(
:merge_request
)
}
...
...
spec/lib/gitlab/danger/teammate_spec.rb
View file @
69a23cbe
...
@@ -33,8 +33,8 @@ describe Gitlab::Danger::Teammate do
...
@@ -33,8 +33,8 @@ describe Gitlab::Danger::Teammate do
context
'when labels contain devops::create and the category is test'
do
context
'when labels contain devops::create and the category is test'
do
let
(
:labels
)
{
[
'devops::create'
]
}
let
(
:labels
)
{
[
'devops::create'
]
}
context
'when role is
Test Automation Engineer
, Create'
do
context
'when role is
Software Engineer in Test
, Create'
do
let
(
:role
)
{
'
Test Automation Engineer
, Create'
}
let
(
:role
)
{
'
Software Engineer in Test
, Create'
}
it
'#reviewer? returns true'
do
it
'#reviewer? returns true'
do
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_truthy
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_truthy
...
@@ -45,7 +45,7 @@ describe Gitlab::Danger::Teammate do
...
@@ -45,7 +45,7 @@ describe Gitlab::Danger::Teammate do
end
end
context
'when hyperlink is mangled in the role'
do
context
'when hyperlink is mangled in the role'
do
let
(
:role
)
{
'<a href="#">
Test Automation Engineer
</a>, Create'
}
let
(
:role
)
{
'<a href="#">
Software Engineer in Test
</a>, Create'
}
it
'#reviewer? returns true'
do
it
'#reviewer? returns true'
do
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_truthy
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_truthy
...
@@ -53,16 +53,16 @@ describe Gitlab::Danger::Teammate do
...
@@ -53,16 +53,16 @@ describe Gitlab::Danger::Teammate do
end
end
end
end
context
'when role is
Test Automation Engineer
'
do
context
'when role is
Software Engineer in Test
'
do
let
(
:role
)
{
'
Test Automation Engineer
'
}
let
(
:role
)
{
'
Software Engineer in Test
'
}
it
'#reviewer? returns false'
do
it
'#reviewer? returns false'
do
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_falsey
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_falsey
end
end
end
end
context
'when role is
Test Automation Engineer
, Manage'
do
context
'when role is
Software Engineer in Test
, Manage'
do
let
(
:role
)
{
'
Test Automation Engineer
, Manage'
}
let
(
:role
)
{
'
Software Engineer in Test
, Manage'
}
it
'#reviewer? returns false'
do
it
'#reviewer? returns false'
do
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_falsey
expect
(
subject
.
reviewer?
(
project
,
:test
,
labels
)).
to
be_falsey
...
...
spec/presenters/release_presenter_spec.rb
View file @
69a23cbe
...
@@ -90,14 +90,6 @@ describe ReleasePresenter do
...
@@ -90,14 +90,6 @@ describe ReleasePresenter do
is_expected
.
to
match
/
#{
edit_project_release_url
(
project
,
release
)
}
/
is_expected
.
to
match
/
#{
edit_project_release_url
(
project
,
release
)
}
/
end
end
context
'when release_edit_page feature flag is disabled'
do
before
do
stub_feature_flags
(
release_edit_page:
false
)
end
it
{
is_expected
.
to
be_nil
}
end
context
'when a user is not allowed to update a release'
do
context
'when a user is not allowed to update a release'
do
let
(
:presenter
)
{
described_class
.
new
(
release
,
current_user:
guest
)
}
let
(
:presenter
)
{
described_class
.
new
(
release
,
current_user:
guest
)
}
...
...
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