Skip to content

Commit d8bfc55

Browse files
committed
Merge remote-tracking branch 'upstream/main' into KJ21-ENG/90933-admin-invite-onboarding-v3
# Conflicts: # src/pages/inbox/ReportFetchHandler.tsx
2 parents cf3ce5b + 3c39afc commit d8bfc55

1,088 files changed

Lines changed: 60550 additions & 16545 deletions

File tree

Some content is hidden

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

.github/actions/javascript/getPullRequestIncrementalChanges/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12673,7 +12673,9 @@ class Git {
1267312673
}
1267412674
try {
1267512675
console.log(`🔄 Fetching missing ref: ${ref}`);
12676-
await exec(`git fetch ${remote} ${ref} --no-tags --depth=1 --quiet`);
12676+
// Only shallow-fetch in CI; a local --depth=1 fetch would convert a full clone into a shallow one.
12677+
const depthArg = IS_CI ? '--depth=1' : '';
12678+
await exec(`git fetch ${remote} ${ref} --no-tags --quiet ${depthArg}`);
1267712679
// Verify the ref is now available
1267812680
if (!this.isValidRef(ref)) {
1267912681
throw new Error(`Reference ${ref} is still not valid after fetching from remote ${remote}`);
@@ -12687,7 +12689,9 @@ class Git {
1268712689
const baseRefName = GITHUB_BASE_REF ?? 'main';
1268812690
// Fetch the main branch from the specified remote (or locally) to ensure it's available
1268912691
if (IS_CI || remote) {
12690-
await exec(`git fetch ${remote ?? 'origin'} ${baseRefName} --no-tags --depth=1`);
12692+
// Only shallow-fetch in CI; a local --depth=1 fetch would convert a full clone into a shallow one.
12693+
const depthArg = IS_CI ? '--depth=1' : '';
12694+
await exec(`git fetch ${remote ?? 'origin'} ${baseRefName} --no-tags ${depthArg}`);
1269112695
}
1269212696
// In CI, use a simpler approach - just use the remote main branch directly
1269312697
// This avoids issues with shallow clones and merge-base calculations

.github/actions/javascript/isDeployChecklistLocked/index.js

Lines changed: 27922 additions & 97 deletions
Large diffs are not rendered by default.

.github/libs/DeployChecklistUtils.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type {components as OctokitComponents} from '@octokit/openapi-types/types';
2-
import dedent from '@libs/StringUtils/dedent';
2+
import {Str} from 'expensify-common';
33
import CONST from './CONST';
44
import GithubUtils from './GithubUtils';
55

@@ -232,7 +232,7 @@ function getDeployChecklistData(issue: OctokitIssueItem): DeployChecklistData {
232232

233233
/**
234234
* Generate the issue body and assignees for a deploy checklist.
235-
* Accepts PR numbers directly (not URLs) to avoid unnecessary roundtripping.
235+
* Accepts PR numbers directly (not URLs) to avoid unnecessary round-tripping.
236236
*/
237237
async function generateDeployChecklistBodyAndAssignees({
238238
tag,
@@ -338,12 +338,14 @@ async function generateDeployChecklistBodyAndAssignees({
338338
// Deployer verifications
339339
const check = (checked: boolean) => (checked ? 'x' : ' ');
340340
sections.push(
341-
dedent(`
341+
Str.dedent(
342+
`
342343
**Deployer verifications:**
343344
- [${check(isSentryChecked)}] I checked [Sentry](https://expensify.sentry.io/releases/new.expensify%40${tag}/?project=4510228107427840&environment=staging) for **this release version** and verified that this release does not introduce any new crashes. More detailed instructions on this verification can be found [here](https://stackoverflowteams.com/c/expensify/questions/15095/15096).
344345
- [${check(isSentryChecked)}] I checked [Sentry](https://expensify.sentry.io/releases/new.expensify%40${previousTag}/?project=4510228107427840&environment=production) for **the previous release version** and verified that the release did not introduce any new crashes. Because mobile deploys use a phased rollout, completing this checklist will deploy the previous release version to 100% of users. More detailed instructions on this verification can be found [here](https://stackoverflowteams.com/c/expensify/questions/15095/15096).
345346
- [${check(isGHStatusChecked)}] I checked [GitHub Status](https://www.githubstatus.com/) and verified there is no reported incident with Actions.
346-
`).trimEnd(),
347+
`,
348+
).trimEnd(),
347349
);
348350

349351
// Footer
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Onyx.connectWithoutView reviewers
2+
3+
# Requests a review from the Onyx performance reviewers whenever a PR adds a new
4+
# `Onyx.connectWithoutView` call. CODEOWNERS can't express this because it triggers on file
5+
# paths, not on the content of a diff.
6+
7+
on:
8+
pull_request_target:
9+
types: [opened, synchronize, ready_for_review]
10+
11+
permissions:
12+
contents: read
13+
pull-requests: write
14+
issues: write
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
requestReviewers:
22+
name: Request reviewers for new Onyx.connectWithoutView calls
23+
if: ${{ github.event.pull_request.draft == false }}
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Request reviewers and leave a comment
27+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v7
28+
with:
29+
script: |
30+
const REVIEWERS = ['tgolen', 'mountiny', 'luacmartins'];
31+
const pr = context.payload.pull_request;
32+
const {owner, repo} = context.repo;
33+
34+
// Trigger only on a net-new call. We compare added vs. removed call lines per file (a call
35+
// matches `Onyx.connectWithoutView(`), so editing a call in place nets to zero, removed
36+
// comments/strings don't count, and a removal in one file can't mask a new call in another.
37+
const CALL = /Onyx\.connectWithoutView\s*\(/;
38+
const files = await github.paginate(github.rest.pulls.listFiles, {owner, repo, pull_number: pr.number});
39+
const addsNewCall = files.some((file) => {
40+
if (!file.patch) {
41+
return false;
42+
}
43+
let added = 0;
44+
let removed = 0;
45+
for (const line of file.patch.split('\n')) {
46+
if (line.startsWith('+') && !line.startsWith('+++') && CALL.test(line)) {
47+
added++;
48+
} else if (line.startsWith('-') && !line.startsWith('---') && CALL.test(line)) {
49+
removed++;
50+
}
51+
}
52+
return added > removed;
53+
});
54+
55+
if (!addsNewCall) {
56+
return;
57+
}
58+
59+
// Don't request the PR author on their own PR, anyone already requested, or anyone who
60+
// already reviewed — so re-runs on `synchronize` never create duplicate requests.
61+
const alreadyRequested = (pr.requested_reviewers ?? []).map((user) => user.login);
62+
const reviews = await github.paginate(github.rest.pulls.listReviews, {owner, repo, pull_number: pr.number});
63+
const alreadyReviewed = reviews.map((review) => review.user?.login).filter(Boolean);
64+
const skip = new Set([pr.user.login, ...alreadyRequested, ...alreadyReviewed]);
65+
const reviewersToRequest = REVIEWERS.filter((reviewer) => !skip.has(reviewer));
66+
67+
if (reviewersToRequest.length === 0) {
68+
return;
69+
}
70+
71+
await github.rest.pulls.requestReviewers({owner, repo, pull_number: pr.number, reviewers: reviewersToRequest});
72+
73+
const mentions = REVIEWERS.map((reviewer) => `@${reviewer}`).join(', ');
74+
await github.rest.issues.createComment({
75+
owner,
76+
repo,
77+
issue_number: pr.number,
78+
body: `This PR adds a new \`Onyx.connectWithoutView\` call, so I've requested a review from the Onyx performance reviewers (${mentions}) — a review from any one of them is enough. Please add a link in your PR description to the Slack discussion where the \`@frontend-performance\` team approved using \`connectWithoutView\` here.`,
79+
});

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ android {
111111
minSdkVersion rootProject.ext.minSdkVersion
112112
targetSdkVersion rootProject.ext.targetSdkVersion
113113
multiDexEnabled rootProject.ext.multiDexEnabled
114-
versionCode 1009042102
115-
versionName "9.4.21-2"
114+
versionCode 1009042600
115+
versionName "9.4.26-0"
116116
// Supported language variants must be declared here to avoid from being removed during the compilation.
117117
// This also helps us to not include unnecessary language variants in the APK.
118118
resConfigs "en", "es"

android/app/src/debug/AndroidManifest.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,12 @@
44

55
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
66
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS"/>
7-
<application android:usesCleartextTraffic="true" tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" />
7+
<!-- Debug builds use a pin-free network security config so local dev servers and debugging
8+
proxies keep working. tools:replace overrides the release config from the main manifest. -->
9+
<application
10+
android:networkSecurityConfig="@xml/network_security_config_debug"
11+
android:usesCleartextTraffic="true"
12+
tools:targetApi="28"
13+
tools:ignore="GoogleAppIndexingWarning"
14+
tools:replace="android:networkSecurityConfig" />
815
</manifest>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!--
3+
Debug-only network security config. Intentionally contains NO <pin-set> so that local
4+
development against dev/proxy/ngrok servers (and debugging proxies such as Charles/Proxyman)
5+
keeps working. Permits cleartext traffic and trusts user-installed CA certificates.
6+
7+
Release builds use res/xml/network_security_config.xml (monitor-only, no <pin-set>) or
8+
network_security_config_enforce.xml when enforcePinning is enabled.
9+
-->
10+
<network-security-config>
11+
<base-config cleartextTrafficPermitted="true">
12+
<trust-anchors>
13+
<certificates src="system" />
14+
<certificates src="user" />
15+
</trust-anchors>
16+
</base-config>
17+
</network-security-config>

android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
android:hardwareAccelerated="true"
2222
android:icon="@mipmap/ic_launcher"
2323
android:label="@string/app_name"
24+
android:networkSecurityConfig="@xml/network_security_config"
2425
android:resizeableActivity="false"
2526
android:supportsRtl="false"
2627
android:theme="@style/AppTheme"

0 commit comments

Comments
 (0)