Skip to content

Commit 5b67025

Browse files
authored
Merge pull request #24242 from MetaMask/Version-v11.16.0
Version v11.16.0
2 parents 8620dac + a848063 commit 5b67025

File tree

499 files changed

+15496
-6912
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

499 files changed

+15496
-6912
lines changed

.circleci/config.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ jobs:
13441344
- test-artifacts
13451345

13461346
job-publish-prerelease:
1347-
executor: node-browsers-small
1347+
executor: node-browsers-medium
13481348
steps:
13491349
- checkout
13501350
- attach_workspace:
@@ -1384,13 +1384,9 @@ jobs:
13841384
path: test-artifacts
13851385
destination: test-artifacts
13861386
# important: generate lavamoat viz AFTER uploading builds as artifacts
1387-
# Temporarily disabled until we can update to a version of `sesify` with
1388-
# this fix included: https://github.com/LavaMoat/LavaMoat/pull/121
1389-
# Disabled 2024-03-25 due to flakiness.
1390-
# - see: https://github.com/MetaMask/metamask-extension/issues/23704
1391-
#- run:
1392-
# name: build:lavamoat-viz
1393-
# command: ./.circleci/scripts/create-lavamoat-viz.sh
1387+
- run:
1388+
name: build:lavamoat-viz
1389+
command: ./.circleci/scripts/create-lavamoat-viz.sh
13941390
- store_artifacts:
13951391
path: build-artifacts
13961392
destination: build-artifacts
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
set -u
5+
set -o pipefail
6+
7+
# Takes in 3 args
8+
# - 1 - Base PR Branch Name
9+
# - 2 - Commit Hash
10+
# - 3 - PR Number
11+
12+
BASE_PR_BRANCH_NAME="${1}"
13+
COMMIT_HASH_TO_CHERRY_PICK="${2}"
14+
PR_BRANCH_NAME="chore/cherry-pick-${3}"
15+
PR_TITLE="chore: cherry-pick #${3}"
16+
PR_BODY="This PR cherry-picks #${3}"
17+
18+
git config user.name "MetaMask Bot"
19+
git config user.email "[email protected]"
20+
21+
git checkout "${BASE_PR_BRANCH_NAME}"
22+
git pull
23+
git checkout -b "${PR_BRANCH_NAME}"
24+
git cherry-pick "${COMMIT_HASH_TO_CHERRY_PICK}"
25+
26+
git push --set-upstream origin "${PR_BRANCH_NAME}"
27+
28+
gh pr create \
29+
--draft \
30+
--title "${PR_TITLE}" \
31+
--body "${PR_BODY}" \
32+
--head "${BASE_PR_BRANCH_NAME}"

.circleci/scripts/create-lavamoat-viz.sh

+27-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,33 @@ BUILD_DEST="./build-artifacts/build-viz/"
1010
# prepare artifacts dir
1111
mkdir -p "${BUILD_DEST}"
1212

13-
# generate lavamoat debug config
13+
# generate lavamoat debug configs
1414
yarn lavamoat:debug:build
15+
yarn lavamoat:debug:webapp --parallel=false
1516

17+
# generate entries for all present policy dirs under lavamoat/browserify
18+
# static entry for build-system
19+
POLICY_DIR_NAMES=$(find lavamoat/browserify -maxdepth 1 -mindepth 1 -type d -printf '%f ')
20+
21+
POLICY_FILE_PATHS_JSON=$(echo -n "${POLICY_DIR_NAMES}" \
22+
| jq --raw-input --slurp --indent 0 '
23+
rtrimstr(" ")
24+
| split(" ")
25+
| map({
26+
"key": .,
27+
"value": {
28+
"debug": ("lavamoat/browserify/"+.+"/policy-debug.json"),
29+
"override":"lavamoat/browserify/policy-override.json",
30+
"primary":("lavamoat/browserify/"+.+"/policy.json")
31+
}
32+
})
33+
| from_entries
34+
|."build-system"= {
35+
"debug": "lavamoat/build-system/policy-debug.json",
36+
"override":"lavamoat/build-system/policy-override.json",
37+
"primary": "lavamoat/build-system/policy.json"
38+
}'
39+
)
1640
# generate viz
17-
npx lavamoat-viz --dest "${BUILD_DEST}"
41+
# shellcheck disable=SC2086
42+
yarn lavamoat-viz --dest "${BUILD_DEST}" --policyNames build-system ${POLICY_DIR_NAMES} --policyFilePathsJson "${POLICY_FILE_PATHS_JSON}"

.github/CODEOWNERS

+6
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,9 @@ privacy-snapshot.json @MetaMask/extension-privacy-reviewers
5454

5555
# Confirmations UX team to own code for confirmations on UI.
5656
ui/pages/confirmations @MetaMask/confirmations-ux @MetaMask/confirmations-system-team
57+
58+
# MMI team is responsible for code related with Institutioanl version of MetaMask
59+
ui/pages/institutional @MetaMask/mmi
60+
ui/components/institutional @MetaMask/mmi
61+
ui/ducks/institutional @MetaMask/mmi
62+
ui/selectors/institutional @MetaMask/mmi

.github/guidelines/LABELING_GUIDELINES.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ It's essential to ensure that PRs have the appropriate labels before they are co
1212
- **release-x.y.z**: This label is automatically added to a PR and its linked issues upon the PR's merge. The `x.y.z` in the label represents the version in which the changes from the PR will be included. This label is auto-generated by a [GitHub action](../workflows/add-release-label.yml), which determines the version by incrementing the minor version number from the most recent release. Manual intervention is only required in specific cases. For instance, if a merged PR is cherry-picked into a release branch, typically done to address Release Candidate (RC) bugs, the label would need to be manually updated to reflect the correct version.
1313
- **regression-prod-x.y.z**: This label is automatically added to a bug report issue at the time of its creation. The `x.y.z` in the label represents the version in which the bug first appeared. This label is auto-generated by a [GitHub action](../workflows/check-template-and-add-labels.yml), which determines the `x.y.z` value based on the version information provided in the bug report issue form. Manual intervention is only necessary under certain circumstances. For example, if a user submits a bug report and specifies the version they are currently using, but the bug was actually introduced in a prior version, the label would need to be manually updated to accurately reflect the version where the bug originated.
1414

15-
### Optional QA labels:
15+
### Optional labels:
16+
- **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 development branch (i.e. `develop`), but is not yet released in production.
1617
- **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.
1718

1819
### Labels prohibited when PR needs to be merged:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Notify MMI team via Slack
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- develop
7+
types:
8+
- opened
9+
- reopened
10+
- synchronize
11+
- labeled
12+
13+
jobs:
14+
process-label:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
pull-requests: write
18+
contents: write
19+
steps:
20+
- name: Notify MMI team via Slack
21+
if: contains(github.event.pull_request.labels.*.name, 'team-mmi')
22+
uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844
23+
with:
24+
status: custom
25+
fields: repo,message,commit,author,action
26+
payload: |
27+
{
28+
"text": "A PR with label 'team-mmi' was added and requires review: ${{ github.event.pull_request.html_url }} in ${{ github.repository }}",
29+
"attachments": [
30+
{
31+
"color": "#2eb886",
32+
"fields": [
33+
{
34+
"title": "Repository",
35+
"value": "${{ github.repository }}",
36+
"short": true
37+
},
38+
{
39+
"title": "PR",
40+
"value": "#${{ github.event.pull_request.number }}",
41+
"short": true
42+
}
43+
]
44+
}
45+
]
46+
}
47+
env:
48+
SLACK_WEBHOOK_URL: ${{ secrets.MMI_LABEL_SLACK_WEBHOOK_URL }}

.github/workflows/add-release-label.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
if: github.event.pull_request.merged == true
1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 0 # This is needed to checkout all branches
1919

2020
- name: Set up Node.js
21-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
2222
with:
2323
node-version-file: '.nvmrc'
2424
cache: yarn

.github/workflows/check-pr-labels.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818

1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
2222
with:
2323
fetch-depth: 1 # This retrieves only the latest commit.
2424

2525
- name: Set up Node.js
26-
uses: actions/setup-node@v3
26+
uses: actions/setup-node@v4
2727
with:
2828
node-version-file: '.nvmrc'
2929
cache: yarn

.github/workflows/check-template-and-add-labels.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout repository
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 1 # This retrieves only the latest commit.
1717

1818
- name: Set up Node.js
19-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
2020
with:
2121
node-version-file: '.nvmrc'
2222
cache: yarn

.github/workflows/close-bug-report.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'Version-v')
1414
steps:
1515
- name: Checkout repository
16-
uses: actions/checkout@v3
16+
uses: actions/checkout@v4
1717
with:
1818
fetch-depth: 1 # This retrieves only the latest commit.
1919

2020
- name: Set up Node.js
21-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
2222
with:
2323
node-version-file: '.nvmrc'
2424
cache: yarn

.github/workflows/codeql-analysis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v2
41+
uses: actions/checkout@v4
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL
45-
uses: github/codeql-action/init@v2
45+
uses: github/codeql-action/init@v3
4646
with:
4747
languages: ${{ matrix.language }}
4848
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -53,7 +53,7 @@ jobs:
5353
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5454
# If this step fails, then you should remove it and run the build manually (see below)
5555
- name: Autobuild
56-
uses: github/codeql-action/autobuild@v2
56+
uses: github/codeql-action/autobuild@v3
5757

5858
# ℹ️ Command-line programs to run using the OS shell.
5959
# 📚 https://git.io/JvXDl
@@ -67,4 +67,4 @@ jobs:
6767
# make release
6868

6969
- name: Perform CodeQL Analysis
70-
uses: github/codeql-action/analyze@v2
70+
uses: github/codeql-action/analyze@v3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Cherry Pick Commit
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch_name:
7+
description: 'Branch name you want the cherry-pick branch to be based from'
8+
required: true
9+
commit_hash:
10+
description: 'Commit Hash'
11+
required: true
12+
PR_number:
13+
description: 'PR # Associated with Cherry Pick'
14+
required: true
15+
16+
17+
jobs:
18+
cherry-pick:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Create Cherry Pick PR
26+
id: create-cherry-pick-pr
27+
shell: bash
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: |
31+
./scripts/create-cherry-pick-pr.sh ${{ github.event.inputs.branch_name }} ${{ github.event.inputs.commit_hash }} ${{ github.event.inputs.PR_number }}

.github/workflows/crowdin-action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919

2020
- name: Checkout
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v4
2222

2323
- name: crowdin action
2424
uses: crowdin/github-action@a3160b9e5a9e00739392c23da5e580c6cabe526d

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Check workflows
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- name: Download actionlint
1515
id: download-actionlint
1616
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/7fdc9630cc360ea1a469eed64ac6d78caeda1234/scripts/download-actionlint.bash) 1.6.23

.github/workflows/sonar.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ on:
44
secrets:
55
SONAR_TOKEN:
66
required: true
7-
pull_request:
8-
branches:
9-
- develop
10-
types:
11-
- opened
12-
- reopened
13-
- synchronize
14-
- labeled
15-
- unlabeled
7+
# pull_request:
8+
# branches:
9+
# - develop
10+
# types:
11+
# - opened
12+
# - reopened
13+
# - synchronize
14+
# - labeled
15+
# - unlabeled
1616

1717
jobs:
1818
sonarcloud:
1919
name: SonarCloud
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323
with:
2424
fetch-depth: 0 # Shallow clones should be disabled for better relevancy of analysis
2525
- name: SonarCloud Scan

.github/workflows/stale-issues-pr.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ jobs:
1212
issues: write
1313
pull-requests: write
1414
steps:
15-
- uses: actions/stale@72afbce2b0dbd1d903bb142cebe2d15dc307ae57
15+
# this is a hash for actions/[email protected]
16+
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e
1617
with:
1718
stale-issue-label: 'stale'
1819
only-issue-labels: 'type-bug'

0 commit comments

Comments
 (0)