Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjl10 authored Jan 9, 2025
2 parents c8510cf + 87c524e commit 4d02e8c
Show file tree
Hide file tree
Showing 201 changed files with 4,156 additions and 2,275 deletions.
23 changes: 11 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ workflows:
requires:
- prep-deps
- prep-build-test-flask-mv2:
<<: *main_master_rc_only
requires:
- prep-deps
- prep-build-test-mmi:
Expand Down Expand Up @@ -283,10 +282,14 @@ workflows:
- prep-deps
- prep-build
- prep-build-mv2
- trigger-beta-build
- prep-build-mmi
- prep-build-flask
- prep-build-flask-mv2
- prep-build-test
- prep-build-test-mv2
- prep-build-test-flask
- prep-build-test-flask-mv2
- trigger-beta-build
- prep-build-storybook
- prep-build-ts-migration-dashboard
- benchmark
Expand Down Expand Up @@ -701,10 +704,10 @@ jobs:
name: Build extension for testing
command: yarn build:test:flask:mv2
- run:
name: Move test build to 'dist-test-flask' to avoid conflict with production build
name: Move test build to 'dist-test-flask-mv2' to avoid conflict with production build
command: mv ./dist ./dist-test-flask-mv2
- run:
name: Move test zips to 'builds-test-flask' to avoid conflict with production build
name: Move test zips to 'builds-test-flask-mv2' to avoid conflict with production build
command: mv ./builds ./builds-test-flask-mv2
- persist_to_workspace:
root: .
Expand Down Expand Up @@ -1306,8 +1309,12 @@ jobs:
destination: builds-mv2
- store_artifacts:
path: builds-test
- store_artifacts:
path: builds-test-mv2
- store_artifacts:
path: builds-test-flask
- store_artifacts:
path: builds-test-flask-mv2
- store_artifacts:
path: test-artifacts
destination: test-artifacts
Expand All @@ -1324,14 +1331,6 @@ jobs:
- store_artifacts:
path: development/ts-migration-dashboard/build/final
destination: ts-migration-dashboard
- run:
name: Set branch parent commit env var
command: |
echo "export PARENT_COMMIT=$(git merge-base origin/HEAD HEAD)" >> $BASH_ENV
source $BASH_ENV
- run:
name: build:announce
command: ./development/metamaskbot-build-announce.js

job-publish-release:
executor: node-browsers-small
Expand Down
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# audit these changes on their own, and leave their analysis in a comment.
# These codeowners will review this analysis, and review the policy changes in
# further detail if warranted.
lavamoat/ @MetaMask/extension-devs @MetaMask/supply-chain
lavamoat/ @MetaMask/extension-devs @MetaMask/policy-reviewers @MetaMask/supply-chain

# The offscreen.ts script file that is included in the offscreen document html
# file is responsible, at present, for loading the snaps execution environment
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ jobs:
name: Wait for CircleCI workflow status
uses: ./.github/workflows/wait-for-circleci-workflow-status.yml

publish-prerelease:
name: Publish prerelease
if: ${{ github.event_name == 'pull_request' }}
needs:
- wait-for-circleci-workflow-status
uses: ./.github/workflows/publish-prerelease.yml
secrets:
PR_COMMENT_TOKEN: ${{ secrets.PR_COMMENT_TOKEN }}

all-jobs-completed:
name: All jobs completed
runs-on: ubuntu-latest
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/publish-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Publish prerelease

on:
workflow_call:
secrets:
PR_COMMENT_TOKEN:
required: true

jobs:
publish-prerelease:
name: Publish prerelease
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # This is needed to get merge base to calculate bundle size diff

- name: Setup environment
uses: metamask/github-tools/.github/actions/setup-environment@main

- name: Get merge base commit hash
id: get-merge-base
env:
BASE_REF: ${{ github.event.pull_request.base.ref }}
run: |
merge_base="$(git merge-base "origin/${BASE_REF}" HEAD)"
echo "Merge base is '${merge_base}'"
echo "MERGE_BASE=${merge_base}" >> "$GITHUB_OUTPUT"
- name: Get CircleCI job details
id: get-circleci-job-details
env:
REPOSITORY: ${{ github.repository }}
BRANCH: ${{ github.head_ref }}
HEAD_COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
run: |
pipeline_id=$(curl --silent "https://circleci.com/api/v2/project/gh/$OWNER/$REPOSITORY/pipeline?branch=$BRANCH" | jq -r ".items | map(select(.vcs.revision == \"${HEAD_COMMIT_HASH}\" )) | first | .id")
workflow_id=$(curl --silent "https://circleci.com/api/v2/pipeline/$pipeline_id/workflow" | jq -r ".items[0].id")
job_details=$(curl --silent "https://circleci.com/api/v2/workflow/$workflow_id/job" | jq -r '.items[] | select(.name == "job-publish-prerelease")')
build_num=$(echo "$job_details" | jq -r '.job_number')
echo 'CIRCLE_BUILD_NUM='"$build_num" >> "$GITHUB_OUTPUT"
job_id=$(echo "$job_details" | jq -r '.id')
echo 'CIRCLE_WORKFLOW_JOB_ID='"$job_id" >> "$GITHUB_OUTPUT"
echo "Getting artifacts from pipeline '${pipeline_id}', workflow '${workflow_id}', build number '${build_num}', job ID '${job_id}'"
- name: Get CircleCI job artifacts
env:
CIRCLE_WORKFLOW_JOB_ID: ${{ steps.get-circleci-job-details.outputs.CIRCLE_WORKFLOW_JOB_ID }}
run: |
mkdir -p "test-artifacts/chrome/benchmark"
curl --silent --location "https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/0/test-artifacts/chrome/benchmark/pageload.json" > "test-artifacts/chrome/benchmark/pageload.json"
bundle_size=$(curl --silent --location "https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/0/test-artifacts/chrome/bundle_size.json")
mkdir -p "test-artifacts/chrome"
echo "${bundle_size}" > "test-artifacts/chrome/bundle_size.json"
stories=$(curl --silent --location "https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/0/storybook/stories.json")
mkdir "storybook-build"
echo "${stories}" > "storybook-build/stories.json"
- name: Publish prerelease
env:
PR_COMMENT_TOKEN: ${{ secrets.PR_COMMENT_TOKEN }}
PR_NUMBER: ${{ github.event.pull_request.number }}
HEAD_COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
MERGE_BASE_COMMIT_HASH: ${{ steps.get-merge-base.outputs.MERGE_BASE }}
CIRCLE_BUILD_NUM: ${{ steps.get-circleci-job-details.outputs.CIRCLE_BUILD_NUM }}
CIRCLE_WORKFLOW_JOB_ID: ${{ steps.get-circleci-job-details.outputs.CIRCLE_WORKFLOW_JOB_ID }}
run: ./development/metamaskbot-build-announce.js
12 changes: 0 additions & 12 deletions app/_locales/de/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/el/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/en_GB/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/es/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/fr/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/hi/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/id/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/ja/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/ko/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions app/_locales/pt/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4d02e8c

Please sign in to comment.