Commit 91f66f38 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge remote-tracking branch 'ee/master' into ce-to-ee-2017-11-03

* ee/master:
  Fix for Linting Failure
  update changelog
  Fix rebase for forks
  Replaced Icon with Sprite Icon
  Applyed Patch for CI/CD Icons
parents 0221c27c 4e4a0869
import PipelineStage from '../../pipelines/components/stage.vue';
import ciIcon from '../../vue_shared/components/ci_icon.vue';
import icon from '../../vue_shared/components/icon.vue';
import { statusIconEntityMap } from '../../vue_shared/ci_status_icons';
import linkedPipelinesMiniList from '../../vue_shared/components/linked_pipelines_mini_list.vue';
export default {
......
<script>
import arrowSvg from 'icons/_arrow_mini_pipeline_graph.svg';
import { borderlessStatusIconEntityMap } from '../../vue_shared/ci_status_icons';
import icon from './icon.vue';
import ciStatus from './ci_icon.vue';
import tooltip from '../directives/tooltip';
......@@ -33,6 +33,7 @@
},
components: {
ciStatus,
icon,
},
computed: {
// Exactly one of these (triggeredBy and triggered) must be truthy. Never both. Never neither.
......@@ -67,8 +68,8 @@
pipelineTooltipText(pipeline) {
return `${pipeline.project.name} - ${pipeline.details.status.label}`;
},
getStatusIcon(icon) {
return borderlessStatusIconEntityMap[icon];
getStatusIcon(iconName) {
return `${iconName}_borderless`;
},
triggerButtonClass(group) {
return `ci-status-icon-${group}`;
......@@ -102,8 +103,9 @@
:title="pipelineTooltipText(pipeline)"
data-placement="top"
data-container="body"
:class="triggerButtonClass(pipeline.details.status.group)"
v-html="getStatusIcon(pipeline.details.status.icon)">
:class="triggerButtonClass(pipeline.details.status.group)">
<icon
:name="getStatusIcon(pipeline.details.status.icon)"/>
</a>
<a
......
......@@ -24,7 +24,7 @@ module MergeRequests
)
run_git_command(
%W(rebase #{merge_request.target_branch}),
%W(pull --rebase #{target_project.repository.path_to_repo} #{merge_request.target_branch}),
tree_path,
git_env.merge('GIT_COMMITTER_NAME' => current_user.name,
'GIT_COMMITTER_EMAIL' => current_user.email),
......
---
title: 'Fix: Failed to rebase MR from forked repo'
merge_request:
author:
type: fixed
require 'spec_helper'
describe MergeRequests::RebaseService do
include ProjectForksHelper
let(:user) { create(:user) }
let(:merge_request) do
create(:merge_request,
......@@ -104,6 +106,31 @@ describe MergeRequests::RebaseService do
service.execute(merge_request)
end
end
context 'fork' do
let(:forked_project) do
fork_project(project, user, repository: true)
end
let(:merge_request_from_fork) do
forked_project.repository.create_file(
user,
'new-file-to-target',
'',
message: 'Add new file to target',
branch_name: 'master')
create(:merge_request,
source_branch: 'master', source_project: forked_project,
target_branch: 'master', target_project: project)
end
it 'rebases source branch' do
parent_sha = forked_project.repository.commit(merge_request_from_fork.source_branch).parents.first.sha
target_branch_sha = project.repository.commit(merge_request_from_fork.target_branch).sha
expect(parent_sha).to eq(target_branch_sha)
end
end
end
end
end
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