Skip to content

Commit b9b9d2a

Browse files
authored
Merge branch 'Expensify:main' into fix-Unable-to-add-unreported-expense-to-IOU
2 parents 1008065 + ccfdb74 commit b9b9d2a

412 files changed

Lines changed: 10673 additions & 5116 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.

.eslintrc.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,14 @@ module.exports = {
277277
property: 'isHybridApp',
278278
message: 'Use CONFIG.IS_HYBRID_APP instead.',
279279
},
280+
// Prevent direct use of HybridAppModule.closeReactNativeApp().
281+
// Instead, use the `closeReactNativeApp` action from `@userActions/HybridApp`,
282+
// which correctly updates `hybridApp.closingReactNativeApp` when closing NewDot
283+
{
284+
object: 'HybridAppModule',
285+
property: 'closeReactNativeApp',
286+
message: 'Use `closeReactNativeApp` from `@userActions/HybridApp` instead.',
287+
},
280288
],
281289
'no-restricted-imports': [
282290
'error',

.github/actions/javascript/authorChecklist/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15545,8 +15545,8 @@ exports["default"] = newComponentCategory;
1554515545
Object.defineProperty(exports, "__esModule", ({ value: true }));
1554615546
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
1554715547
const GIT_CONST = {
15548-
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
15549-
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
15548+
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER ?? 'Expensify',
15549+
APP_REPO: (process.env.GITHUB_REPOSITORY ?? 'Expensify/App').split('/').at(1) ?? '',
1555015550
MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
1555115551
};
1555215552
const CONST = {
@@ -16045,6 +16045,24 @@ class GithubUtils {
1604516045
})
1604616046
.then((response) => response.url);
1604716047
}
16048+
/**
16049+
* Get the contents of a file from the API at a given ref as a string.
16050+
*/
16051+
static async getFileContents(path, ref = 'main') {
16052+
const { data } = await this.octokit.repos.getContent({
16053+
owner: CONST_1.default.GITHUB_OWNER,
16054+
repo: CONST_1.default.APP_REPO,
16055+
path,
16056+
ref,
16057+
});
16058+
if (Array.isArray(data)) {
16059+
throw new Error(`Provided path ${path} refers to a directory, not a file`);
16060+
}
16061+
if (!('content' in data)) {
16062+
throw new Error(`Provided path ${path} is invalid`);
16063+
}
16064+
return Buffer.from(data.content, 'base64').toString('utf8');
16065+
}
1604816066
/**
1604916067
* Get commits between two tags via the GitHub API
1605016068
*/

.github/actions/javascript/awaitStagingDeploys/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12319,8 +12319,8 @@ exports.getStringInput = getStringInput;
1231912319
Object.defineProperty(exports, "__esModule", ({ value: true }));
1232012320
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
1232112321
const GIT_CONST = {
12322-
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
12323-
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
12322+
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER ?? 'Expensify',
12323+
APP_REPO: (process.env.GITHUB_REPOSITORY ?? 'Expensify/App').split('/').at(1) ?? '',
1232412324
MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
1232512325
};
1232612326
const CONST = {
@@ -12819,6 +12819,24 @@ class GithubUtils {
1281912819
})
1282012820
.then((response) => response.url);
1282112821
}
12822+
/**
12823+
* Get the contents of a file from the API at a given ref as a string.
12824+
*/
12825+
static async getFileContents(path, ref = 'main') {
12826+
const { data } = await this.octokit.repos.getContent({
12827+
owner: CONST_1.default.GITHUB_OWNER,
12828+
repo: CONST_1.default.APP_REPO,
12829+
path,
12830+
ref,
12831+
});
12832+
if (Array.isArray(data)) {
12833+
throw new Error(`Provided path ${path} refers to a directory, not a file`);
12834+
}
12835+
if (!('content' in data)) {
12836+
throw new Error(`Provided path ${path} is invalid`);
12837+
}
12838+
return Buffer.from(data.content, 'base64').toString('utf8');
12839+
}
1282212840
/**
1282312841
* Get commits between two tags via the GitHub API
1282412842
*/

.github/actions/javascript/checkAndroidStatus/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -737038,8 +737038,8 @@ checkAndroidStatus()
737038737038
Object.defineProperty(exports, "__esModule", ({ value: true }));
737039737039
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
737040737040
const GIT_CONST = {
737041-
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
737042-
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
737041+
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER ?? 'Expensify',
737042+
APP_REPO: (process.env.GITHUB_REPOSITORY ?? 'Expensify/App').split('/').at(1) ?? '',
737043737043
MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
737044737044
};
737045737045
const CONST = {
@@ -737538,6 +737538,24 @@ class GithubUtils {
737538737538
})
737539737539
.then((response) => response.url);
737540737540
}
737541+
/**
737542+
* Get the contents of a file from the API at a given ref as a string.
737543+
*/
737544+
static async getFileContents(path, ref = 'main') {
737545+
const { data } = await this.octokit.repos.getContent({
737546+
owner: CONST_1.default.GITHUB_OWNER,
737547+
repo: CONST_1.default.APP_REPO,
737548+
path,
737549+
ref,
737550+
});
737551+
if (Array.isArray(data)) {
737552+
throw new Error(`Provided path ${path} refers to a directory, not a file`);
737553+
}
737554+
if (!('content' in data)) {
737555+
throw new Error(`Provided path ${path} is invalid`);
737556+
}
737557+
return Buffer.from(data.content, 'base64').toString('utf8');
737558+
}
737541737559
/**
737542737560
* Get commits between two tags via the GitHub API
737543737561
*/

.github/actions/javascript/checkDeployBlockers/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11602,8 +11602,8 @@ exports["default"] = run;
1160211602
Object.defineProperty(exports, "__esModule", ({ value: true }));
1160311603
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
1160411604
const GIT_CONST = {
11605-
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
11606-
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
11605+
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER ?? 'Expensify',
11606+
APP_REPO: (process.env.GITHUB_REPOSITORY ?? 'Expensify/App').split('/').at(1) ?? '',
1160711607
MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
1160811608
};
1160911609
const CONST = {
@@ -12102,6 +12102,24 @@ class GithubUtils {
1210212102
})
1210312103
.then((response) => response.url);
1210412104
}
12105+
/**
12106+
* Get the contents of a file from the API at a given ref as a string.
12107+
*/
12108+
static async getFileContents(path, ref = 'main') {
12109+
const { data } = await this.octokit.repos.getContent({
12110+
owner: CONST_1.default.GITHUB_OWNER,
12111+
repo: CONST_1.default.APP_REPO,
12112+
path,
12113+
ref,
12114+
});
12115+
if (Array.isArray(data)) {
12116+
throw new Error(`Provided path ${path} refers to a directory, not a file`);
12117+
}
12118+
if (!('content' in data)) {
12119+
throw new Error(`Provided path ${path} is invalid`);
12120+
}
12121+
return Buffer.from(data.content, 'base64').toString('utf8');
12122+
}
1210512123
/**
1210612124
* Get commits between two tags via the GitHub API
1210712125
*/

.github/actions/javascript/createOrUpdateStagingDeploy/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11668,8 +11668,8 @@ exports["default"] = run;
1166811668
Object.defineProperty(exports, "__esModule", ({ value: true }));
1166911669
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
1167011670
const GIT_CONST = {
11671-
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
11672-
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
11671+
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER ?? 'Expensify',
11672+
APP_REPO: (process.env.GITHUB_REPOSITORY ?? 'Expensify/App').split('/').at(1) ?? '',
1167311673
MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
1167411674
};
1167511675
const CONST = {
@@ -12406,6 +12406,24 @@ class GithubUtils {
1240612406
})
1240712407
.then((response) => response.url);
1240812408
}
12409+
/**
12410+
* Get the contents of a file from the API at a given ref as a string.
12411+
*/
12412+
static async getFileContents(path, ref = 'main') {
12413+
const { data } = await this.octokit.repos.getContent({
12414+
owner: CONST_1.default.GITHUB_OWNER,
12415+
repo: CONST_1.default.APP_REPO,
12416+
path,
12417+
ref,
12418+
});
12419+
if (Array.isArray(data)) {
12420+
throw new Error(`Provided path ${path} refers to a directory, not a file`);
12421+
}
12422+
if (!('content' in data)) {
12423+
throw new Error(`Provided path ${path} is invalid`);
12424+
}
12425+
return Buffer.from(data.content, 'base64').toString('utf8');
12426+
}
1240912427
/**
1241012428
* Get commits between two tags via the GitHub API
1241112429
*/

.github/actions/javascript/getArtifactInfo/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11563,8 +11563,8 @@ exports["default"] = run;
1156311563
Object.defineProperty(exports, "__esModule", ({ value: true }));
1156411564
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
1156511565
const GIT_CONST = {
11566-
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
11567-
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
11566+
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER ?? 'Expensify',
11567+
APP_REPO: (process.env.GITHUB_REPOSITORY ?? 'Expensify/App').split('/').at(1) ?? '',
1156811568
MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
1156911569
};
1157011570
const CONST = {
@@ -12063,6 +12063,24 @@ class GithubUtils {
1206312063
})
1206412064
.then((response) => response.url);
1206512065
}
12066+
/**
12067+
* Get the contents of a file from the API at a given ref as a string.
12068+
*/
12069+
static async getFileContents(path, ref = 'main') {
12070+
const { data } = await this.octokit.repos.getContent({
12071+
owner: CONST_1.default.GITHUB_OWNER,
12072+
repo: CONST_1.default.APP_REPO,
12073+
path,
12074+
ref,
12075+
});
12076+
if (Array.isArray(data)) {
12077+
throw new Error(`Provided path ${path} refers to a directory, not a file`);
12078+
}
12079+
if (!('content' in data)) {
12080+
throw new Error(`Provided path ${path} is invalid`);
12081+
}
12082+
return Buffer.from(data.content, 'base64').toString('utf8');
12083+
}
1206612084
/**
1206712085
* Get commits between two tags via the GitHub API
1206812086
*/

.github/actions/javascript/getDeployPullRequestList/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11705,8 +11705,8 @@ exports.getStringInput = getStringInput;
1170511705
Object.defineProperty(exports, "__esModule", ({ value: true }));
1170611706
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
1170711707
const GIT_CONST = {
11708-
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
11709-
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
11708+
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER ?? 'Expensify',
11709+
APP_REPO: (process.env.GITHUB_REPOSITORY ?? 'Expensify/App').split('/').at(1) ?? '',
1171011710
MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
1171111711
};
1171211712
const CONST = {
@@ -12443,6 +12443,24 @@ class GithubUtils {
1244312443
})
1244412444
.then((response) => response.url);
1244512445
}
12446+
/**
12447+
* Get the contents of a file from the API at a given ref as a string.
12448+
*/
12449+
static async getFileContents(path, ref = 'main') {
12450+
const { data } = await this.octokit.repos.getContent({
12451+
owner: CONST_1.default.GITHUB_OWNER,
12452+
repo: CONST_1.default.APP_REPO,
12453+
path,
12454+
ref,
12455+
});
12456+
if (Array.isArray(data)) {
12457+
throw new Error(`Provided path ${path} refers to a directory, not a file`);
12458+
}
12459+
if (!('content' in data)) {
12460+
throw new Error(`Provided path ${path} is invalid`);
12461+
}
12462+
return Buffer.from(data.content, 'base64').toString('utf8');
12463+
}
1244612464
/**
1244712465
* Get commits between two tags via the GitHub API
1244812466
*/

.github/actions/javascript/getPreviousVersion/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11560,8 +11560,8 @@ exports["default"] = run;
1156011560
Object.defineProperty(exports, "__esModule", ({ value: true }));
1156111561
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
1156211562
const GIT_CONST = {
11563-
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
11564-
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
11563+
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER ?? 'Expensify',
11564+
APP_REPO: (process.env.GITHUB_REPOSITORY ?? 'Expensify/App').split('/').at(1) ?? '',
1156511565
MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
1156611566
};
1156711567
const CONST = {
@@ -12298,6 +12298,24 @@ class GithubUtils {
1229812298
})
1229912299
.then((response) => response.url);
1230012300
}
12301+
/**
12302+
* Get the contents of a file from the API at a given ref as a string.
12303+
*/
12304+
static async getFileContents(path, ref = 'main') {
12305+
const { data } = await this.octokit.repos.getContent({
12306+
owner: CONST_1.default.GITHUB_OWNER,
12307+
repo: CONST_1.default.APP_REPO,
12308+
path,
12309+
ref,
12310+
});
12311+
if (Array.isArray(data)) {
12312+
throw new Error(`Provided path ${path} refers to a directory, not a file`);
12313+
}
12314+
if (!('content' in data)) {
12315+
throw new Error(`Provided path ${path} is invalid`);
12316+
}
12317+
return Buffer.from(data.content, 'base64').toString('utf8');
12318+
}
1230112319
/**
1230212320
* Get commits between two tags via the GitHub API
1230312321
*/

.github/actions/javascript/getPullRequestDetails/index.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11666,8 +11666,8 @@ exports.getStringInput = getStringInput;
1166611666
Object.defineProperty(exports, "__esModule", ({ value: true }));
1166711667
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)');
1166811668
const GIT_CONST = {
11669-
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER,
11670-
APP_REPO: process.env.GITHUB_REPOSITORY.split('/').at(1) ?? '',
11669+
GITHUB_OWNER: process.env.GITHUB_REPOSITORY_OWNER ?? 'Expensify',
11670+
APP_REPO: (process.env.GITHUB_REPOSITORY ?? 'Expensify/App').split('/').at(1) ?? '',
1167111671
MOBILE_EXPENSIFY_REPO: 'Mobile-Expensify',
1167211672
};
1167311673
const CONST = {
@@ -12166,6 +12166,24 @@ class GithubUtils {
1216612166
})
1216712167
.then((response) => response.url);
1216812168
}
12169+
/**
12170+
* Get the contents of a file from the API at a given ref as a string.
12171+
*/
12172+
static async getFileContents(path, ref = 'main') {
12173+
const { data } = await this.octokit.repos.getContent({
12174+
owner: CONST_1.default.GITHUB_OWNER,
12175+
repo: CONST_1.default.APP_REPO,
12176+
path,
12177+
ref,
12178+
});
12179+
if (Array.isArray(data)) {
12180+
throw new Error(`Provided path ${path} refers to a directory, not a file`);
12181+
}
12182+
if (!('content' in data)) {
12183+
throw new Error(`Provided path ${path} is invalid`);
12184+
}
12185+
return Buffer.from(data.content, 'base64').toString('utf8');
12186+
}
1216912187
/**
1217012188
* Get commits between two tags via the GitHub API
1217112189
*/

0 commit comments

Comments
 (0)