Skip to content

Commit

Permalink
chore: Rename develop to main
Browse files Browse the repository at this point in the history
Rename references to the main branch. It will be called `main` rather
than `develop`.

Relates to MetaMask/MetaMask-planning#3677
  • Loading branch information
Gudahtt committed Nov 29, 2024
1 parent 7143c96 commit 205c755
Show file tree
Hide file tree
Showing 33 changed files with 120 additions and 120 deletions.
24 changes: 12 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ rc_branch_only: &rc_branch_only
only:
- /^Version-v(\d+)[.](\d+)[.](\d+)/

develop_master_rc_only: &develop_master_rc_only
main_master_rc_only: &main_master_rc_only
filters:
branches:
only:
- develop
- main
- master
- /^Version-v(\d+)[.](\d+)[.](\d+)/

Expand Down Expand Up @@ -172,7 +172,7 @@ workflows:
requires:
- prep-deps
- prep-build-test-flask-mv2:
<<: *develop_master_rc_only
<<: *main_master_rc_only
requires:
- prep-deps
- prep-build-test-mmi:
Expand Down Expand Up @@ -200,7 +200,7 @@ workflows:
requires:
- prep-deps
- test-e2e-chrome-webpack:
<<: *develop_master_rc_only
<<: *main_master_rc_only
requires:
- prep-build-test-webpack
- get-changed-files-with-git-diff
Expand All @@ -209,7 +209,7 @@ workflows:
- prep-build-test
- get-changed-files-with-git-diff
- test-e2e-firefox:
<<: *develop_master_rc_only
<<: *main_master_rc_only
requires:
- prep-build-test-mv2
- get-changed-files-with-git-diff
Expand All @@ -229,7 +229,7 @@ workflows:
- prep-build-test-flask
- get-changed-files-with-git-diff
- test-e2e-firefox-flask:
<<: *develop_master_rc_only
<<: *main_master_rc_only
requires:
- prep-build-test-flask-mv2
- test-e2e-chrome-mmi:
Expand All @@ -250,7 +250,7 @@ workflows:
filters:
branches:
only:
- develop
- main
- /^Version-v(\d+)[.](\d+)[.](\d+)/
requires:
- prep-build
Expand Down Expand Up @@ -349,13 +349,13 @@ workflows:
- job-publish-storybook:
filters:
branches:
only: develop
only: main
requires:
- prep-build-storybook
- job-publish-ts-migration-dashboard:
filters:
branches:
only: develop
only: main
requires:
- prep-build-ts-migration-dashboard

Expand All @@ -367,7 +367,7 @@ workflows:
- rerun-workflows-from-failed:
filters:
branches:
only: develop
only: main
requires:
- prep-deps

Expand Down Expand Up @@ -477,7 +477,7 @@ jobs:

# This job is used for the e2e quality gate.
# It must be run before any job which uses the run-all.js script.
# The job is skipped in develop, master or RC branches.
# The job is skipped in main, master or RC branches.
get-changed-files-with-git-diff:
executor: node-browsers-small
steps:
Expand Down Expand Up @@ -1335,7 +1335,7 @@ jobs:
template: basic_fail_1
channel: C01LUJL3T98
- slack/notify:
branch_pattern: develop
branch_pattern: main
event: fail
mentions: <@antonio.regadas>, @ramon.acitores134
template: basic_fail_1
Expand Down
4 changes: 2 additions & 2 deletions .circleci/scripts/bundle-stats-commit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ then
exit 1
fi

if [[ "${CIRCLE_BRANCH}" != "develop" ]]
if [[ "${CIRCLE_BRANCH}" != "main" ]]
then
printf 'This is not develop branch'
printf 'This is not main branch'
exit 0
fi

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/download-builds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function getGitBranch() {
const gitOutput = execSync('git status').toString();

const branchRegex = /On branch (?<branch>.*)\n/;
return gitOutput.match(branchRegex)?.groups?.branch || 'develop';
return gitOutput.match(branchRegex)?.groups?.branch || 'main';
}

async function getCircleJobs(branch: string) {
Expand Down
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ If you're picking up a bounty or an existing issue, feel free to ask clarifying
### Submitting a pull request
When you're done with your project / bugfix / feature and ready to submit a PR, there are a couple guidelines we ask you to follow:

- [ ] **Make sure you followed our [`coding guidelines`](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md)**: These guidelines aim to maintain consistency and readability across the codebase. They help ensure that the code is easy to understand, maintain, and modify, which is particularly important when working with multiple contributors.
- [ ] **Make sure you followed our [`coding guidelines`](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md)**: These guidelines aim to maintain consistency and readability across the codebase. They help ensure that the code is easy to understand, maintain, and modify, which is particularly important when working with multiple contributors.
- [ ] **Test it**: For any new programmatic functionality, we like unit tests when possible, so if you can keep your code cleanly isolated, please do add a test file to the `tests` folder.
- [ ] **Meet the spec**: Make sure the PR adds functionality that matches the issue you're closing. This is especially important for bounties: sometimes design or implementation details are included in the conversation, so read carefully!
- [ ] **Close the issue**: If this PR closes an open issue, fill out the "Related issues" section with `Fixes: #$ISSUE_NUMBER`. Ex. For closing issue 418, include the line `Fixes: #418`. If it doesn't close the issue but addresses it partially, just include a reference to the issue number, like `#418`.
- [ ] **Keep it simple**: Try not to include multiple features in a single PR, and don't make extraneous changes outside the scope of your contribution. All those touched files make things harder to review ;)
- [ ] **PR against `develop`**: Submit your PR against the `develop` branch. This is where we merge new features so they get some time to receive extra testing before being pushed to `master` for production. If your PR is a hot-fix that needs to be published urgently, you may submit a PR against the `master` branch, but this PR will receive tighter scrutiny before merging.
- [ ] **PR against `main`**: Submit your PR against the `main` branch. This is where we merge new features so they get some time to receive extra testing before being pushed to `master` for production. If your PR is a hot-fix that needs to be published urgently, you may submit a PR against the `master` branch, but this PR will receive tighter scrutiny before merging.
- [ ] **Get reviewed by MetaMask Internal Developers**: All PRs require 2 approvals from MetaMask Internal Developers before merging.
- [ ] **Ensure the PR is correctly labeled.**: More detail about PR labels can be found [here](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md).
- [ ] **Ensure the PR is correctly labeled.**: More detail about PR labels can be found [here](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md).
- [ ] **PR Titles**: Must adhere to the [Conventional Commits specification](https://www.conventionalcommits.org)
- `<type>[optional scope]: <description>`
- Example: `feat(parser): add ability to parse arrays`
Expand Down
2 changes: 1 addition & 1 deletion .github/guidelines/LABELING_GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ It's essential to ensure that PRs have the appropriate labels before they are co
- **regression-RC-x.y.z**: This label is manually added to a bug report issue by release engineers when a bug is found during release regerssion testing phase. The `x.y.z` in the label represents the release candidate (RC) version in which the bug's been discovered.

### Optional labels:
- **regression-develop**: This label can manually be added to a bug report issue at the time of its creation if the bug is present on the development branch, i.e., `develop`, but is not yet released in production.
- **regression-main**: This label can manually be added to a bug report issue at the time of its creation if the bug is present on the development branch, i.e., `main`, but is not yet released in production.
- **needs-qa**: If the PR includes a new features, complex testing steps, or large refactors, this label must be added to indicated PR requires a full manual QA prior being merged and added to a release.

### Labels prohibited when PR needs to be merged:
Expand Down
4 changes: 2 additions & 2 deletions .github/pull-request-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ Fixes:

## **Pre-merge author checklist**

- [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors.
- [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors.

## **Pre-merge reviewer checklist**

Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/check-pr-has-required-labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function main(): Promise<void> {
if (!hasTeamLabel) {
errorMessage += 'No team labels found on the PR. ';
}
errorMessage += `Please make sure the PR is appropriately labeled before merging it.\n\nSee labeling guidelines for more detail: https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md`;
errorMessage += `Please make sure the PR is appropriately labeled before merging it.\n\nSee labeling guidelines for more detail: https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md`;
core.setFailed(errorMessage);
process.exit(1);
}
8 changes: 4 additions & 4 deletions .github/scripts/check-template-and-add-labels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function main(): Promise<void> {

} else {
const errorMessage =
"Issue body does not match any of expected templates ('general-issue.yml' or 'bug-report.yml').\n\nMake sure issue's body includes all section titles.\n\nSections titles are listed here: https://github.com/MetaMask/metamask-extension/blob/develop/.github/scripts/shared/template.ts#L14-L37";
"Issue body does not match any of expected templates ('general-issue.yml' or 'bug-report.yml').\n\nMake sure issue's body includes all section titles.\n\nSections titles are listed here: https://github.com/MetaMask/metamask-extension/blob/main/.github/scripts/shared/template.ts#L14-L37";
console.log(errorMessage);

// Add label to indicate issue doesn't match any template
Expand All @@ -152,7 +152,7 @@ async function main(): Promise<void> {
);
} else {
const errorMessage =
`PR body does not match template ('pull-request-template.md').\n\nMake sure PR's body includes all section titles.\n\nSections titles are listed here: https://github.com/MetaMask/metamask-extension/blob/develop/.github/scripts/shared/template.ts#L40-L47`;
`PR body does not match template ('pull-request-template.md').\n\nMake sure PR's body includes all section titles.\n\nSections titles are listed here: https://github.com/MetaMask/metamask-extension/blob/main/.github/scripts/shared/template.ts#L40-L47`;
console.log(errorMessage);

// Add label to indicate PR body doesn't match template
Expand Down Expand Up @@ -334,7 +334,7 @@ function craftRegressionLabel(regressionStage: RegressionStage | undefined, rele
switch (regressionStage) {
case RegressionStage.Development:
return {
name: `regression-develop`,
name: `regression-main`,
color: '5319E7', // violet
description: `Regression bug that was found on development branch, but not yet present in production`,
};
Expand Down Expand Up @@ -364,7 +364,7 @@ function craftRegressionLabel(regressionStage: RegressionStage | undefined, rele
return {
name: `regression-*`,
color: 'EDEDED', // grey
description: `TODO: Unknown regression stage. Please replace with correct regression label: 'regression-develop', 'regression-RC-x.y.z', or 'regression-prod-x.y.z' label, where 'x.y.z' is the number of the release where bug was found.`,
description: `TODO: Unknown regression stage. Please replace with correct regression label: 'regression-main', 'regression-RC-x.y.z', or 'regression-prod-x.y.z' label, where 'x.y.z' is the number of the release where bug was found.`,
};
}
}
2 changes: 1 addition & 1 deletion .github/workflows/add-release-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Add release label to PR and linked issues when PR gets merged
on:
pull_request:
branches:
- develop
- main
types:
- closed

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Check PR has required labels
on:
pull_request:
branches:
- develop
- main
types:
- opened
- reopened
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ develop, Version-v*, cla-signatures, master, snaps ]
branches: [ main, Version-v*, cla-signatures, master, snaps ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
branches: [ main ]
schedule:
- cron: '28 12 * * 0'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codespaces.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- 'codespaces**'
- 'develop'
- 'main'
paths:
- '**/yarn.lock'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crowdin-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ permissions:
on:
push:
branches:
- develop
- main
schedule:
- cron: "0 */12 * * *"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Main
on:
push:
branches:
- develop
- main
- master
pull_request:
types:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security-code-scanner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: "MetaMask Security Code Scanner"

on:
push:
branches: [ 'develop' ]
branches: [ 'main' ]
pull_request:
branches: [ 'develop' ]
branches: [ 'main' ]

jobs:
run-security-scan:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/validate-conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Validate Conventional Commit Title
on:
pull_request:
branches:
- develop
- main
types: [opened, edited, reopened, synchronize]

jobs:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ To learn how to develop MetaMask-compatible applications, visit our [Developer D

To learn how to contribute to the MetaMask codebase, visit our [Contributor Docs](https://github.com/MetaMask/contributor-docs).

To learn how to contribute to the MetaMask Extension project itself, visit our [Extension Docs](https://github.com/MetaMask/metamask-extension/tree/develop/docs).
To learn how to contribute to the MetaMask Extension project itself, visit our [Extension Docs](https://github.com/MetaMask/metamask-extension/tree/main/docs).

## GitHub Codespaces quickstart

Expand Down
4 changes: 2 additions & 2 deletions app/scripts/lib/setupSentry.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ function getTracesSampleRate(sentryTarget) {
}

if (flags.circleci) {
// Report very frequently on develop branch, and never on other branches
// Report very frequently on main branch, and never on other branches
// (Unless you use a `flags = {"sentry": {"tracesSampleRate": x.xx}}` override)
if (flags.circleci.branch === 'develop') {
if (flags.circleci.branch === 'main') {
return 0.015;
}
return 0;
Expand Down
4 changes: 2 additions & 2 deletions development/build/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
> Add `--build-type flask` to build Flask, our canary distribution with more experimental features.
This directory contains the MetaMask build system, which is used to build the MetaMask Extension such that it can be used in a supported browser.
From the repository root, the build system entry file is located at [`./development/build/index.js`](https://github.com/MetaMask/metamask-extension/blob/develop/development/build/index.js).
From the repository root, the build system entry file is located at [`./development/build/index.js`](https://github.com/MetaMask/metamask-extension/blob/main/development/build/index.js).

Several package scripts invoke the build system.
For example, `yarn start` creates a watched development build, and `yarn dist` creates a production build.
Expand All @@ -20,7 +20,7 @@ are written to the `./dist` directory.

Our JavaScript source files are transformed using [Babel](https://babeljs.io/), specifically using
the [`babelify`](https://npmjs.com/package/babelify) Browserify transform.
Source file bundling tasks are implemented in the [`./development/build/scripts.js`](https://github.com/MetaMask/metamask-extension/blob/develop/development/build/scripts.js).
Source file bundling tasks are implemented in the [`./development/build/scripts.js`](https://github.com/MetaMask/metamask-extension/blob/main/development/build/scripts.js).

> Locally implemented Browserify transforms, _some of which affect how we write JavaScript_, are listed and documented [here](./transforms/README.md).
Expand Down
2 changes: 1 addition & 1 deletion development/build/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ function getEnvironment({ buildTarget }) {
/^Version-v(\d+)[.](\d+)[.](\d+)/u.test(process.env.CIRCLE_BRANCH)
) {
return ENVIRONMENT.RELEASE_CANDIDATE;
} else if (process.env.CIRCLE_BRANCH === 'develop') {
} else if (process.env.CIRCLE_BRANCH === 'main') {
return ENVIRONMENT.STAGING;
} else if (process.env.CIRCLE_PULL_REQUEST) {
return ENVIRONMENT.PULL_REQUEST;
Expand Down
2 changes: 1 addition & 1 deletion development/fitness-functions/rules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const RULES: IRule[] = [
name: "Don't use `sinon` or `assert` in unit tests",
fn: preventSinonAssertSyntax,
errorMessage:
'`sinon` or `assert` was detected in the diff. Please use Jest instead. For more info: https://github.com/MetaMask/metamask-extension/blob/develop/docs/testing.md#favor-jest-instead-of-mocha',
'`sinon` or `assert` was detected in the diff. Please use Jest instead. For more info: https://github.com/MetaMask/metamask-extension/blob/main/docs/testing.md#favor-jest-instead-of-mocha',
},
{
name: "Don't add JS or JSX files",
Expand Down
6 changes: 3 additions & 3 deletions development/highlights/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ module.exports = { getHighlights };

async function getHighlights({ artifactBase }) {
let highlights = '';
// here we assume the PR base branch ("target") is `develop` in lieu of doing
// here we assume the PR base branch ("target") is `main` in lieu of doing
// a query against the github api which requires an access token
// see https://discuss.circleci.com/t/how-to-retrieve-a-pull-requests-base-branch-name-github/36911
const changedFiles = await getChangedFiles({ target: 'develop' });
console.log(`detected changed files vs develop:`);
const changedFiles = await getChangedFiles({ target: 'main' });
console.log(`detected changed files vs main:`);
for (const filename of changedFiles) {
console.log(` ${filename}`);
}
Expand Down
14 changes: 7 additions & 7 deletions development/master-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ async function runGitCommands() {
console.log('Executed: git reset --hard origin/master');

try {
await exec('git merge origin/develop');
console.log('Executed: git merge origin/develop');
await exec('git merge origin/main');
console.log('Executed: git merge origin/main');
} catch (error) {
// Handle the error but continue script execution
if (
Expand All @@ -70,11 +70,11 @@ async function runGitCommands() {
}

await exec('git add .');
await exec('git restore --source origin/develop .');
console.log('Executed: it restore --source origin/develop .');
await exec('git restore --source origin/main .');
console.log('Executed: it restore --source origin/main .');

await exec('git checkout origin/develop -- .');
console.log('Executed: git checkout origin/develop -- .');
await exec('git checkout origin/main -- .');
console.log('Executed: git checkout origin/main -- .');

await exec('git checkout origin/master -- CHANGELOG.md');
console.log('Executed: git checkout origin/master -- CHANGELOG.md');
Expand All @@ -91,7 +91,7 @@ async function runGitCommands() {
await exec('git add .');
console.log('Executed: git add .');

await exec('git commit -m "Merge origin/develop into master-sync"');
await exec('git commit -m "Merge origin/main into master-sync"');
console.log('Executed: git commit');

console.log('Your local master-sync branch is now ready to become a PR.');
Expand Down
Loading

0 comments on commit 205c755

Please sign in to comment.