Skip to content

Commit 9d2d2b1

Browse files
committed
Merge branch 'fix/remove-history-property' of github.com:MetaMask/core into fix/remove-history-property
2 parents 05f7fd8 + 9e6885a commit 9d2d2b1

File tree

87 files changed

+427
-181
lines changed

Some content is hidden

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

87 files changed

+427
-181
lines changed
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Check merge queue
2+
description: Check whether a pull request can skip the merge queue when it's
3+
up-to-date with the base branch.
4+
5+
inputs:
6+
head-ref:
7+
description: The name of the head ref (the pull request branch).
8+
required: true
9+
default: ${{ github.event.merge_group.head_ref }}
10+
11+
base-ref:
12+
description: The name of the base ref (e.g., main, master).
13+
required: true
14+
default: main
15+
16+
github-token:
17+
description: The GitHub token to use for authentication.
18+
required: true
19+
default: ${{ github.token }}
20+
21+
outputs:
22+
up-to-date:
23+
value: ${{ steps.up-to-date.outputs.up-to-date }}
24+
description: Whether the pull request is up-to-date with the base branch
25+
and is first in the merge queue, allowing it to skip the merge queue.
26+
27+
runs:
28+
using: composite
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v6
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Get pull request details
36+
id: pr-details
37+
uses: actions/github-script@v8
38+
env:
39+
HEAD_REF: ${{ inputs.head-ref }}
40+
with:
41+
github-token: ${{ inputs.github-token }}
42+
script: |
43+
const { HEAD_REF } = process.env;
44+
const match = HEAD_REF.match(/\/pr-([0-9]+)-/u);
45+
if (!match) {
46+
return core.setFailed(`Could not extract pull request number from head ref: "${HEAD_REF}".`);
47+
}
48+
49+
const number = parseInt(match[1], 10);
50+
const result = await github.graphql(`
51+
query($owner: String!, $name: String!, $number: Int!) {
52+
repository(owner: $owner, name: $name) {
53+
pullRequest(number: $number) {
54+
headRefName
55+
mergeQueueEntry { position }
56+
}
57+
}
58+
}
59+
`, {
60+
owner: context.repo.owner,
61+
name: context.repo.repo,
62+
number,
63+
});
64+
65+
if (!result.repository.pullRequest) {
66+
return core.setFailed(`Pull request #${number} not found in repository "${context.repo.owner}/${context.repo.repo}".`);
67+
}
68+
69+
const position = result.repository.pullRequest.mergeQueueEntry?.position;
70+
if (!position) {
71+
return core.setFailed(`Pull request #${number} is not in the merge queue.`);
72+
}
73+
74+
core.setOutput('pr-number', number);
75+
core.setOutput('pr-branch', result.repository.pullRequest.headRefName);
76+
core.setOutput('merge-queue-position', position);
77+
78+
- name: Check if pull request is up-to-date with base branch
79+
id: up-to-date
80+
shell: bash
81+
env:
82+
BASE_REF: ${{ inputs.base-ref }}
83+
PR_BRANCH: ${{ steps.pr-details.outputs.pr-branch }}
84+
MERGE_QUEUE_POSITION: ${{ steps.pr-details.outputs.merge-queue-position }}
85+
run: |
86+
set -euo pipefail
87+
if git merge-base --is-ancestor "origin/${BASE_REF}" "origin/${PR_BRANCH}" && [ "${MERGE_QUEUE_POSITION}" -eq 1 ]; then
88+
echo "up-to-date=true" >> "$GITHUB_OUTPUT"
89+
else
90+
echo "up-to-date=false" >> "$GITHUB_OUTPUT"
91+
fi

.github/workflows/main.yml

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,29 @@ concurrency:
1111
cancel-in-progress: ${{ !contains(github.ref, 'refs/heads/main') }}
1212

1313
jobs:
14+
check-skip-merge-queue:
15+
name: Check if pull request can skip merge queue
16+
runs-on: ubuntu-latest
17+
outputs:
18+
skip-merge-queue: ${{ steps.check-skip-merge-queue.outputs.up-to-date }}
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v6
22+
if: github.event_name == 'merge_group'
23+
- name: Check pull request merge queue status
24+
id: check-skip-merge-queue
25+
if: github.event_name == 'merge_group'
26+
uses: ./.github/actions/check-merge-queue
27+
with:
28+
head-ref: ${{ github.event.merge_group.head_ref }}
29+
base-ref: main
30+
github-token: ${{ secrets.GITHUB_TOKEN }}
31+
1432
check-workflows:
1533
name: Check workflows
34+
needs:
35+
- check-skip-merge-queue
36+
if: github.event_name != 'merge_group' || needs.check-skip-merge-queue.outputs.skip-merge-queue != 'true'
1637
runs-on: ubuntu-latest
1738
steps:
1839
- uses: actions/checkout@v5
@@ -127,11 +148,14 @@ jobs:
127148
name: All jobs pass
128149
if: ${{ always() }}
129150
runs-on: ubuntu-latest
130-
needs: all-jobs-complete
151+
needs:
152+
- all-jobs-complete
153+
- check-skip-merge-queue
154+
env:
155+
PASSED: ${{ needs.all-jobs-complete.outputs.passed == 'true' || needs.check-skip-merge-queue.outputs.skip-merge-queue == 'true' }}
131156
steps:
132157
- name: Check that all jobs have passed
133158
run: |
134-
passed="${{ needs.all-jobs-complete.outputs.passed }}"
135-
if [[ $passed != "true" ]]; then
159+
if [[ "$PASSED" != "true" ]]; then
136160
exit 1
137161
fi

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/core-monorepo",
3-
"version": "729.0.0",
3+
"version": "732.0.0",
44
"private": true,
55
"description": "Monorepo for packages shared between MetaMask clients",
66
"repository": {
@@ -63,7 +63,7 @@
6363
"@metamask/eth-block-tracker": "^15.0.0",
6464
"@metamask/eth-json-rpc-provider": "^6.0.0",
6565
"@metamask/json-rpc-engine": "^10.2.0",
66-
"@metamask/network-controller": "^27.0.0",
66+
"@metamask/network-controller": "^27.1.0",
6767
"@metamask/utils": "^11.8.1",
6868
"@ts-bridge/cli": "^0.6.4",
6969
"@types/jest": "^27.4.1",

packages/accounts-controller/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
### Changed
1111

12-
- Move peer dependencies for controller and service packages to direct dependencies ([#7209](https://github.com/MetaMask/core/pull/7209), [#7258](https://github.com/MetaMask/core/pull/7258))
12+
- Move peer dependencies for controller and service packages to direct dependencies ([#7209](https://github.com/MetaMask/core/pull/7209), [#7258](https://github.com/MetaMask/core/pull/7258), [#7534](https://github.com/MetaMask/core/pull/7534))
1313
- The dependencies moved are:
1414
- `@metamask/keyring-controller` (^25.0.0)
15-
- `@metamask/network-controller` (^27.0.0)
15+
- `@metamask/network-controller` (^27.1.0)
1616
- `@metamask/snaps-controllers` (^14.0.1)
1717
- In clients, it is now possible for multiple versions of these packages to exist in the dependency tree.
1818
- For example, this scenario would be valid: a client relies on `@metamask/controller-a` 1.0.0 and `@metamask/controller-b` 1.0.0, and `@metamask/controller-b` depends on `@metamask/controller-a` 1.1.0.

packages/accounts-controller/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@metamask/keyring-internal-api": "^9.0.0",
5757
"@metamask/keyring-utils": "^3.1.0",
5858
"@metamask/messenger": "^0.3.0",
59-
"@metamask/network-controller": "^27.0.0",
59+
"@metamask/network-controller": "^27.1.0",
6060
"@metamask/snaps-controllers": "^14.0.1",
6161
"@metamask/snaps-sdk": "^9.0.0",
6262
"@metamask/snaps-utils": "^11.0.0",
@@ -70,7 +70,7 @@
7070
},
7171
"devDependencies": {
7272
"@metamask/auto-changelog": "^3.4.4",
73-
"@metamask/controller-utils": "^11.16.0",
73+
"@metamask/controller-utils": "^11.17.0",
7474
"@metamask/providers": "^22.1.0",
7575
"@ts-bridge/cli": "^0.6.4",
7676
"@types/jest": "^27.4.1",

packages/address-book-controller/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- Bump `@metamask/controller-utils` from `^11.16.0` to `^11.17.0` ([#7534](https://github.com/MetaMask/core/pull/7534))
13+
1014
## [7.0.1]
1115

1216
### Changed

packages/address-book-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
},
5050
"dependencies": {
5151
"@metamask/base-controller": "^9.0.0",
52-
"@metamask/controller-utils": "^11.16.0",
52+
"@metamask/controller-utils": "^11.17.0",
5353
"@metamask/messenger": "^0.3.0",
5454
"@metamask/utils": "^11.8.1"
5555
},

packages/analytics-controller/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [1.0.0]
11+
1012
### Added
1113

1214
- Initial release of @metamask/analytics-controller. ([#7017](https://github.com/MetaMask/core/pull/7017), [#7202](https://github.com/MetaMask/core/pull/7202))
1315

14-
[Unreleased]: https://github.com/MetaMask/core/
16+
[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/[email protected]
17+
[1.0.0]: https://github.com/MetaMask/core/releases/tag/@metamask/[email protected]

packages/analytics-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@metamask/analytics-controller",
3-
"version": "0.0.0",
3+
"version": "1.0.0",
44
"description": "Common Analytics controller for event tracking",
55
"keywords": [
66
"MetaMask",

packages/assets-controllers/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2222
- `AccountTrackerController` now only refreshes balances for the newly added network on `NetworkController:networkAdded` event instead of all networks ([#7492](https://github.com/MetaMask/core/pull/7492))
2323
- Bump `@metamask/transaction-controller` from `^62.5.0` to `^62.7.0` ([#7494](https://github.com/MetaMask/core/pull/7494))
2424
- Bump `@metamask/multichain-account-service` from `^4.0.1` to `^4.1.0` ([#7515](https://github.com/MetaMask/core/pull/7515)
25+
- Bump `@metamask/controller-utils` from `^11.16.0` to `^11.17.0` ([#7534](https://github.com/MetaMask/core/pull/7534))
26+
- Bump `@metamask/network-controller` from `^27.0.0` to `^27.1.0` ([#7534](https://github.com/MetaMask/core/pull/7534))
2527

2628
## [94.1.0]
2729

0 commit comments

Comments
 (0)