Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 64 additions & 28 deletions .github/workflows/update-changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
issue_comment:
types:
- created
# pull_request:
# branches:
# - main
# types:
# - opened
pull_request_target:
branches:
- main
types:
- opened

permissions:
contents: write
Expand All @@ -17,7 +17,7 @@ permissions:
jobs:
is-fork:
name: Determine whether this PR is from a fork
if: github.event_name == 'pull_request' || (github.event.issue.pull_request && startsWith(github.event.comment.body, '@metamaskbot update-changelogs'))
if: github.event_name == 'pull_request_target' || (github.event.issue.pull_request && startsWith(github.event.comment.body, '@metamaskbot update-changelogs'))
runs-on: ubuntu-latest
outputs:
is-fork: ${{ steps.is-fork.outputs.is-fork }}
Expand Down Expand Up @@ -112,53 +112,89 @@ jobs:
if: ${{ needs.is-release.outputs.is-release == 'true' }}
runs-on: ubuntu-latest
environment: default-branch
env:
PR_NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
steps:
- name: Checkout repository
- name: Check out the base branch
uses: actions/checkout@v6
with:
ref: ${{ needs.is-release.outputs.merge-base }}
token: ${{ secrets.UPDATE_CHANGELOG_TOKEN }}

- name: Checkout pull request
- name: Detach HEAD (to prevent accidental pushes)
run: git checkout --detach HEAD

- name: Set up environment
uses: MetaMask/action-checkout-and-setup@v3
with:
is-high-risk-environment: false

- name: Overlay changelogs from current pull request
env:
PR_HEAD_SHA: ${{ needs.is-release.outputs.head-sha }}
PR_BASE_REF: ${{ needs.is-release.outputs.base-ref }}
PR_HEAD_REF: ${{ needs.is-release.outputs.head-ref }}
run: |
# These next two commands are also useful later when pushing
git fetch --no-tags origin "$PR_HEAD_SHA"
git fetch --no-tags origin "$PR_BASE_REF"
git checkout --detach "$PR_HEAD_SHA"
git fetch --no-tags origin "$PR_HEAD_REF"
git checkout "$PR_HEAD_SHA" -- '**/CHANGELOG.md'
shell: bash

- name: Setup environment
uses: MetaMask/action-checkout-and-setup@v3
with:
is-high-risk-environment: false
- name: Configure Git with name and email
run: |
# This is necessary to make a commit
# Passing `token` to the `checkout` action does not do this for us
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
shell: bash

- name: Commit changelogs from current pull request
run: |
git add -- '**/CHANGELOG.md'
git commit -m "[Temporary] Add changelogs from current pull request"
shell: bash

- name: Ensure required dependency bump entries exist across all changelogs
id: update-changelogs
env:
PR_NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}
MERGE_BASE: ${{ needs.is-release.outputs.merge-base }}
run: yarn changelog:validate --checkDeps --fix --currentPr "$PR_NUMBER" --fromRef "$MERGE_BASE"
run: |
yarn changelog:validate --checkDeps --fix --currentPr "$PR_NUMBER" --fromRef "$MERGE_BASE"
shell: bash
# If changelogs were updated but there were other validation errors
# found, we need to still create a commit below
continue-on-error: true

- name: Commit and push updated changelogs
id: push-changes
env:
PR_HEAD_REF: ${{ needs.is-release.outputs.head-ref }}
- name: Commit updated changelogs
id: commit-updated-changelogs
run: |
if git diff --quiet; then
echo "changes-pushed=false" >> "$GITHUB_OUTPUT"
# Nothing to commit; no changelogs updated
exit 0
fi

git diff --stat
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -- '**/CHANGELOG.md'
git commit -m "chore: Update dependency bump changelog entries"
git push origin "HEAD:$PR_HEAD_REF"

echo "changes-pushed=true" >> "$GITHUB_OUTPUT"
new_commit_id="$(git log -1 --pretty='format:%h')"
echo "new-commit-id=${new_commit_id}" >> "$GITHUB_OUTPUT"
shell: bash

- name: Cherry-pick new commit on top of pull request branch and push it
id: push-changes
env:
NEW_COMMIT_ID: ${{ steps.commit-updated-changelogs.outputs.new-commit-id }}
PR_HEAD_SHA: ${{ needs.is-release.outputs.head-sha }}
PR_HEAD_REF: ${{ needs.is-release.outputs.head-ref }}
run: |
if [[ -n "$NEW_COMMIT_ID" ]]; then
git checkout "$PR_HEAD_SHA"
git cherry-pick "$NEW_COMMIT_ID"
git push origin "HEAD:$PR_HEAD_REF"
echo "changes-pushed=true" >> "$GITHUB_OUTPUT"
else
echo "changes-pushed=false" >> "$GITHUB_OUTPUT"
fi
shell: bash

- name: Comment result
if: always()
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/core-monorepo",
"version": "963.0.0",
"version": "965.0.0",
"private": true,
"description": "Monorepo for packages shared between MetaMask clients",
"repository": {
Expand Down
38 changes: 23 additions & 15 deletions packages/account-tree-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [7.3.0]

### Added

- Expose missing public `AccountTreeController` methods through its messenger ([#8716](https://github.com/MetaMask/core/pull/8716))
Expand All @@ -15,6 +17,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `AccountTreeController:reinit`
- Corresponding action types are available as well.

### Changed

- Bump `@metamask/keyring-controller` from `^25.4.0` to `^25.5.0` ([#8722](https://github.com/MetaMask/core/pull/8722))
- Bump `@metamask/multichain-account-service` from `^8.0.1` to `^9.0.0` ([#8722](https://github.com/MetaMask/core/pull/8722))

## [7.2.0]

### Changed
Expand Down Expand Up @@ -61,7 +68,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add `lastSelected` (timestamp) to account group tree node metadata ([#8261](https://github.com/MetaMask/core/pull/8261)), ([#8300](https://github.com/MetaMask/core/pull/8300))
- Add `lastSelected` (timestamp) to account group tree node metadata ([#8261](https://github.com/MetaMask/core/pull/8261), [#8300](https://github.com/MetaMask/core/pull/8300))
- `group.metadata.lastSelected` is set to `Date.now()` whenever a group becomes the selected group, either via `setSelectedAccountGroup` or `AccountsController:selectedAccountChange`.
- The value is persisted in `accountGroupsMetadata` and restored on `init`/`reinit`.
- The value is not synchronize through backup and sync.
Expand Down Expand Up @@ -98,7 +105,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Expose missing public `AccountTreeController` methods through its messenger ([#7976](https://github.com/MetaMask/core/pull/7976/))
- Expose missing public `AccountTreeController` methods through its messenger ([#7976](https://github.com/MetaMask/core/pull/7976))
- The following actions are now available:
- `AccountTreeController:getAccountWalletObject`
- `AccountTreeController:getAccountWalletObjects`
Expand All @@ -110,7 +117,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Bump `@metamask/accounts-controller` from `^36.0.0` to `^37.0.0` ([#7996](https://github.com/MetaMask/core/pull/7996)), ([#8140](https://github.com/MetaMask/core/pull/8140))
- Bump `@metamask/accounts-controller` from `^36.0.0` to `^37.0.0` ([#7996](https://github.com/MetaMask/core/pull/7996), [#8140](https://github.com/MetaMask/core/pull/8140))
- Bump `@metamask/multichain-account-service` from `^7.0.0` to `^7.1.0` ([#8140](https://github.com/MetaMask/core/pull/8140))

### Removed
Expand All @@ -137,7 +144,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Bump `@metamask/snaps-sdk` from `^9.0.0` to `^10.3.0` ([#7550](https://github.com/MetaMask/core/pull/7550))
- Bump `@metamask/snaps-utils` from `^11.0.0` to `^11.7.0` ([#7550](https://github.com/MetaMask/core/pull/7550))
- Upgrade `@metamask/utils` from `^11.8.1` to `^11.9.0` ([#7511](https://github.com/MetaMask/core/pull/7511))
- Move peer dependencies for controller and service packages to direct dependencies ([#7209](https://github.com/MetaMask/core/pull/7209), [#7437](https://github.com/MetaMask/core/pull/7437), [#7515](https://github.com/MetaMask/core/pull/7515), [#7594](https://github.com/MetaMask/core/pull/7594), [#7550](https://github.com/MetaMask/core/pull/7550), [#7604](https://github.com/MetaMask/core/pull/7604), [#7642](https://github.com/MetaMask/core/pull/7642), [#7678](https://github.com/MetaMask/core/pull/7678), [#7713](https://github.com/MetaMask/core/pull/7713), [#7849](https://github.com/MetaMask/core/pull/7849)), ([#7869](https://github.com/MetaMask/core/pull/7869))
- Move peer dependencies for controller and service packages to direct dependencies ([#7209](https://github.com/MetaMask/core/pull/7209), [#7437](https://github.com/MetaMask/core/pull/7437), [#7515](https://github.com/MetaMask/core/pull/7515), [#7594](https://github.com/MetaMask/core/pull/7594), [#7550](https://github.com/MetaMask/core/pull/7550), [#7604](https://github.com/MetaMask/core/pull/7604), [#7642](https://github.com/MetaMask/core/pull/7642), [#7678](https://github.com/MetaMask/core/pull/7678), [#7713](https://github.com/MetaMask/core/pull/7713), [#7849](https://github.com/MetaMask/core/pull/7849), [#7869](https://github.com/MetaMask/core/pull/7869))
- The dependencies moved are:
- `@metamask/accounts-controller` (^35.0.2)
- `@metamask/keyring-controller` (^25.1.0)
Expand Down Expand Up @@ -255,16 +262,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Set the `setAccountGroupName`'s option `autoHandleConflict` to `true` for all backup & sync operations ([#6697](https://github.com/MetaMask/core/pull/6697))
- Add new group naming for non-HD keyring accounts ([#6679](https://github.com/MetaMask/core/pull/6679)), ([#6696](https://github.com/MetaMask/core/pull/6696))
- Add new group naming for non-HD keyring accounts ([#6679](https://github.com/MetaMask/core/pull/6679), [#6696](https://github.com/MetaMask/core/pull/6696))
- Hardware-wallet account groups are now named: "Ledger|Trezor|QR|Lattice|OneKey Account N".
- Private key account groups are now named: "Imported Account N".
- Snap account groups are now named: "Snap Account N".
- Account group names now use natural indexing as a fallback ([#6677](https://github.com/MetaMask/core/pull/6677)), ([#6679](https://github.com/MetaMask/core/pull/6679)), ([#6696](https://github.com/MetaMask/core/pull/6696))
- Account group names now use natural indexing as a fallback ([#6677](https://github.com/MetaMask/core/pull/6677), [#6679](https://github.com/MetaMask/core/pull/6679), [#6696](https://github.com/MetaMask/core/pull/6696))
- If a user names his accounts without any indexes, we would just use the number of accounts to compute the next available index.

### Fixed

- Fix group naming for non-HD keyring accounts ([#6677](https://github.com/MetaMask/core/pull/6677)), ([#6679](https://github.com/MetaMask/core/pull/6679))
- Fix group naming for non-HD keyring accounts ([#6677](https://github.com/MetaMask/core/pull/6677), [#6679](https://github.com/MetaMask/core/pull/6679))
- Previously, the first non-HD keyring account would start as `Account 2` as opposed to `Account 1` and thus subsequent group names were off as well.

## [1.0.0]
Expand Down Expand Up @@ -340,13 +347,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Add `AccountWalletObject.status` support ([#6571](https://github.com/MetaMask/core/pull/6571)), ([#6578](https://github.com/MetaMask/core/pull/6578))
- Add `AccountWalletObject.status` support ([#6571](https://github.com/MetaMask/core/pull/6571), [#6578](https://github.com/MetaMask/core/pull/6578))
- The `status` field will now report the current wallet status.
- Uses `MultichainAccountService` to report on-going operations (discovery, alignment, account creations) for `AccountWalletEntropyObject` multichain account wallet objects.

### Changed

- **BREAKING:** Bump peer dependency `@metamask/multichain-account-service` from `^0.7.0` to `^0.8.0` ([#6571](https://github.com/MetaMask/core/pull/6571)), ([#6578](https://github.com/MetaMask/core/pull/6578))
- **BREAKING:** Bump peer dependency `@metamask/multichain-account-service` from `^0.7.0` to `^0.8.0` ([#6571](https://github.com/MetaMask/core/pull/6571), [#6578](https://github.com/MetaMask/core/pull/6578))
- **BREAKING:** Bump peer dependency `@metamask/account-api` from `^0.9.0` to `^0.12.0` ([#6560](https://github.com/MetaMask/core/pull/6560))

## [0.14.0]
Expand All @@ -366,7 +373,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Optional configuration through new `AccountTreeControllerConfig.backupAndSync` options.
- Add `@metamask/superstruct` for data validation.
- **BREAKING:** Add `@metamask/multichain-account-service` peer dependency ([#6344](https://github.com/MetaMask/core/pull/6344))
- **BREAKING:** Add `@metamask/profile-sync-controller` peer dependency ([#6344](https://github.com/MetaMask/core/pull/6344)), ([#6558](https://github.com/MetaMask/core/pull/6558))
- **BREAKING:** Add `@metamask/profile-sync-controller` peer dependency ([#6344](https://github.com/MetaMask/core/pull/6344), [#6558](https://github.com/MetaMask/core/pull/6558))
- Add two new controller state metadata properties: `includeInStateLogs` and `usedInUi` ([#6470](https://github.com/MetaMask/core/pull/6470))

### Changed
Expand Down Expand Up @@ -446,7 +453,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

- **BREAKING:** Add support for `AccountsController:accountRenamed` event handling for state 1 and legacy account syncing compatibility ([#6251](https://github.com/MetaMask/core/pull/6251))
- Add `AccountTreeController:getAccountsFromSelectedAccountGroup` action ([#6266](https://github.com/MetaMask/core/pull/6266)), ([#6248](https://github.com/MetaMask/core/pull/6248)), ([#6265](https://github.com/MetaMask/core/pull/6265))
- Add `AccountTreeController:getAccountsFromSelectedAccountGroup` action ([#6266](https://github.com/MetaMask/core/pull/6266), [#6248](https://github.com/MetaMask/core/pull/6248), [#6265](https://github.com/MetaMask/core/pull/6265))
- This action can be used to get all accounts from the currently selected account group.
- This action also support `AccountSelector` support to filter out accounts based on some criterias.
- Add persistence support for user customizations ([#6221](https://github.com/MetaMask/core/pull/6221))
Expand All @@ -457,14 +464,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `{wallet,group}.type` tag ([#6214](https://github.com/MetaMask/core/pull/6214))
- This `type` can be used as a tag to strongly-type (tagged-union) the `AccountGroupObject`.
- The `type` from `wallet.metadata` has been moved to `wallet.type` instead and can be used to (tagged-union) the `AccountWalletObject`.
- Add `{wallet,group}.metadata` metadata object ([#6214](https://github.com/MetaMask/core/pull/6214)), ([#6258](https://github.com/MetaMask/core/pull/6258))
- Add `{wallet,group}.metadata` metadata object ([#6214](https://github.com/MetaMask/core/pull/6214), [#6258](https://github.com/MetaMask/core/pull/6258))
- Given the `{wallet,group}.type` you will now have access to specific metadata information (e.g. `group.metadata.groupIndex` for multichain account groups or `wallet.metadata.entropy.id` for multichain account wallets)
- Automatically prune empty groups and wallets upon account removal ([#6234](https://github.com/MetaMask/core/pull/6234))
- This ensures that there aren't any empty nodes in the `AccountTreeController` state.

### Changed

- **BREAKING:** Bump peer dependency `@metamask/account-api` from `^0.3.0` to `^0.9.0` ([#6214](https://github.com/MetaMask/core/pull/6214)), ([#6216](https://github.com/MetaMask/core/pull/6216)), ([#6222](https://github.com/MetaMask/core/pull/6222)), ([#6248](https://github.com/MetaMask/core/pull/6248))
- **BREAKING:** Bump peer dependency `@metamask/account-api` from `^0.3.0` to `^0.9.0` ([#6214](https://github.com/MetaMask/core/pull/6214), [#6216](https://github.com/MetaMask/core/pull/6216), [#6222](https://github.com/MetaMask/core/pull/6222), [#6248](https://github.com/MetaMask/core/pull/6248))
- **BREAKING:** Remove use of in-memory wallets and groups (`AccountTree{Wallet,Object}`) ([#6265](https://github.com/MetaMask/core/pull/6265))
- Those types are not ready to be used and adds no value for now.
- **BREAKING:** Move `wallet.metadata.type` tag to `wallet` node ([#6214](https://github.com/MetaMask/core/pull/6214))
Expand Down Expand Up @@ -503,7 +510,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- **BREAKING:** Add `@metamask/account-api` peer dependency ([#6115](https://github.com/MetaMask/core/pull/6115)), ([#6146](https://github.com/MetaMask/core/pull/6146))
- **BREAKING:** Add `@metamask/account-api` peer dependency ([#6115](https://github.com/MetaMask/core/pull/6115), [#6146](https://github.com/MetaMask/core/pull/6146))
- **BREAKING:** Types `AccountWallet` and `AccountGroup` have been respectively renamed to `AccountWalletObject` and `AccountGroupObject` ([#6115](https://github.com/MetaMask/core/pull/6115))
- Those names are now used by the `@metamask/account-api` package to define higher-level interfaces.
- **BREAKING:** Bump peer dependency `@metamask/snaps-controllers` from `^12.0.0` to `^14.0.0` ([#6035](https://github.com/MetaMask/core/pull/6035))
Expand Down Expand Up @@ -549,7 +556,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Initial release ([#5847](https://github.com/MetaMask/core/pull/5847))
- Grouping accounts into 3 main categories: Entropy source, Snap ID, keyring types.

[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/account-tree-controller@7.2.0...HEAD
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/account-tree-controller@7.3.0...HEAD
[7.3.0]: https://github.com/MetaMask/core/compare/@metamask/account-tree-controller@7.2.0...@metamask/account-tree-controller@7.3.0
[7.2.0]: https://github.com/MetaMask/core/compare/@metamask/account-tree-controller@7.1.0...@metamask/account-tree-controller@7.2.0
[7.1.0]: https://github.com/MetaMask/core/compare/@metamask/account-tree-controller@7.0.0...@metamask/account-tree-controller@7.1.0
[7.0.0]: https://github.com/MetaMask/core/compare/@metamask/account-tree-controller@6.0.0...@metamask/account-tree-controller@7.0.0
Expand Down
6 changes: 3 additions & 3 deletions packages/account-tree-controller/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@metamask/account-tree-controller",
"version": "7.2.0",
"version": "7.3.0",
"description": "Controller to group account together based on some pre-defined rules",
"keywords": [
"Ethereum",
Expand Down Expand Up @@ -56,9 +56,9 @@
"@metamask/accounts-controller": "^38.0.0",
"@metamask/base-controller": "^9.1.0",
"@metamask/keyring-api": "^23.1.0",
"@metamask/keyring-controller": "^25.4.0",
"@metamask/keyring-controller": "^25.5.0",
"@metamask/messenger": "^1.2.0",
"@metamask/multichain-account-service": "^8.0.1",
"@metamask/multichain-account-service": "^9.0.0",
"@metamask/profile-sync-controller": "^28.0.2",
"@metamask/snaps-controllers": "^19.0.0",
"@metamask/snaps-sdk": "^11.0.0",
Expand Down
Loading
Loading