Skip to content

Commit

Permalink
Change all references of master branch to main (#116654)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianseeders authored Oct 29, 2021
1 parent 6693ef3 commit ba367bc
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .backportrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"upstream": "elastic/kibana",
"targetBranchChoices": [
{ "name": "master", "checked": true },
{ "name": "main", "checked": true },
"8.0",
"7.16",
"7.15",
Expand Down Expand Up @@ -33,7 +33,7 @@
],
"targetPRLabels": ["backport"],
"branchLabelMapping": {
"^v8.1.0$": "master",
"^v8.1.0$": "main",
"^v(\\d+).(\\d+).\\d+$": "$1.$2"
},
"autoMerge": true,
Expand Down
2 changes: 1 addition & 1 deletion .ci/packer_cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ if [[ "$(which docker)" != "" && "$(command uname -m)" != "aarch64" ]]; then
docker pull "maven:3.6.3-openjdk-8-slim"
fi

./.ci/packer_cache_for_branch.sh master
./.ci/packer_cache_for_branch.sh main
./.ci/packer_cache_for_branch.sh 7.16
4 changes: 2 additions & 2 deletions .ci/packer_cache_for_branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ checkoutDir="$(pwd)"

function cleanup()
{
if [[ "$branch" != "master" ]]; then
if [[ "$branch" != "main" ]]; then
rm --preserve-root -rf "$checkoutDir"
fi

Expand All @@ -16,7 +16,7 @@ function cleanup()

trap 'cleanup' 0

if [[ "$branch" != "master" ]]; then
if [[ "$branch" != "main" ]]; then
checkoutDir="/tmp/kibana-$branch"
git clone https://github.com/elastic/kibana.git --branch "$branch" --depth 1 "$checkoutDir"
cd "$checkoutDir"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request_target:
branches:
- master
- main
types:
- labeled
- closed
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fix-version-gaps.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
pull_request:
branches:
- master
- main
types:
- closed

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
],
"private": true,
"version": "8.1.0",
"branch": "master",
"branch": "main",
"types": "./kibana.d.ts",
"tsdocMetadata": "./build/tsdoc-metadata.json",
"build": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ export function runFailedTestsReporterCli() {
branch = jobNameSplit.length >= 3 ? jobNameSplit[2] : process.env.GIT_BRANCH || '';
isPr = !!process.env.ghprbPullId;

const isMasterOrVersion = branch === 'master' || branch.match(/^\d+\.(x|\d+)$/);
if (!isMasterOrVersion || isPr) {
log.info('Failure issues only created on master/version branch jobs');
const isMainOrVersion = branch === 'main' || branch.match(/^\d+\.(x|\d+)$/);
if (!isMainOrVersion || isPr) {
log.info('Failure issues only created on main/version branch jobs');
updateGithub = false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
'npm',
],
baseBranches: [
'master',
'main',
'7.16',
'7.15',
],
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/fleet/server/services/epm/registry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ function setKibanaVersion(url: URL) {
const kibanaVersion = appContextService.getKibanaVersion().split('-')[0]; // may be x.y.z-SNAPSHOT
const kibanaBranch = appContextService.getKibanaBranch();

// on master, request all packages regardless of version
if (kibanaVersion && kibanaBranch !== 'master') {
// on main, request all packages regardless of version
if (kibanaVersion && kibanaBranch !== 'main') {
url.searchParams.set('kibana.version', kibanaVersion);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const SNAPSHOT_REGISTRY_URL_CDN = 'https://epr-snapshot.elastic.co';

const getDefaultRegistryUrl = (): string => {
const branch = appContextService.getKibanaBranch();
if (branch === 'master') {
if (branch === 'main') {
return SNAPSHOT_REGISTRY_URL_CDN;
} else if (appContextService.getKibanaVersion().includes('-SNAPSHOT')) {
return STAGING_REGISTRY_URL_CDN;
Expand Down

0 comments on commit ba367bc

Please sign in to comment.