summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG7
-rw-r--r--CONTRIBUTING.md6
-rw-r--r--app/assets/javascripts/stat_graph_contributors_util.js.coffee20
-rw-r--r--app/finders/issuable_finder.rb4
-rw-r--r--app/helpers/application_helper.rb7
-rw-r--r--app/mailers/emails/projects.rb3
-rw-r--r--app/models/merge_request.rb2
-rw-r--r--app/views/dashboard/issues.html.haml2
-rw-r--r--app/views/dashboard/merge_requests.html.haml2
-rw-r--r--app/views/groups/issues.html.haml2
-rw-r--r--app/views/groups/merge_requests.html.haml2
-rw-r--r--app/views/layouts/nav/_group.html.haml2
-rw-r--r--app/views/layouts/nav/_project_settings.html.haml2
-rw-r--r--app/views/projects/issues/index.html.haml2
-rw-r--r--app/views/projects/merge_requests/_merge_request.html.haml6
-rw-r--r--app/views/projects/merge_requests/index.html.haml2
-rw-r--r--app/views/projects/merge_requests/show/_mr_title.html.haml4
-rw-r--r--app/views/projects/merge_requests/show/_state_widget.html.haml4
-rw-r--r--app/views/projects/milestones/show.html.haml4
-rw-r--r--app/views/search/results/_merge_request.html.haml4
-rw-r--r--app/views/shared/_issuable_filter.html.haml25
-rw-r--r--features/project/merge_requests.feature4
-rw-r--r--features/steps/project/merge_requests.rb8
-rw-r--r--spec/javascripts/stat_graph_contributors_util_spec.js8
24 files changed, 83 insertions, 49 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 340c8d7ae0d..a62296e0656 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -17,6 +17,11 @@ v 7.12.0 (unreleased)
- Add validation to wiki page creation (only [a-zA-Z0-9/_-] are allowed) (Jeroen van Baarsen)
- Fix new/empty milestones showing 100% completion value (Jonah Bishop)
- Add a note when an Issue or Merge Request's title changes
+ - Consistently refer to MRs as either Accepted or Rejected.
+ - Add Accepted and Rejected tabs to MR lists.
+ - Prefix EmailsOnPush email subject with `[Git]`.
+ - Group project contributions by both name and email.
+ - Clarify navigation labels for Project Settings and Group Settings.
v 7.11.2
- no changes
@@ -1460,4 +1465,4 @@ v 0.8.0
- stability
- security fixes
- increased test coverage
- - email notification \ No newline at end of file
+ - email notification
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8059b95609a..38fa66816a7 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,11 +29,9 @@ You can also sign up on [CodeTriage](http://www.codetriage.com/gitlabhq/gitlabhq
## Issue tracker
-To get support for your particular problem please use the channels as detailed in the [getting help section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#getting-help). Professional [support subscriptions](http://about.gitlab.com/subscription/) and [consulting services](http://about.gitlab.com/consultancy/) are available from [GitLab.com](http://about.gitlab.com/).
+To get support for your particular problem please use the [getting help channels](https://about.gitlab.com/getting-help/).
-The [issue tracker](https://gitlab.com/gitlab-org/gitlab-ce/issues) is only for obvious errors in the latest [stable or development release of GitLab](MAINTENANCE.md). If something is wrong but it is not a regression compared to older versions of GitLab please do not open an issue but a feature request. When submitting an issue please conform to the issue submission guidelines listed below. Not all issues will be addressed and your issue is more likely to be addressed if you submit a merge request which partially or fully addresses the issue.
-
-Issues can be filed either at [gitlab.com](https://gitlab.com/gitlab-org/gitlab-ce/issues) or [github.com](https://github.com/gitlabhq/gitlabhq/issues).
+The [GitLab CE issue tracker on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/issues) is only for obvious errors in the latest [stable or development release of GitLab](MAINTENANCE.md). If something is wrong but it is not a regression compared to older versions of GitLab please do not open an issue but a feature request. When submitting an issue please conform to the issue submission guidelines listed below. Not all issues will be addressed and your issue is more likely to be addressed if you submit a merge request which partially or fully addresses the issue.
Do not use the issue tracker for feature requests. We have a specific [feature request forum](http://feedback.gitlab.com) for this purpose. Please keep feature requests as small and simple as possible, complex ones might be edited to make them small and simple.
diff --git a/app/assets/javascripts/stat_graph_contributors_util.js.coffee b/app/assets/javascripts/stat_graph_contributors_util.js.coffee
index 1670f5c7bc1..cfe5508290f 100644
--- a/app/assets/javascripts/stat_graph_contributors_util.js.coffee
+++ b/app/assets/javascripts/stat_graph_contributors_util.js.coffee
@@ -2,11 +2,15 @@ window.ContributorsStatGraphUtil =
parse_log: (log) ->
total = {}
by_author = {}
+ by_email = {}
for entry in log
@add_date(entry.date, total) unless total[entry.date]?
- @add_author(entry, by_author) unless by_author[entry.author_name]?
- @add_date(entry.date, by_author[entry.author_name]) unless by_author[entry.author_name][entry.date]
- @store_data(entry, total[entry.date], by_author[entry.author_name][entry.date])
+
+ data = by_author[entry.author_name] #|| by_email[entry.author_email]
+ data ?= @add_author(entry, by_author, by_email)
+
+ @add_date(entry.date, data) unless data[entry.date]
+ @store_data(entry, total[entry.date], data[entry.date])
total = _.toArray(total)
by_author = _.toArray(by_author)
total: total, by_author: by_author
@@ -15,10 +19,12 @@ window.ContributorsStatGraphUtil =
collection[date] = {}
collection[date].date = date
- add_author: (author, by_author) ->
- by_author[author.author_name] = {}
- by_author[author.author_name].author_name = author.author_name
- by_author[author.author_name].author_email = author.author_email
+ add_author: (author, by_author, by_email) ->
+ data = {}
+ data.author_name = author.author_name
+ data.author_email = author.author_email
+ by_author[author.author_name] = data
+ by_email[author.author_email] = data
store_data: (entry, total, by_author) ->
@store_commits(total, by_author)
diff --git a/app/finders/issuable_finder.rb b/app/finders/issuable_finder.rb
index b8f367c6339..e658e141159 100644
--- a/app/finders/issuable_finder.rb
+++ b/app/finders/issuable_finder.rb
@@ -75,6 +75,10 @@ class IssuableFinder
case params[:state]
when 'closed'
items.closed
+ when 'rejected'
+ items.respond_to?(:rejected) ? items.rejected : items.closed
+ when 'merged'
+ items.respond_to?(:merged) ? items.merged : items.closed
when 'all'
items
when 'opened'
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index bcd400b7e7b..89dcdf57798 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -330,7 +330,12 @@ module ApplicationHelper
end
def state_filters_text_for(entity, project)
- entity_title = entity.to_s.humanize
+ titles = {
+ opened: "Open",
+ merged: "Accepted"
+ }
+
+ entity_title = titles[entity] || entity.to_s.humanize
count =
if project.nil?
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb
index 9cb7077e59d..4a6e18e6a74 100644
--- a/app/mailers/emails/projects.rb
+++ b/app/mailers/emails/projects.rb
@@ -93,7 +93,8 @@ module Emails
"pushed to"
end
- @subject = "[#{@project.path_with_namespace}]"
+ @subject = "[Git]"
+ @subject << "[#{@project.path_with_namespace}]"
@subject << "[#{@ref_name}]" if action == :push
@subject << " "
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index c57016dd6a2..5690c375b96 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -134,7 +134,7 @@ class MergeRequest < ActiveRecord::Base
# Closed scope for merge request should return
# both merged and closed mr's
scope :closed, -> { with_states(:closed, :merged) }
- scope :declined, -> { with_states(:closed) }
+ scope :rejected, -> { with_states(:closed) }
def self.reference_prefix
'!'
diff --git a/app/views/dashboard/issues.html.haml b/app/views/dashboard/issues.html.haml
index dfdf0d68c8f..0dd2edbb1bc 100644
--- a/app/views/dashboard/issues.html.haml
+++ b/app/views/dashboard/issues.html.haml
@@ -17,5 +17,5 @@
= link_to issues_dashboard_url(format: :atom, private_token: current_user.private_token), class: 'btn' do
%i.fa.fa-rss
- = render 'shared/issuable_filter'
+ = render 'shared/issuable_filter', type: :issues
= render 'shared/issues'
diff --git a/app/views/dashboard/merge_requests.html.haml b/app/views/dashboard/merge_requests.html.haml
index a7e1b08a0a4..61d2fbe538c 100644
--- a/app/views/dashboard/merge_requests.html.haml
+++ b/app/views/dashboard/merge_requests.html.haml
@@ -7,5 +7,5 @@
List all merge requests from all projects you have access to.
%hr
.append-bottom-20
- = render 'shared/issuable_filter'
+ = render 'shared/issuable_filter', type: :merge_requests
= render 'shared/merge_requests'
diff --git a/app/views/groups/issues.html.haml b/app/views/groups/issues.html.haml
index 6a3da6adacf..e0756e909be 100644
--- a/app/views/groups/issues.html.haml
+++ b/app/views/groups/issues.html.haml
@@ -21,5 +21,5 @@
= link_to issues_group_url(@group, format: :atom, private_token: current_user.private_token), class: 'btn' do
%i.fa.fa-rss
- = render 'shared/issuable_filter'
+ = render 'shared/issuable_filter', type: :issues
= render 'shared/issues'
diff --git a/app/views/groups/merge_requests.html.haml b/app/views/groups/merge_requests.html.haml
index 268f33d5761..3d9e857cc52 100644
--- a/app/views/groups/merge_requests.html.haml
+++ b/app/views/groups/merge_requests.html.haml
@@ -10,5 +10,5 @@
To see all merge requests you should visit #{link_to 'dashboard', merge_requests_dashboard_path} page.
%hr
.append-bottom-20
- = render 'shared/issuable_filter'
+ = render 'shared/issuable_filter', type: :merge_requests
= render 'shared/merge_requests'
diff --git a/app/views/layouts/nav/_group.html.haml b/app/views/layouts/nav/_group.html.haml
index 62f0579d48b..9f1654b25b4 100644
--- a/app/views/layouts/nav/_group.html.haml
+++ b/app/views/layouts/nav/_group.html.haml
@@ -44,7 +44,7 @@
= link_to edit_group_path(@group), title: 'Group', data: {placement: 'right'} do
= icon('pencil-square-o')
%span
- Group
+ Group Settings
= nav_link(path: 'groups#projects') do
= link_to projects_group_path(@group), title: 'Projects', data: {placement: 'right'} do
= icon('folder')
diff --git a/app/views/layouts/nav/_project_settings.html.haml b/app/views/layouts/nav/_project_settings.html.haml
index 21260302a09..7dd14449def 100644
--- a/app/views/layouts/nav/_project_settings.html.haml
+++ b/app/views/layouts/nav/_project_settings.html.haml
@@ -12,7 +12,7 @@
= link_to edit_project_path(@project), title: 'Project', class: 'stat-tab tab', data: {placement: 'right'} do
= icon('pencil-square-o')
%span
- Project
+ Project Settings
= nav_link(controller: [:project_members, :teams]) do
= link_to namespace_project_project_members_path(@project.namespace, @project), title: 'Members', class: 'team-tab tab', data: {placement: 'right'} do
= icon('users')
diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml
index 709ea1f7897..a378b37f4a8 100644
--- a/app/views/projects/issues/index.html.haml
+++ b/app/views/projects/issues/index.html.haml
@@ -18,7 +18,7 @@
%i.fa.fa-plus
New Issue
- = render 'shared/issuable_filter'
+ = render 'shared/issuable_filter', type: :issues
.issues-holder
= render "issues"
diff --git a/app/views/projects/merge_requests/_merge_request.html.haml b/app/views/projects/merge_requests/_merge_request.html.haml
index 073476b0d27..65f5c3d6a19 100644
--- a/app/views/projects/merge_requests/_merge_request.html.haml
+++ b/app/views/projects/merge_requests/_merge_request.html.haml
@@ -9,11 +9,11 @@
- if merge_request.merged?
%span
%i.fa.fa-check
- MERGED
+ ACCEPTED
- elsif merge_request.closed?
%span
- %i.fa.fa-close
- CLOSED
+ %i.fa.fa-ban
+ REJECTED
- else
%span.hidden-xs.hidden-sm
%span.label-branch<
diff --git a/app/views/projects/merge_requests/index.html.haml b/app/views/projects/merge_requests/index.html.haml
index ab845a7e719..841d1e1cfe9 100644
--- a/app/views/projects/merge_requests/index.html.haml
+++ b/app/views/projects/merge_requests/index.html.haml
@@ -7,6 +7,6 @@
= link_to new_namespace_project_merge_request_path(@project.namespace, @project), class: "btn btn-new pull-left", title: "New Merge Request" do
%i.fa.fa-plus
New Merge Request
- = render 'shared/issuable_filter'
+ = render 'shared/issuable_filter', type: :merge_requests
.merge-requests-holder
= render 'merge_requests'
diff --git a/app/views/projects/merge_requests/show/_mr_title.html.haml b/app/views/projects/merge_requests/show/_mr_title.html.haml
index 46e92a9c558..0690fdb769f 100644
--- a/app/views/projects/merge_requests/show/_mr_title.html.haml
+++ b/app/views/projects/merge_requests/show/_mr_title.html.haml
@@ -1,9 +1,9 @@
%h4.page-title
.issue-box{ class: issue_box_class(@merge_request) }
- if @merge_request.merged?
- Merged
+ Accepted
- elsif @merge_request.closed?
- Closed
+ Rejected
- else
Open
= "Merge Request ##{@merge_request.iid}"
diff --git a/app/views/projects/merge_requests/show/_state_widget.html.haml b/app/views/projects/merge_requests/show/_state_widget.html.haml
index 44bd9347f51..e4c71bfc1be 100644
--- a/app/views/projects/merge_requests/show/_state_widget.html.haml
+++ b/app/views/projects/merge_requests/show/_state_widget.html.haml
@@ -11,7 +11,7 @@
- if @merge_request.closed?
%h4
- Closed
+ Rejected
- if @merge_request.closed_event
by #{link_to_member(@project, @merge_request.closed_event.author, avatar: false)}
#{time_ago_with_tooltip(@merge_request.closed_event.created_at)}
@@ -19,7 +19,7 @@
- if @merge_request.merged?
%h4
- Merged
+ Accepted
- if @merge_request.merge_event
by #{link_to_member(@project, @merge_request.merge_event.author, avatar: false)}
#{time_ago_with_tooltip(@merge_request.merge_event.created_at)}
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 5845fd744f4..ee2139e75f6 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -86,10 +86,10 @@
.col-md-3
= render('merge_requests', title: 'Waiting for merge (open and assigned)', merge_requests: @merge_requests.opened.assigned, id: 'ongoing')
.col-md-3
- = render('merge_requests', title: 'Declined (closed)', merge_requests: @merge_requests.declined, id: 'closed')
+ = render('merge_requests', title: 'Rejected (closed)', merge_requests: @merge_requests.rejected, id: 'closed')
.col-md-3
.panel.panel-primary
- .panel-heading Merged
+ .panel-heading Accepted
%ul.well-list
- @merge_requests.merged.each do |merge_request|
= render 'merge_request', merge_request: merge_request
diff --git a/app/views/search/results/_merge_request.html.haml b/app/views/search/results/_merge_request.html.haml
index 2efa616d664..adfdd1c7506 100644
--- a/app/views/search/results/_merge_request.html.haml
+++ b/app/views/search/results/_merge_request.html.haml
@@ -11,6 +11,6 @@
#{merge_request.project.name_with_namespace}
.pull-right
- if merge_request.merged?
- %span.label.label-primary Merged
+ %span.label.label-primary Accepted
- elsif merge_request.closed?
- %span.label.label-danger Closed
+ %span.label.label-danger Rejected
diff --git a/app/views/shared/_issuable_filter.html.haml b/app/views/shared/_issuable_filter.html.haml
index 4ab9421f013..a5187fa4ea7 100644
--- a/app/views/shared/_issuable_filter.html.haml
+++ b/app/views/shared/_issuable_filter.html.haml
@@ -3,15 +3,28 @@
%ul.nav.nav-tabs
%li{class: ("active" if params[:state] == 'opened')}
= link_to page_filter_path(state: 'opened') do
- %i.fa.fa-exclamation-circle
+ = icon('exclamation-circle')
#{state_filters_text_for(:opened, @project)}
- %li{class: ("active" if params[:state] == 'closed')}
- = link_to page_filter_path(state: 'closed') do
- %i.fa.fa-check-circle
- #{state_filters_text_for(:closed, @project)}
+
+ - if defined?(type) && type == :merge_requests
+ %li{class: ("active" if params[:state] == 'merged')}
+ = link_to page_filter_path(state: 'merged') do
+ = icon('check-circle')
+ #{state_filters_text_for(:merged, @project)}
+
+ %li{class: ("active" if params[:state] == 'rejected')}
+ = link_to page_filter_path(state: 'rejected') do
+ = icon('ban')
+ #{state_filters_text_for(:rejected, @project)}
+ - else
+ %li{class: ("active" if params[:state] == 'closed')}
+ = link_to page_filter_path(state: 'closed') do
+ = icon('check-circle')
+ #{state_filters_text_for(:closed, @project)}
+
%li{class: ("active" if params[:state] == 'all')}
= link_to page_filter_path(state: 'all') do
- %i.fa.fa-compass
+ = icon('compass')
#{state_filters_text_for(:all, @project)}
.issues-details-filters
diff --git a/features/project/merge_requests.feature b/features/project/merge_requests.feature
index 60caf783fe4..7a831901607 100644
--- a/features/project/merge_requests.feature
+++ b/features/project/merge_requests.feature
@@ -10,8 +10,8 @@ Feature: Project Merge Requests
Then I should see "Bug NS-04" in merge requests
And I should not see "Feature NS-03" in merge requests
- Scenario: I should see closed merge requests
- Given I click link "Closed"
+ Scenario: I should see rejected merge requests
+ Given I click link "Rejected"
Then I should see "Feature NS-03" in merge requests
And I should not see "Bug NS-04" in merge requests
diff --git a/features/steps/project/merge_requests.rb b/features/steps/project/merge_requests.rb
index f67e6e3d8ca..92de94a75d3 100644
--- a/features/steps/project/merge_requests.rb
+++ b/features/steps/project/merge_requests.rb
@@ -19,8 +19,8 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
click_link "All"
end
- step 'I click link "Closed"' do
- click_link "Closed"
+ step 'I click link "Rejected"' do
+ click_link "Rejected"
end
step 'I should see merge request "Wiki Feature"' do
@@ -32,7 +32,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see closed merge request "Bug NS-04"' do
merge_request = MergeRequest.find_by!(title: "Bug NS-04")
merge_request.closed?.should be_true
- page.should have_content "Closed by"
+ page.should have_content "Rejected by"
end
step 'I should see merge request "Bug NS-04"' do
@@ -202,7 +202,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step 'I should see merged request' do
within '.issue-box' do
- page.should have_content "Merged"
+ page.should have_content "Accepted"
end
end
diff --git a/spec/javascripts/stat_graph_contributors_util_spec.js b/spec/javascripts/stat_graph_contributors_util_spec.js
index ee90892eb48..dbafe782b77 100644
--- a/spec/javascripts/stat_graph_contributors_util_spec.js
+++ b/spec/javascripts/stat_graph_contributors_util_spec.js
@@ -118,9 +118,11 @@ describe("ContributorsStatGraphUtil", function () {
describe("#add_author", function () {
it("adds an author field to the collection", function () {
var fake_author = { author_name: "Author", author_email: 'fake@email.com' }
- var fake_collection = {}
- ContributorsStatGraphUtil.add_author(fake_author, fake_collection)
- expect(fake_collection[fake_author.author_name].author_name).toEqual("Author")
+ var fake_author_collection = {}
+ var fake_email_collection = {}
+ ContributorsStatGraphUtil.add_author(fake_author, fake_author_collection, fake_email_collection)
+ expect(fake_author_collection[fake_author.author_name].author_name).toEqual("Author")
+ expect(fake_email_collection[fake_author.author_email].author_name).toEqual("Author")
})
})