Commit 08ec838e authored by Alfredo Sumaran's avatar Alfredo Sumaran

Merge branch 'master' into avatar-cropping

parents b2dcfc4d f150b8a5
...@@ -20,6 +20,10 @@ v 8.5.1 ...@@ -20,6 +20,10 @@ v 8.5.1
- Changed padding & background color for highlighted notes - Changed padding & background color for highlighted notes
- Re-add the newrelic_rpm gem which was removed without any deprecation or warning (Stan Hu) - Re-add the newrelic_rpm gem which was removed without any deprecation or warning (Stan Hu)
- Update sentry-raven gem to 0.15.6 - Update sentry-raven gem to 0.15.6
- Add build coverage in project's builds page (Steffen Köhler)
v 8.5.2
- Fix error 500 when commenting on a commit
v 8.5.0 v 8.5.0
- Fix duplicate "me" in tooltip of the "thumbsup" awards Emoji (Stan Hu) - Fix duplicate "me" in tooltip of the "thumbsup" awards Emoji (Stan Hu)
...@@ -100,6 +104,9 @@ v 8.5.0 ...@@ -100,6 +104,9 @@ v 8.5.0
- Show label row when filtering issues or merge requests by label (Nuttanart Pornprasitsakul) - Show label row when filtering issues or merge requests by label (Nuttanart Pornprasitsakul)
- Add Todos - Add Todos
v 8.4.5
- No CE-specific changes
v 8.4.4 v 8.4.4
- Update omniauth-saml gem to 1.4.2 - Update omniauth-saml gem to 1.4.2
- Prevent long-running backup tasks from timing out the database connection - Prevent long-running backup tasks from timing out the database connection
......
...@@ -962,8 +962,8 @@ DEPENDENCIES ...@@ -962,8 +962,8 @@ DEPENDENCIES
mysql2 (~> 0.3.16) mysql2 (~> 0.3.16)
nested_form (~> 0.3.2) nested_form (~> 0.3.2)
net-ssh (~> 3.0.1) net-ssh (~> 3.0.1)
nokogiri (~> 1.6.7, >= 1.6.7.2)
newrelic_rpm (~> 3.14) newrelic_rpm (~> 3.14)
nokogiri (~> 1.6.7, >= 1.6.7.2)
nprogress-rails (~> 0.1.6.7) nprogress-rails (~> 0.1.6.7)
oauth2 (~> 1.0.0) oauth2 (~> 1.0.0)
octokit (~> 3.8.0) octokit (~> 3.8.0)
......
...@@ -16,7 +16,7 @@ class @Autosave ...@@ -16,7 +16,7 @@ class @Autosave
try try
text = window.localStorage.getItem @key text = window.localStorage.getItem @key
catch catch e
return return
@field.val text if text?.length > 0 @field.val text if text?.length > 0
......
...@@ -70,6 +70,7 @@ class @MergeRequestTabs ...@@ -70,6 +70,7 @@ class @MergeRequestTabs
@loadCommits($target.attr('href')) @loadCommits($target.attr('href'))
else if action == 'diffs' else if action == 'diffs'
@loadDiff($target.attr('href')) @loadDiff($target.attr('href'))
@shrinkView()
else if action == 'builds' else if action == 'builds'
@loadBuilds($target.attr('href')) @loadBuilds($target.attr('href'))
...@@ -185,3 +186,14 @@ class @MergeRequestTabs ...@@ -185,3 +186,14 @@ class @MergeRequestTabs
expandViewContainer: -> expandViewContainer: ->
$('.container-fluid').removeClass('container-limited') $('.container-fluid').removeClass('container-limited')
shrinkView: ->
$gutterIcon = $('.gutter-toggle i')
# Wait until listeners are set
setTimeout( ->
# Only when sidebar is collapsed
if $gutterIcon.is('.fa-angle-double-right')
$gutterIcon.closest('a').trigger('click')
, 0)
...@@ -8,4 +8,10 @@ $(document).on("click", '.toggle-nav-collapse', (e) -> ...@@ -8,4 +8,10 @@ $(document).on("click", '.toggle-nav-collapse', (e) ->
$('.sidebar-wrapper').toggleClass("sidebar-collapsed sidebar-expanded") $('.sidebar-wrapper').toggleClass("sidebar-collapsed sidebar-expanded")
$('.toggle-nav-collapse i').toggleClass("fa-angle-right fa-angle-left") $('.toggle-nav-collapse i').toggleClass("fa-angle-right fa-angle-left")
$.cookie("collapsed_nav", $('.page-with-sidebar').hasClass(collapsed), { path: '/' }) $.cookie("collapsed_nav", $('.page-with-sidebar').hasClass(collapsed), { path: '/' })
setTimeout ( ->
niceScrollBars = $('.nicescroll').niceScroll();
niceScrollBars.updateScrollBar();
), 300
) )
...@@ -142,8 +142,12 @@ header { ...@@ -142,8 +142,12 @@ header {
} }
@media (max-width: $screen-md-max) { @media (max-width: $screen-md-max) {
.header-collapsed, .header-expanded { .header-collapsed {
@include collapsed-header; margin-left: $sidebar_collapsed_width;
}
.header-expanded {
margin-left: $sidebar_width;
} }
} }
......
...@@ -12,6 +12,10 @@ ...@@ -12,6 +12,10 @@
height: 100%; height: 100%;
transition-duration: .3s; transition-duration: .3s;
} }
&.right-sidebar-expanded {
padding-right: $gutter_width;
}
} }
.sidebar-wrapper { .sidebar-wrapper {
...@@ -45,19 +49,6 @@ ...@@ -45,19 +49,6 @@
overflow: hidden; overflow: hidden;
transition-duration: .3s; transition-duration: .3s;
.home {
z-index: 1;
position: absolute;
left: 0px;
}
#logo {
z-index: 2;
position: absolute;
width: 58px;
cursor: pointer;
}
a { a {
float: left; float: left;
height: $header-height; height: $header-height;
...@@ -83,7 +74,7 @@ ...@@ -83,7 +74,7 @@
width: 158px; width: 158px;
float: left; float: left;
margin: 0; margin: 0;
margin-left: 50px; margin-left: 14px;
font-size: 19px; font-size: 19px;
line-height: 41px; line-height: 41px;
font-weight: normal; font-weight: normal;
...@@ -194,6 +185,10 @@ ...@@ -194,6 +185,10 @@
@mixin expanded-sidebar { @mixin expanded-sidebar {
padding-left: $sidebar_width; padding-left: $sidebar_width;
&.right-sidebar-collapsed {
padding-right: $sidebar_collapsed_width;
}
.sidebar-wrapper { .sidebar-wrapper {
width: $sidebar_width; width: $sidebar_width;
...@@ -213,17 +208,13 @@ ...@@ -213,17 +208,13 @@
} }
} }
@mixin expanded-gutter {
padding-right: $gutter_width;
}
@mixin collapsed-gutter {
padding-right: $sidebar_collapsed_width;
}
@mixin collapsed-sidebar { @mixin collapsed-sidebar {
padding-left: $sidebar_collapsed_width; padding-left: $sidebar_collapsed_width;
&.right-sidebar-collapsed {
padding-right: $sidebar_collapsed_width;
}
.sidebar-wrapper { .sidebar-wrapper {
width: $sidebar_collapsed_width; width: $sidebar_collapsed_width;
...@@ -287,47 +278,10 @@ ...@@ -287,47 +278,10 @@
background: #f2f6f7; background: #f2f6f7;
} }
// page is small enough .page-sidebar-collapsed {
@media (max-width: $screen-md-max) {
.page-sidebar-collapsed {
@include collapsed-sidebar;
}
.page-sidebar-expanded {
@include collapsed-sidebar; @include collapsed-sidebar;
}
.page-gutter {
&.right-sidebar-collapsed {
@include collapsed-gutter;
}
&.right-sidebar-expanded {
@include expanded-gutter;
}
}
.collapse-nav {
display: none;
}
} }
// page is large enough .page-sidebar-expanded {
@media(min-width: $screen-md-max) {
.page-gutter {
&.right-sidebar-collapsed {
@include collapsed-gutter;
}
&.right-sidebar-expanded {
@include expanded-gutter;
}
}
.page-sidebar-collapsed {
@include collapsed-sidebar;
}
.page-sidebar-expanded {
@include expanded-sidebar; @include expanded-sidebar;
}
} }
...@@ -13,6 +13,5 @@ module Notes ...@@ -13,6 +13,5 @@ module Notes
note note
end end
end end
end end
...@@ -130,8 +130,8 @@ class TodoService ...@@ -130,8 +130,8 @@ class TodoService
end end
def handle_note(note, author) def handle_note(note, author)
# Skip system notes, like status changes and cross-references # Skip system notes, notes on commit, and notes on project snippet
return if note.system return if note.system? || ['Commit', 'Snippet'].include?(note.noteable_type)
project = note.project project = note.project
target = note.noteable target = note.noteable
......
...@@ -51,9 +51,11 @@ ...@@ -51,9 +51,11 @@
%th Name %th Name
%th Duration %th Duration
%th Finished at %th Finished at
- if @project.build_coverage_enabled?
%th Coverage
%th %th
- @builds.each do |build| - @builds.each do |build|
= render 'projects/commit_statuses/commit_status', commit_status: build, commit_sha: true, stage: true, allow_retry: true = render 'projects/commit_statuses/commit_status', commit_status: build, commit_sha: true, stage: true, coverage: @project.build_coverage_enabled?, allow_retry: true
= paginate @builds, theme: 'gitlab' = paginate @builds, theme: 'gitlab'
...@@ -42,7 +42,7 @@ Gitlab-shell communicates with Sidekiq via the “communication board” (Redis) ...@@ -42,7 +42,7 @@ Gitlab-shell communicates with Sidekiq via the “communication board” (Redis)
## System Layout ## System Layout
When referring to ~git in the pictures it means the home directory of the git user which is typically /home/git. When referring to `~git` in the pictures it means the home directory of the git user which is typically /home/git.
GitLab is primarily installed within the `/home/git` user home directory as `git` user. Within the home directory is where the gitlabhq server software resides as well as the repositories (though the repository location is configurable). GitLab is primarily installed within the `/home/git` user home directory as `git` user. Within the home directory is where the gitlabhq server software resides as well as the repositories (though the repository location is configurable).
......
...@@ -18,7 +18,7 @@ You accept and agree to the following terms and conditions for Your present and ...@@ -18,7 +18,7 @@ You accept and agree to the following terms and conditions for Your present and
6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. 6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
7. Should You wish to submit work that is not Your original creation, You may submit it to GitLab B.V. separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [[]named here]". 7. Should You wish to submit work that is not Your original creation, You may submit it to GitLab B.V. separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [insert_name_here]".
8. You agree to notify GitLab B.V. of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect. 8. You agree to notify GitLab B.V. of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.
......
...@@ -26,6 +26,7 @@ documentation](../workflow/add-user/add-user.md). ...@@ -26,6 +26,7 @@ documentation](../workflow/add-user/add-user.md).
| Create code snippets | | ✓ | ✓ | ✓ | ✓ | | Create code snippets | | ✓ | ✓ | ✓ | ✓ |
| Manage issue tracker | | ✓ | ✓ | ✓ | ✓ | | Manage issue tracker | | ✓ | ✓ | ✓ | ✓ |
| Manage labels | | ✓ | ✓ | ✓ | ✓ | | Manage labels | | ✓ | ✓ | ✓ | ✓ |
| See a commit status | | ✓ | ✓ | ✓ | ✓ |
| Manage merge requests | | | ✓ | ✓ | ✓ | | Manage merge requests | | | ✓ | ✓ | ✓ |
| Create new merge request | | | ✓ | ✓ | ✓ | | Create new merge request | | | ✓ | ✓ | ✓ |
| Create new branches | | | ✓ | ✓ | ✓ | | Create new branches | | | ✓ | ✓ | ✓ |
...@@ -35,6 +36,7 @@ documentation](../workflow/add-user/add-user.md). ...@@ -35,6 +36,7 @@ documentation](../workflow/add-user/add-user.md).
| Add tags | | | ✓ | ✓ | ✓ | | Add tags | | | ✓ | ✓ | ✓ |
| Write a wiki | | | ✓ | ✓ | ✓ | | Write a wiki | | | ✓ | ✓ | ✓ |
| Cancel and retry builds | | | ✓ | ✓ | ✓ | | Cancel and retry builds | | | ✓ | ✓ | ✓ |
| Create or update commit status | | | ✓ | ✓ | ✓ |
| Create new milestones | | | | ✓ | ✓ | | Create new milestones | | | | ✓ | ✓ |
| Add new team members | | | | ✓ | ✓ | | Add new team members | | | | ✓ | ✓ |
| Push to protected branches | | | | ✓ | ✓ | | Push to protected branches | | | | ✓ | ✓ |
......
...@@ -69,6 +69,7 @@ branches and tags. ...@@ -69,6 +69,7 @@ branches and tags.
```bash ```bash
git remote add origin git@gitlab.com:<group>/<project>.git git remote add origin git@gitlab.com:<group>/<project>.git
git push --all origin git push --all origin
git push --tags origin
``` ```
## Contribute to this guide ## Contribute to this guide
......
...@@ -3,6 +3,7 @@ Feature: Project Builds Summary ...@@ -3,6 +3,7 @@ Feature: Project Builds Summary
Given I sign in as a user Given I sign in as a user
And I own a project And I own a project
And project has CI enabled And project has CI enabled
And project has coverage enabled
And project has a recent build And project has a recent build
Scenario: I browse build details page Scenario: I browse build details page
...@@ -12,6 +13,7 @@ Feature: Project Builds Summary ...@@ -12,6 +13,7 @@ Feature: Project Builds Summary
Scenario: I browse project builds page Scenario: I browse project builds page
When I visit project builds page When I visit project builds page
Then I see coverage
Then I see button to CI Lint Then I see button to CI Lint
Scenario: I erase a build Scenario: I erase a build
......
...@@ -4,6 +4,12 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps ...@@ -4,6 +4,12 @@ class Spinach::Features::ProjectBuildsSummary < Spinach::FeatureSteps
include SharedBuilds include SharedBuilds
include RepoHelpers include RepoHelpers
step 'I see coverage' do
page.within('td.coverage') do
expect(page).to have_content "99.9%"
end
end
step 'I see button to CI Lint' do step 'I see button to CI Lint' do
page.within('.nav-controls') do page.within('.nav-controls') do
ci_lint_tool_link = page.find_link('CI Lint') ci_lint_tool_link = page.find_link('CI Lint')
......
...@@ -5,9 +5,13 @@ module SharedBuilds ...@@ -5,9 +5,13 @@ module SharedBuilds
@project.enable_ci @project.enable_ci
end end
step 'project has coverage enabled' do
@project.update_attribute(:build_coverage_regex, /Coverage (\d+)%/)
end
step 'project has a recent build' do step 'project has a recent build' do
@ci_commit = create(:ci_commit, project: @project, sha: @project.commit.sha) @ci_commit = create(:ci_commit, project: @project, sha: @project.commit.sha)
@build = create(:ci_build, commit: @ci_commit) @build = create(:ci_build_with_coverage, commit: @ci_commit)
end end
step 'recent build is successful' do step 'recent build is successful' do
......
...@@ -6,7 +6,7 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 15 ...@@ -6,7 +6,7 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 15
Capybara.javascript_driver = :poltergeist Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app| Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, js_errors: true, timeout: timeout) Capybara::Poltergeist::Driver.new(app, js_errors: true, timeout: timeout, window_size: [1366, 768])
end end
Capybara.default_wait_time = timeout Capybara.default_wait_time = timeout
......
...@@ -53,6 +53,10 @@ FactoryGirl.define do ...@@ -53,6 +53,10 @@ FactoryGirl.define do
tag true tag true
end end
factory :ci_build_with_coverage do
coverage 99.9
end
trait :trace do trait :trace do
after(:create) do |build, evaluator| after(:create) do |build, evaluator|
build.trace = 'BUILD TRACE' build.trace = 'BUILD TRACE'
......
...@@ -110,6 +110,8 @@ describe TodoService, services: true do ...@@ -110,6 +110,8 @@ describe TodoService, services: true do
let!(:first_todo) { create(:todo, :assigned, user: john_doe, project: project, target: issue, author: author) } let!(:first_todo) { create(:todo, :assigned, user: john_doe, project: project, target: issue, author: author) }
let!(:second_todo) { create(:todo, :assigned, user: john_doe, project: project, target: issue, author: author) } let!(:second_todo) { create(:todo, :assigned, user: john_doe, project: project, target: issue, author: author) }
let(:note) { create(:note, project: project, noteable: issue, author: john_doe, note: mentions) } let(:note) { create(:note, project: project, noteable: issue, author: john_doe, note: mentions) }
let(:note_on_commit) { create(:note_on_commit, project: project, author: john_doe, note: mentions) }
let(:note_on_project_snippet) { create(:note_on_project_snippet, project: project, author: john_doe, note: mentions) }
let(:award_note) { create(:note, :award, project: project, noteable: issue, author: john_doe, note: 'thumbsup') } let(:award_note) { create(:note, :award, project: project, noteable: issue, author: john_doe, note: 'thumbsup') }
let(:system_note) { create(:system_note, project: project, noteable: issue) } let(:system_note) { create(:system_note, project: project, noteable: issue) }
...@@ -145,6 +147,14 @@ describe TodoService, services: true do ...@@ -145,6 +147,14 @@ describe TodoService, services: true do
should_not_create_todo(user: john_doe, target: issue, author: john_doe, action: Todo::MENTIONED, note: note) should_not_create_todo(user: john_doe, target: issue, author: john_doe, action: Todo::MENTIONED, note: note)
should_not_create_todo(user: stranger, target: issue, author: john_doe, action: Todo::MENTIONED, note: note) should_not_create_todo(user: stranger, target: issue, author: john_doe, action: Todo::MENTIONED, note: note)
end end
it 'does not create todo when leaving a note on commit' do
should_not_create_any_todo { service.new_note(note_on_commit, john_doe) }
end
it 'does not create todo when leaving a note on snippet' do
should_not_create_any_todo { service.new_note(note_on_project_snippet, john_doe) }
end
end end
end end
......
...@@ -7,7 +7,7 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 10 ...@@ -7,7 +7,7 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 10
Capybara.javascript_driver = :poltergeist Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app| Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, js_errors: true, timeout: timeout) Capybara::Poltergeist::Driver.new(app, js_errors: true, timeout: timeout, window_size: [1366, 768])
end end
Capybara.default_wait_time = timeout Capybara.default_wait_time = timeout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment