Skip to content

Commit

Permalink
Merge branch 'chore-mobile-ux-codeowners' of github.com:MetaMask/meta…
Browse files Browse the repository at this point in the history
…mask-mobile into chore-mobile-ux-codeowners
  • Loading branch information
vinnyhoward committed Sep 27, 2024
2 parents 414e30e + fb6c0ed commit 6f5d2b3
Show file tree
Hide file tree
Showing 12 changed files with 1,373 additions and 211 deletions.
1 change: 1 addition & 0 deletions .github/scripts/bitrise/.yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ignore-scripts true
32 changes: 32 additions & 0 deletions .github/scripts/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "@metamask/mobile-ci-scripts",
"private": true,
"scripts": {
"add-release-label-to-pr-and-linked-issues": "ts-node ./add-release-label-to-pr-and-linked-issues.ts",
"fitness-functions": "ts-node ./fitness-functions/index.ts",
"check-pr-has-required-labels": "ts-node ./check-pr-has-required-labels.ts",
"close-release-bug-report-issue": "ts-node ./close-release-bug-report-issue.ts",
"check-template-and-add-labels": "ts-node ./check-template-and-add-labels.ts",
"run-bitrise-e2e-check": "ts-node ./bitrise/run-bitrise-e2e-check.ts"
},
"dependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"axios": "^1.7.4",
"simple-git": "^3.25.0"
},
"devDependencies": {
"@lavamoat/allow-scripts": "^3.2.0",
"@lavamoat/preinstall-always-fail": "^2.1.0",
"@types/node": "^20.16.2",
"ts-node": "^10.5.0",
"typescript": "~5.4.5"
},
"packageManager": "yarn@1.22.22",
"lavamoat": {
"allowScripts": {
"@lavamoat/preinstall-always-fail": false,
"ts-node>@swc/core": false
}
}
}
3 changes: 3 additions & 0 deletions .github/scripts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "../../tsconfig.json"
}
1,318 changes: 1,318 additions & 0 deletions .github/scripts/yarn.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion .github/workflows/add-release-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,22 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable
working-directory: '.github/scripts'

- name: Get the next semver version
id: get-next-semver-version
env:
FORCE_NEXT_SEMVER_VERSION: ${{ vars.FORCE_NEXT_SEMVER_VERSION }}
run: ./scripts/get-next-semver-version.sh "$FORCE_NEXT_SEMVER_VERSION"
working-directory: '.github/scripts'

- name: Add release label to PR and linked issues
id: add-release-label-to-pr-and-linked-issues
env:
RELEASE_LABEL_TOKEN: ${{ secrets.RELEASE_LABEL_TOKEN }}
NEXT_SEMVER_VERSION: ${{ env.NEXT_SEMVER_VERSION }}
run: yarn run add-release-label-to-pr-and-linked-issues
working-directory: '.github/scripts'
3 changes: 2 additions & 1 deletion .github/workflows/check-pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable
working-directory: '.github/scripts'

- name: Check PR has required labels
id: check-pr-has-required-labels
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn run check-pr-has-required-labels
working-directory: '.github/scripts'
3 changes: 2 additions & 1 deletion .github/workflows/check-template-and-add-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable
working-directory: '.github/scripts'

- name: Check template and add labels
id: check-template-and-add-labels
env:
LABEL_TOKEN: ${{ secrets.LABEL_TOKEN }}
run: npm run check-template-and-add-labels
working-directory: '.github/scripts'
3 changes: 2 additions & 1 deletion .github/workflows/close-bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable
working-directory: '.github/scripts'

- name: Close release bug report issue
id: close-release-bug-report-issue
env:
BUG_REPORT_REPO: mobile-planning
BUG_REPORT_TOKEN: ${{ secrets.BUG_REPORT_TOKEN }}
run: yarn run close-release-bug-report-issue
working-directory: '.github/scripts'
3 changes: 2 additions & 1 deletion .github/workflows/fitness-functions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable
working-directory: '.github/scripts'

- name: Run fitness functions
env:
Expand All @@ -33,3 +33,4 @@ jobs:
# then saved to a file called "diff".
git diff "$(git merge-base "origin/$BASE_REF" HEAD)" HEAD -- . > ./diff
yarn run fitness-functions -- "ci" "./diff"
working-directory: '.github/scripts'
3 changes: 2 additions & 1 deletion .github/workflows/run-bitrise-e2e-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable
working-directory: '.github/scripts'

- name: Check Bitrise E2E Status
env:
Expand All @@ -56,3 +56,4 @@ jobs:
# The status check created under this workflow may be bucketed under another check suite in Github actions. This is a result of workflows with the same triggers.
# For example, the status check may show as `CLA Signature Bot / Bitrise E2E Status`. This is a bug on Github's UI. https://github.com/orgs/community/discussions/24616
run: yarn run run-bitrise-e2e-check
working-directory: '.github/scripts'
13 changes: 2 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,6 @@
"prestorybook": "rnstl",
"deduplicate": "yarn yarn-deduplicate && yarn install",
"set-version": "./scripts/set-versions.sh",
"add-release-label-to-pr-and-linked-issues": "ts-node ./.github/scripts/add-release-label-to-pr-and-linked-issues.ts",
"run-bitrise-e2e-check": "ts-node ./.github/scripts/bitrise/run-bitrise-e2e-check.ts",
"fitness-functions": "ts-node ./.github/scripts/fitness-functions/index.ts",
"check-pr-has-required-labels": "ts-node ./.github/scripts/check-pr-has-required-labels.ts",
"close-release-bug-report-issue": "ts-node ./.github/scripts/close-release-bug-report-issue.ts",
"check-template-and-add-labels": "ts-node ./.github/scripts/check-template-and-add-labels.ts",
"patch:tx": "./scripts/patch-transaction-controller.sh",
"patch:assets": "./scripts/patch-assets-controllers.sh",
"patch:approval": "./scripts/patch-approval-controller.sh",
Expand Down Expand Up @@ -369,8 +363,6 @@
"zxcvbn": "4.4.2"
},
"devDependencies": {
"@actions/core": "^1.10.1",
"@actions/github": "^6.0.0",
"@babel/core": "^7.24.5",
"@babel/eslint-parser": "^7.25.1",
"@babel/preset-env": "^7.24.5",
Expand Down Expand Up @@ -496,8 +488,7 @@
"regenerator-runtime": "0.13.9",
"rn-nodeify": "10.3.0",
"serve-handler": "^6.1.5",
"simple-git": "^3.22.0",
"ts-node": "^10.5.0",
"simple-git": "^3.25.0",
"typescript": "~5.4.5",
"wdio-cucumberjs-json-reporter": "^4.4.3",
"webpack": "^5.88.2",
Expand Down Expand Up @@ -584,7 +575,7 @@
"husky": false,
"react-native-inappbrowser-reborn": false,
"react-native-svg-asset-plugin>sharp": true,
"ts-node>@swc/core": false,
"@storybook/builder-webpack5>@swc/core": false,
"@metamask/sdk-communication-layer>bufferutil": false,
"@metamask/sdk-communication-layer>utf-8-validate": false,
"detox>ws>bufferutil": false,
Expand Down
Loading

0 comments on commit 6f5d2b3

Please sign in to comment.