Skip to content

Commit 20fdcd6

Browse files
authored
Merge branch 'develop' into feat-migration-122-redesignedConfirmationsEnabled
2 parents 9543ad8 + d02f647 commit 20fdcd6

File tree

168 files changed

+4231
-2015
lines changed

Some content is hidden

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

168 files changed

+4231
-2015
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ body:
4848
label: Error messages or log output
4949
description: Please copy and paste any relevant error messages or log output. This will be automatically formatted, so there is no need for backticks.
5050
render: shell
51+
- type: dropdown
52+
id: stage
53+
attributes:
54+
label: Detection stage
55+
description: At what stage was the bug detected?
56+
options:
57+
- In production (default)
58+
- In beta
59+
- During release testing
60+
- On the development branch
61+
validations:
62+
required: true
5163
- type: input
5264
id: version
5365
attributes:

.github/scripts/check-template-and-add-labels.ts

Lines changed: 95 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ import {
2121
import { TemplateType, templates } from './shared/template';
2222
import { retrievePullRequest } from './shared/pull-request';
2323

24+
enum RegressionStage {
25+
Development,
26+
Testing,
27+
Beta,
28+
Production
29+
}
30+
2431
const knownBots = ["metamaskbot", "dependabot", "github-actions", "sentry-io"];
2532

2633
main().catch((error: Error): void => {
@@ -120,23 +127,9 @@ async function main(): Promise<void> {
120127
invalidIssueTemplateLabel,
121128
);
122129

123-
// Extract release version from bug report issue body (if existing)
124-
const releaseVersion = extractReleaseVersionFromBugReportIssueBody(
125-
labelable.body,
126-
);
130+
// Add regression label to the bug report issue
131+
addRegressionLabelToIssue(octokit, labelable);
127132

128-
// Add regression prod label to the bug report issue if release version was found in issue body
129-
if(isReleaseCandidateIssue(labelable)) {
130-
console.log(
131-
`Issue ${labelable?.number} is not a production issue. Regression prod label is not needed.`,
132-
);
133-
} else if (releaseVersion) {
134-
await addRegressionProdLabelToIssue(octokit, releaseVersion, labelable);
135-
} else {
136-
console.log(
137-
`No release version was found in body of bug report issue ${labelable?.number}.`,
138-
);
139-
}
140133
} else {
141134
const errorMessage =
142135
"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";
@@ -215,6 +208,28 @@ function extractTemplateTypeFromBody(body: string): TemplateType {
215208
return TemplateType.None;
216209
}
217210

211+
// This helper function extracts regression stage (Development, Testing, Production) from bug report issue's body.
212+
function extractRegressionStageFromBugReportIssueBody(
213+
body: string,
214+
): RegressionStage | undefined {
215+
const detectionStageRegex = /### Detection stage\s*\n\s*(.*)/i;
216+
const match = body.match(detectionStageRegex);
217+
const extractedAnswer = match ? match[1].trim() : undefined;
218+
219+
switch (extractedAnswer) {
220+
case 'On the development branch':
221+
return RegressionStage.Development;
222+
case 'During release testing':
223+
return RegressionStage.Testing;
224+
case 'In beta':
225+
return RegressionStage.Beta;
226+
case 'In production (default)':
227+
return RegressionStage.Production;
228+
default:
229+
return undefined;
230+
}
231+
}
232+
218233
// This helper function extracts release version from bug report issue's body.
219234
function extractReleaseVersionFromBugReportIssueBody(
220235
body: string,
@@ -235,49 +250,54 @@ function extractReleaseVersionFromBugReportIssueBody(
235250
return version;
236251
}
237252

238-
// This function adds the correct "regression-prod-x.y.z" label to the issue, and removes other ones
239-
async function addRegressionProdLabelToIssue(
253+
// This function adds the correct regression label to the issue, and removes other ones
254+
async function addRegressionLabelToIssue(
240255
octokit: InstanceType<typeof GitHub>,
241-
releaseVersion: string,
242256
issue: Labelable,
243257
): Promise<void> {
244-
// Craft regression prod label to add
245-
const regressionProdLabel: Label = {
246-
name: `regression-prod-${releaseVersion}`,
247-
color: '5319E7', // violet
248-
description: `Regression bug that was found in production in release ${releaseVersion}`,
249-
};
250-
251-
let regressionProdLabelFound: boolean = false;
252-
const regressionProdLabelsToBeRemoved: {
258+
// Extract regression stage from bug report issue body (if existing)
259+
const regressionStage = extractRegressionStageFromBugReportIssueBody(
260+
issue.body,
261+
);
262+
263+
// Extract release version from bug report issue body (if existing)
264+
const releaseVersion = extractReleaseVersionFromBugReportIssueBody(
265+
issue.body,
266+
);
267+
268+
// Craft regression label to add
269+
const regressionLabel: Label = craftRegressionLabel(regressionStage, releaseVersion);
270+
271+
let regressionLabelFound: boolean = false;
272+
const regressionLabelsToBeRemoved: {
253273
id: string;
254274
name: string;
255275
}[] = [];
256276

257277
// Loop over issue's labels, to see if regression labels are either missing, or to be removed
258278
issue?.labels?.forEach((label) => {
259-
if (label?.name === regressionProdLabel.name) {
260-
regressionProdLabelFound = true;
261-
} else if (label?.name?.startsWith('regression-prod-')) {
262-
regressionProdLabelsToBeRemoved.push(label);
279+
if (label?.name === regressionLabel.name) {
280+
regressionLabelFound = true;
281+
} else if (label?.name?.startsWith('regression-')) {
282+
regressionLabelsToBeRemoved.push(label);
263283
}
264284
});
265285

266286
// Add regression prod label to the issue if missing
267-
if (regressionProdLabelFound) {
287+
if (regressionLabelFound) {
268288
console.log(
269-
`Issue ${issue?.number} already has ${regressionProdLabel.name} label.`,
289+
`Issue ${issue?.number} already has ${regressionLabel.name} label.`,
270290
);
271291
} else {
272292
console.log(
273-
`Add ${regressionProdLabel.name} label to issue ${issue?.number}.`,
293+
`Add ${regressionLabel.name} label to issue ${issue?.number}.`,
274294
);
275-
await addLabelToLabelable(octokit, issue, regressionProdLabel);
295+
await addLabelToLabelable(octokit, issue, regressionLabel);
276296
}
277297

278298
// Remove other regression prod label from the issue
279299
await Promise.all(
280-
regressionProdLabelsToBeRemoved.map((label) => {
300+
regressionLabelsToBeRemoved.map((label) => {
281301
removeLabelFromLabelable(octokit, issue, label?.id);
282302
}),
283303
);
@@ -309,9 +329,42 @@ async function userBelongsToMetaMaskOrg(
309329
return Boolean(userBelongsToMetaMaskOrgResult?.user?.organization?.id);
310330
}
311331

312-
// This function checks if issue is a release candidate (RC) issue, discovered during release regression testing phase. If so, it means it is not a production issue.
313-
function isReleaseCandidateIssue(
314-
issue: Labelable,
315-
): boolean {
316-
return Boolean(issue.labels.find(label => label.name.startsWith('regression-RC')));
332+
// This function crafts appropriate label, corresponding to regression stage and release version.
333+
function craftRegressionLabel(regressionStage: RegressionStage | undefined, releaseVersion: string | undefined): Label {
334+
switch (regressionStage) {
335+
case RegressionStage.Development:
336+
return {
337+
name: `regression-develop`,
338+
color: '5319E7', // violet
339+
description: `Regression bug that was found on development branch, but not yet present in production`,
340+
};
341+
342+
case RegressionStage.Testing:
343+
return {
344+
name: `regression-RC-${releaseVersion || '*'}`,
345+
color: '744C11', // orange
346+
description: releaseVersion ? `Regression bug that was found in release candidate (RC) for release ${releaseVersion}` : `TODO: Unknown release version. Please replace with correct 'regression-RC-x.y.z' label, where 'x.y.z' is the number of the release where bug was found.`,
347+
};
348+
349+
case RegressionStage.Beta:
350+
return {
351+
name: `regression-beta-${releaseVersion || '*'}`,
352+
color: 'D94A83', // pink
353+
description: releaseVersion ? `Regression bug that was found in beta in release ${releaseVersion}` : `TODO: Unknown release version. Please replace with correct 'regression-beta-x.y.z' label, where 'x.y.z' is the number of the release where bug was found.`,
354+
};
355+
356+
case RegressionStage.Production:
357+
return {
358+
name: `regression-prod-${releaseVersion || '*'}`,
359+
color: '5319E7', // violet
360+
description: releaseVersion ? `Regression bug that was found in production in release ${releaseVersion}` : `TODO: Unknown release version. Please replace with correct 'regression-prod-x.y.z' label, where 'x.y.z' is the number of the release where bug was found.`,
361+
};
362+
363+
default:
364+
return {
365+
name: `regression-*`,
366+
color: 'EDEDED', // grey
367+
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.`,
368+
};
369+
}
317370
}

CHANGELOG.md

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,50 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [11.16.15]
10+
### Changed
11+
- Updates MMI packages, support for a custodian has been removed ([#25502](https://github.com/MetaMask/metamask-extension/pull/25502))
12+
13+
### Fixed
14+
- Fix bug preventing connection of Trezor hardware wallets on firefox ([#25487](https://github.com/MetaMask/metamask-extension/pull/25487))
15+
16+
## [11.16.14]
17+
### Fixed
18+
- Fix bug that could result in failure of some swap transactions ([#25488](https://github.com/MetaMask/metamask-extension/pull/25488))
19+
20+
## [11.16.13]
21+
### Changed
22+
- Update Blockaid feature for latest security protections ([#25442](https://github.com/MetaMask/metamask-extension/pull/25442))
23+
24+
## [11.16.12]
25+
26+
## [11.16.11]
27+
### Fixed
28+
- Ensure network requests for phishing lists are not sent if the Basic Functionality Toggle is off ([#25306](https://github.com/MetaMask/metamask-extension/pull/25306))
29+
30+
## [11.16.10]
31+
### Fixed
32+
- Capture Segment errors during initialization ([#25253](https://github.com/MetaMask/metamask-extension/pull/25253))
33+
34+
## [11.16.9]
35+
### Fixed
36+
- Fix an issue where Snaps would be unable to decrypt older state ([#25172](https://github.com/MetaMask/metamask-extension/pull/25172))
37+
38+
## [11.16.8]
39+
### Changed
40+
- Prepare for increasing the minimum Chromium version supported by MetaMask ([#25142](https://github.com/MetaMask/metamask-extension/pull/25142))
41+
- Users on Chromium versions lower than 109 will now see a warning that they need to update their browser.
42+
Assuming their Chromium browser does not support the Offscreen Document api, the warning will include a note
43+
that Snaps and Hardware wallets do not work on their current browser version.
44+
- [MMI] Updates MMI packages to latest versions ([#24581](https://github.com/MetaMask/metamask-extension/pull/24581))
45+
46+
### Fixed
47+
- Fix bug that could cause users to be locked out of MetaMask if they previously emptied the "Auto-lock timer" advanced setting
48+
input field and save it in that empty state. ([#25109](https://github.com/MetaMask/metamask-extension/pull/25109))
49+
- Fix bug that can prevent updates to network data in connected dapps after manually switching the network in the wallet ui ([#25127](https://github.com/MetaMask/metamask-extension/pull/25127))
50+
- [MMI] Fixed an issue that prevented MMI transactions from being sent correctly ([#24947](https://github.com/MetaMask/metamask-extension/pull/24947))
51+
- [MMI] Better support for MMI Portfolio Dashboard with an update to the allow list ([#24992](https://github.com/MetaMask/metamask-extension/pull/24992))
52+
953
## [11.16.7]
1054
### Fixed
1155
- Fix bug that breaks dapps that expect users to switch chains manually([#25046]https://github.com/MetaMask/metamask-extension/pull/25046)
@@ -4785,7 +4829,15 @@ Update styles and spacing on the critical error page ([#20350](https://github.c
47854829
- Added the ability to restore accounts from seed words.
47864830

47874831

4788-
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.16.7...HEAD
4832+
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.16.15...HEAD
4833+
[11.16.15]: https://github.com/MetaMask/metamask-extension/compare/v11.16.14...v11.16.15
4834+
[11.16.14]: https://github.com/MetaMask/metamask-extension/compare/v11.16.13...v11.16.14
4835+
[11.16.13]: https://github.com/MetaMask/metamask-extension/compare/v11.16.12...v11.16.13
4836+
[11.16.12]: https://github.com/MetaMask/metamask-extension/compare/v11.16.11...v11.16.12
4837+
[11.16.11]: https://github.com/MetaMask/metamask-extension/compare/v11.16.10...v11.16.11
4838+
[11.16.10]: https://github.com/MetaMask/metamask-extension/compare/v11.16.9...v11.16.10
4839+
[11.16.9]: https://github.com/MetaMask/metamask-extension/compare/v11.16.8...v11.16.9
4840+
[11.16.8]: https://github.com/MetaMask/metamask-extension/compare/v11.16.7...v11.16.8
47894841
[11.16.7]: https://github.com/MetaMask/metamask-extension/compare/v11.16.6...v11.16.7
47904842
[11.16.6]: https://github.com/MetaMask/metamask-extension/compare/v11.16.5...v11.16.6
47914843
[11.16.5]: https://github.com/MetaMask/metamask-extension/compare/v11.16.4...v11.16.5

app/_locales/de/messages.json

Lines changed: 3 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/_locales/el/messages.json

Lines changed: 3 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)