Commit 5b780957 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Merge branch '327686-update-pipeline-specs' into 'master'

Update default branch name in pipelines editor and job specs

See merge request gitlab-org/gitlab!59993
parents 3f5c4cec afedb9b6
......@@ -18,7 +18,6 @@ export const resolvers = {
repository: {
__typename: 'Repository',
branches: [
{ __typename: 'Branch', name: 'master' },
{ __typename: 'Branch', name: 'main' },
{ __typename: 'Branch', name: 'develop' },
{ __typename: 'Branch', name: 'production' },
......
......@@ -1237,8 +1237,8 @@ export const mockPipelineWithAttachedMR = {
title: 'Update README.md',
source_branch: 'feature-1234',
source_branch_path: '/root/detached-merge-request-pipelines/branches/feature-1234',
target_branch: 'master',
target_branch_path: '/root/detached-merge-request-pipelines/branches/master',
target_branch: 'main',
target_branch_path: '/root/detached-merge-request-pipelines/branches/main',
},
ref: {
name: 'test-branch',
......@@ -1269,8 +1269,8 @@ export const mockPipelineDetached = {
title: 'Update README.md',
source_branch: 'feature-1234',
source_branch_path: '/root/detached-merge-request-pipelines/branches/feature-1234',
target_branch: 'master',
target_branch_path: '/root/detached-merge-request-pipelines/branches/master',
target_branch: 'main',
target_branch_path: '/root/detached-merge-request-pipelines/branches/main',
},
ref: {
name: 'test-branch',
......@@ -1296,8 +1296,8 @@ export const mockJobsInTable = [
__typename: 'DetailedStatus',
},
id: 'gid://gitlab/Ci::Build/2004',
refName: 'master',
refPath: '/root/ci-project/-/commits/master',
refName: 'main',
refPath: '/root/ci-project/-/commits/main',
tags: [],
shortSha: '2d5d8323',
commitPath: '/root/ci-project/-/commit/2d5d83230bdea0e003d83ef4c16d2bf9a8808ebe',
......@@ -1334,8 +1334,8 @@ export const mockJobsInTable = [
__typename: 'DetailedStatus',
},
id: 'gid://gitlab/Ci::Build/2021',
refName: 'master',
refPath: '/root/ci-project/-/commits/master',
refName: 'main',
refPath: '/root/ci-project/-/commits/main',
tags: [],
shortSha: '2d5d8323',
commitPath: '/root/ci-project/-/commit/2d5d83230bdea0e003d83ef4c16d2bf9a8808ebe',
......@@ -1379,8 +1379,8 @@ export const mockJobsInTable = [
__typename: 'DetailedStatus',
},
id: 'gid://gitlab/Ci::Build/2015',
refName: 'master',
refPath: '/root/ci-project/-/commits/master',
refName: 'main',
refPath: '/root/ci-project/-/commits/main',
tags: [],
shortSha: '2d5d8323',
commitPath: '/root/ci-project/-/commit/2d5d83230bdea0e003d83ef4c16d2bf9a8808ebe',
......
......@@ -17,7 +17,7 @@ Object {
"environment": "prd",
"except": Object {
"refs": Array [
"master@gitlab-org/gitlab",
"main@gitlab-org/gitlab",
"/^release/.*$/@gitlab-org/gitlab",
],
},
......@@ -44,7 +44,7 @@ Object {
"environment": "stg",
"except": Object {
"refs": Array [
"master@gitlab-org/gitlab",
"main@gitlab-org/gitlab",
"/^release/.*$/@gitlab-org/gitlab",
],
},
......
......@@ -4,7 +4,7 @@ import { unwrapStagesWithNeeds } from '~/pipelines/components/unwrapping_utils';
export const mockProjectNamespace = 'user1';
export const mockProjectPath = 'project1';
export const mockProjectFullPath = `${mockProjectNamespace}/${mockProjectPath}`;
export const mockDefaultBranch = 'master';
export const mockDefaultBranch = 'main';
export const mockNewMergeRequestPath = '/-/merge_requests/new';
export const mockCommitSha = 'aabbccdd';
export const mockCommitNextSha = 'eeffgghh';
......@@ -143,7 +143,6 @@ export const mockProjectBranches = {
repository: {
__typename: 'Repository',
branches: [
{ __typename: 'Branch', name: 'master' },
{ __typename: 'Branch', name: 'main' },
{ __typename: 'Branch', name: 'develop' },
{ __typename: 'Branch', name: 'production' },
......@@ -186,7 +185,7 @@ export const mockLintResponse = {
when: 'on_success',
allow_failure: false,
only: null,
except: { refs: ['master@gitlab-org/gitlab', '/^release/.*$/@gitlab-org/gitlab'] },
except: { refs: ['main@gitlab-org/gitlab', '/^release/.*$/@gitlab-org/gitlab'] },
},
{
name: 'job_2',
......@@ -199,7 +198,7 @@ export const mockLintResponse = {
when: 'on_success',
allow_failure: true,
only: { refs: ['web', 'chat', 'pushes'] },
except: { refs: ['master@gitlab-org/gitlab', '/^release/.*$/@gitlab-org/gitlab'] },
except: { refs: ['main@gitlab-org/gitlab', '/^release/.*$/@gitlab-org/gitlab'] },
},
],
};
......@@ -242,7 +241,7 @@ export const mockJobs = [
when: 'on_success',
allowFailure: false,
only: { refs: ['branches@gitlab-org/gitlab'] },
except: { refs: ['master@gitlab-org/gitlab', '/^release/.*$/@gitlab-org/gitlab'] },
except: { refs: ['main@gitlab-org/gitlab', '/^release/.*$/@gitlab-org/gitlab'] },
},
];
......
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