Skip to content
Snippets Groups Projects
Commit 55aedc90 authored by Filipa Lacerda's avatar Filipa Lacerda
Browse files

Merge branch 'master' into 27783-fix-fe-doc-broken-link

* master:
  Fix admin_labels_spec.rb transient failure
  Make sure our current .gitlab-ci.yml is valid
  Show Pipeline(not Job) in MR desktop notification
  Remove a transient failure from spec/requests/api/groups_spec.rb
  Update PROCESS.md
  Update MergeRequest API state_event option documentation
  Rename issuable to IssueBase
parents 3a27ec45 4a925837
No related branches found
No related tags found
No related merge requests found
Showing
with 57 additions and 20 deletions
Loading
@@ -59,7 +59,7 @@ star, smile, etc.). Some good tips about code reviews can be found in our
Loading
@@ -59,7 +59,7 @@ star, smile, etc.). Some good tips about code reviews can be found in our
   
## Feature Freeze ## Feature Freeze
   
On the 7th of each month, RC1 of the upcoming release is created and deployed to GitLab.com and the stable branch for this release is frozen, which means master is no longer merged into it. After the 7th (Pacific Standard Time Zone) of each month, RC1 of the upcoming release is created and deployed to GitLab.com and the stable branch for this release is frozen, which means master is no longer merged into it.
Merge requests may still be merged into master during this period, Merge requests may still be merged into master during this period,
but they will go into the _next_ release, unless they are manually cherry-picked into the stable branch. but they will go into the _next_ release, unless they are manually cherry-picked into the stable branch.
By freezing the stable branches 2 weeks prior to a release, we reduce the risk of a last minute merge request potentially breaking things. By freezing the stable branches 2 weeks prior to a release, we reduce the risk of a last minute merge request potentially breaking things.
Loading
Loading
Loading
@@ -16,13 +16,13 @@
Loading
@@ -16,13 +16,13 @@
gitlab_icon: "#{asset_path 'gitlab_logo.png'}", gitlab_icon: "#{asset_path 'gitlab_logo.png'}",
ci_status: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.status : ''}", ci_status: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.status : ''}",
ci_message: { ci_message: {
normal: "Job {{status}} for \"{{title}}\"", normal: "Pipeline {{status}} for \"{{title}}\"",
preparing: "{{status}} job for \"{{title}}\"" preparing: "{{status}} job for \"{{title}}\""
}, },
ci_enable: #{@project.ci_service ? "true" : "false"}, ci_enable: #{@project.ci_service ? "true" : "false"},
ci_title: { ci_title: {
preparing: "{{status}} job", preparing: "{{status}} job",
normal: "Job {{status}}" normal: "Pipeline {{status}}"
}, },
ci_sha: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.short_sha : ''}", ci_sha: "#{@merge_request.head_pipeline ? @merge_request.head_pipeline.short_sha : ''}",
ci_pipeline: #{@merge_request.head_pipeline.try(:id).to_json}, ci_pipeline: #{@merge_request.head_pipeline.try(:id).to_json},
Loading
Loading
---
title: Show Pipeline(not Job) in MR desktop notification
merge_request:
author:
Loading
@@ -350,16 +350,17 @@ PUT /projects/:id/merge_requests/:merge_request_id
Loading
@@ -350,16 +350,17 @@ PUT /projects/:id/merge_requests/:merge_request_id
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | string | yes | The ID of a project | | `id` | string | yes | The ID of a project |
| `merge_request_id` | integer | yes | The ID of a merge request | | `merge_request_id` | integer | yes | The ID of a merge request |
| `source_branch` | string | yes | The source branch | | `target_branch` | string | no | The target branch |
| `target_branch` | string | yes | The target branch | | `title` | string | no | Title of MR |
| `title` | string | yes | Title of MR |
| `assignee_id` | integer | no | Assignee user ID | | `assignee_id` | integer | no | Assignee user ID |
| `description` | string | no | Description of MR | | `description` | string | no | Description of MR |
| `target_project_id` | integer | no | The target project (numeric id) | | `state_event` | string | no | New state (close/reopen) |
| `labels` | string | no | Labels for MR as a comma-separated list | | `labels` | string | no | Labels for MR as a comma-separated list |
| `milestone_id` | integer | no | The ID of a milestone | | `milestone_id` | integer | no | The ID of a milestone |
| `remove_source_branch` | boolean | no | Flag indicating if a merge request should remove the source branch when merging | | `remove_source_branch` | boolean | no | Flag indicating if a merge request should remove the source branch when merging |
   
Must include at least one non-required attribute from above.
```json ```json
{ {
"id": 1, "id": 1,
Loading
Loading
Loading
@@ -138,7 +138,7 @@ module API
Loading
@@ -138,7 +138,7 @@ module API
params do params do
optional :title, type: String, allow_blank: false, desc: 'The title of the merge request' optional :title, type: String, allow_blank: false, desc: 'The title of the merge request'
optional :target_branch, type: String, allow_blank: false, desc: 'The target branch' optional :target_branch, type: String, allow_blank: false, desc: 'The target branch'
optional :state_event, type: String, values: %w[close reopen merge], optional :state_event, type: String, values: %w[close reopen],
desc: 'Status of the merge request' desc: 'Status of the merge request'
use :optional_params use :optional_params
at_least_one_of :title, :target_branch, :description, :assignee_id, at_least_one_of :title, :target_branch, :description, :assignee_id,
Loading
Loading
module Gitlab module Gitlab
module ChatCommands module ChatCommands
module Presenters module Presenters
module Issuable module IssueBase
def color(issuable) def color(issuable)
issuable.open? ? '#38ae67' : '#d22852' issuable.open? ? '#38ae67' : '#d22852'
end end
Loading
Loading
Loading
@@ -2,7 +2,7 @@ module Gitlab
Loading
@@ -2,7 +2,7 @@ module Gitlab
module ChatCommands module ChatCommands
module Presenters module Presenters
class IssueNew < Presenters::Base class IssueNew < Presenters::Base
include Presenters::Issuable include Presenters::IssueBase
   
def present def present
in_channel_response(new_issue) in_channel_response(new_issue)
Loading
Loading
Loading
@@ -2,7 +2,7 @@ module Gitlab
Loading
@@ -2,7 +2,7 @@ module Gitlab
module ChatCommands module ChatCommands
module Presenters module Presenters
class IssueSearch < Presenters::Base class IssueSearch < Presenters::Base
include Presenters::Issuable include Presenters::IssueBase
   
def present def present
text = if @resource.count >= 5 text = if @resource.count >= 5
Loading
Loading
Loading
@@ -2,7 +2,7 @@ module Gitlab
Loading
@@ -2,7 +2,7 @@ module Gitlab
module ChatCommands module ChatCommands
module Presenters module Presenters
class IssueShow < Presenters::Base class IssueShow < Presenters::Base
include Presenters::Issuable include Presenters::IssueBase
   
def present def present
if @resource.confidential? if @resource.confidential?
Loading
Loading
Loading
@@ -35,15 +35,16 @@ RSpec.describe 'admin issues labels' do
Loading
@@ -35,15 +35,16 @@ RSpec.describe 'admin issues labels' do
it 'deletes all labels', js: true do it 'deletes all labels', js: true do
page.within '.labels' do page.within '.labels' do
page.all('.btn-remove').each do |remove| page.all('.btn-remove').each do |remove|
wait_for_ajax
remove.click remove.click
wait_for_ajax
end end
end end
   
page.within '.manage-labels-list' do wait_for_ajax
expect(page).not_to have_content('bug')
expect(page).not_to have_content('feature_label') expect(page).to have_content("There are no labels yet")
end expect(page).not_to have_content('bug')
expect(page).not_to have_content('feature_label')
end end
end end
   
Loading
Loading
Loading
@@ -4,6 +4,16 @@ module Ci
Loading
@@ -4,6 +4,16 @@ module Ci
describe GitlabCiYamlProcessor, lib: true do describe GitlabCiYamlProcessor, lib: true do
let(:path) { 'path' } let(:path) { 'path' }
   
describe 'our current .gitlab-ci.yml' do
let(:config) { File.read("#{Rails.root}/.gitlab-ci.yml") }
it 'is valid' do
error_message = described_class.validation_message(config)
expect(error_message).to be_nil
end
end
describe '#build_attributes' do describe '#build_attributes' do
describe 'coverage entry' do describe 'coverage entry' do
subject { described_class.new(config, path).build_attributes(:rspec) } subject { described_class.new(config, path).build_attributes(:rspec) }
Loading
Loading
Loading
@@ -35,7 +35,8 @@ describe API::Groups, api: true do
Loading
@@ -35,7 +35,8 @@ describe API::Groups, api: true do
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response.length).to eq(1) expect(json_response.length).to eq(1)
expect(json_response.first['name']).to eq(group1.name) expect(json_response)
.to satisfy_one { |group| group['name'] == group1.name }
end end
   
it "does not include statistics" do it "does not include statistics" do
Loading
@@ -70,7 +71,7 @@ describe API::Groups, api: true do
Loading
@@ -70,7 +71,7 @@ describe API::Groups, api: true do
repository_size: 123, repository_size: 123,
lfs_objects_size: 234, lfs_objects_size: 234,
build_artifacts_size: 345, build_artifacts_size: 345,
} }.stringify_keys
   
project1.statistics.update!(attributes) project1.statistics.update!(attributes)
   
Loading
@@ -78,7 +79,8 @@ describe API::Groups, api: true do
Loading
@@ -78,7 +79,8 @@ describe API::Groups, api: true do
   
expect(response).to have_http_status(200) expect(response).to have_http_status(200)
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response.first['statistics']).to eq attributes.stringify_keys expect(json_response)
.to satisfy_one { |group| group['statistics'] == attributes }
end end
end end
   
Loading
Loading
# These matchers are a syntactic hack to provide more readable expectations for
# an Enumerable object.
#
# They take advantage of the `all?`, `none?`, and `one?` methods, and the fact
# that RSpec provides a `be_something` matcher for all predicates.
#
# Example:
#
# # Ensure exactly one object in an Array satisfies a condition
# expect(users.one? { |u| u.admin? }).to eq true
#
# # The same thing, but using the `be_one` matcher
# expect(users).to be_one { |u| u.admin? }
#
# # The same thing again, but using `satisfy_one` for improved readability
# expect(users).to satisfy_one { |u| u.admin? }
RSpec::Matchers.alias_matcher :satisfy_all, :be_all
RSpec::Matchers.alias_matcher :satisfy_none, :be_none
RSpec::Matchers.alias_matcher :satisfy_one, :be_one
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment