Skip to content

Commit d0c7280

Browse files
committed
Merge branch 'main' of https://github.com/Expensify/App into fix/60633-global-vbba-followup
2 parents 3090f8c + f62ec5e commit d0c7280

File tree

186 files changed

+16711
-3840
lines changed

Some content is hidden

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

186 files changed

+16711
-3840
lines changed

.github/actions/composite/announceFailedWorkflowInSlack/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ inputs:
1313
runs:
1414
using: composite
1515
steps:
16-
- uses: 8398a7/action-slack@v3
16+
- uses: 8398a7/action-slack@1750b5085f3ec60384090fb7c52965ef822e869e
1717
name: Job failed Slack notification
1818
with:
1919
status: custom

.github/actions/composite/setupNode/action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ runs:
2323
shell: bash
2424
run: jq 'del(.version, .packages[""].version)' package-lock.json > normalized-package-lock.json
2525

26-
- uses: actions/setup-node@v4
26+
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e #v4
2727
with:
2828
node-version-file: '.nvmrc'
2929
cache: npm

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

+102
Original file line numberDiff line numberDiff line change
@@ -6748,6 +6748,79 @@ exports.throttling = throttling;
67486748
//# sourceMappingURL=index.js.map
67496749

67506750

6751+
/***/ }),
6752+
6753+
/***/ 537:
6754+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
6755+
6756+
"use strict";
6757+
6758+
6759+
Object.defineProperty(exports, "__esModule", ({ value: true }));
6760+
6761+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
6762+
6763+
var deprecation = __nccwpck_require__(8932);
6764+
var once = _interopDefault(__nccwpck_require__(1223));
6765+
6766+
const logOnceCode = once(deprecation => console.warn(deprecation));
6767+
const logOnceHeaders = once(deprecation => console.warn(deprecation));
6768+
/**
6769+
* Error with extra properties to help with debugging
6770+
*/
6771+
class RequestError extends Error {
6772+
constructor(message, statusCode, options) {
6773+
super(message);
6774+
// Maintains proper stack trace (only available on V8)
6775+
/* istanbul ignore next */
6776+
if (Error.captureStackTrace) {
6777+
Error.captureStackTrace(this, this.constructor);
6778+
}
6779+
this.name = "HttpError";
6780+
this.status = statusCode;
6781+
let headers;
6782+
if ("headers" in options && typeof options.headers !== "undefined") {
6783+
headers = options.headers;
6784+
}
6785+
if ("response" in options) {
6786+
this.response = options.response;
6787+
headers = options.response.headers;
6788+
}
6789+
// redact request credentials without mutating original request options
6790+
const requestCopy = Object.assign({}, options.request);
6791+
if (options.request.headers.authorization) {
6792+
requestCopy.headers = Object.assign({}, options.request.headers, {
6793+
authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]")
6794+
});
6795+
}
6796+
requestCopy.url = requestCopy.url
6797+
// client_id & client_secret can be passed as URL query parameters to increase rate limit
6798+
// see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications
6799+
.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]")
6800+
// OAuth tokens can be passed as URL query parameters, although it is not recommended
6801+
// see https://developer.github.com/v3/#oauth2-token-sent-in-a-header
6802+
.replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
6803+
this.request = requestCopy;
6804+
// deprecations
6805+
Object.defineProperty(this, "code", {
6806+
get() {
6807+
logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
6808+
return statusCode;
6809+
}
6810+
});
6811+
Object.defineProperty(this, "headers", {
6812+
get() {
6813+
logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));
6814+
return headers || {};
6815+
}
6816+
});
6817+
}
6818+
}
6819+
6820+
exports.RequestError = RequestError;
6821+
//# sourceMappingURL=index.js.map
6822+
6823+
67516824
/***/ }),
67526825

67536826
/***/ 3682:
@@ -15536,6 +15609,7 @@ const core = __importStar(__nccwpck_require__(2186));
1553615609
const utils_1 = __nccwpck_require__(3030);
1553715610
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
1553815611
const plugin_throttling_1 = __nccwpck_require__(9968);
15612+
const request_error_1 = __nccwpck_require__(537);
1553915613
const EmptyObject_1 = __nccwpck_require__(8227);
1554015614
const arrayDifference_1 = __importDefault(__nccwpck_require__(7034));
1554115615
const CONST_1 = __importDefault(__nccwpck_require__(9873));
@@ -15958,6 +16032,34 @@ class GithubUtils {
1595816032
})
1595916033
.then((response) => response.url);
1596016034
}
16035+
/**
16036+
* Get commits between two tags via the GitHub API
16037+
*/
16038+
static async getCommitHistoryBetweenTags(fromTag, toTag) {
16039+
console.log('Getting pull requests merged between the following tags:', fromTag, toTag);
16040+
try {
16041+
const { data: comparison } = await this.octokit.repos.compareCommits({
16042+
owner: CONST_1.default.GITHUB_OWNER,
16043+
repo: CONST_1.default.APP_REPO,
16044+
base: fromTag,
16045+
head: toTag,
16046+
});
16047+
// Map API response to our CommitType format
16048+
return comparison.commits.map((commit) => ({
16049+
commit: commit.sha,
16050+
subject: commit.commit.message,
16051+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
16052+
authorName: commit.commit.author?.name || 'Unknown',
16053+
}));
16054+
}
16055+
catch (error) {
16056+
if (error instanceof request_error_1.RequestError && error.status === 404) {
16057+
console.error(`❓❓ Failed to compare commits with the GitHub API. The base tag ('${fromTag}') or head tag ('${toTag}') likely doesn't exist on the remote repository. If this is the case, create or push them. 💡💡`);
16058+
}
16059+
// Re-throw the error after logging
16060+
throw error;
16061+
}
16062+
}
1596116063
}
1596216064
exports["default"] = GithubUtils;
1596316065

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

+102
Original file line numberDiff line numberDiff line change
@@ -4730,6 +4730,79 @@ exports.throttling = throttling;
47304730
//# sourceMappingURL=index.js.map
47314731

47324732

4733+
/***/ }),
4734+
4735+
/***/ 537:
4736+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4737+
4738+
"use strict";
4739+
4740+
4741+
Object.defineProperty(exports, "__esModule", ({ value: true }));
4742+
4743+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4744+
4745+
var deprecation = __nccwpck_require__(8932);
4746+
var once = _interopDefault(__nccwpck_require__(1223));
4747+
4748+
const logOnceCode = once(deprecation => console.warn(deprecation));
4749+
const logOnceHeaders = once(deprecation => console.warn(deprecation));
4750+
/**
4751+
* Error with extra properties to help with debugging
4752+
*/
4753+
class RequestError extends Error {
4754+
constructor(message, statusCode, options) {
4755+
super(message);
4756+
// Maintains proper stack trace (only available on V8)
4757+
/* istanbul ignore next */
4758+
if (Error.captureStackTrace) {
4759+
Error.captureStackTrace(this, this.constructor);
4760+
}
4761+
this.name = "HttpError";
4762+
this.status = statusCode;
4763+
let headers;
4764+
if ("headers" in options && typeof options.headers !== "undefined") {
4765+
headers = options.headers;
4766+
}
4767+
if ("response" in options) {
4768+
this.response = options.response;
4769+
headers = options.response.headers;
4770+
}
4771+
// redact request credentials without mutating original request options
4772+
const requestCopy = Object.assign({}, options.request);
4773+
if (options.request.headers.authorization) {
4774+
requestCopy.headers = Object.assign({}, options.request.headers, {
4775+
authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]")
4776+
});
4777+
}
4778+
requestCopy.url = requestCopy.url
4779+
// client_id & client_secret can be passed as URL query parameters to increase rate limit
4780+
// see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications
4781+
.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]")
4782+
// OAuth tokens can be passed as URL query parameters, although it is not recommended
4783+
// see https://developer.github.com/v3/#oauth2-token-sent-in-a-header
4784+
.replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
4785+
this.request = requestCopy;
4786+
// deprecations
4787+
Object.defineProperty(this, "code", {
4788+
get() {
4789+
logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
4790+
return statusCode;
4791+
}
4792+
});
4793+
Object.defineProperty(this, "headers", {
4794+
get() {
4795+
logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));
4796+
return headers || {};
4797+
}
4798+
});
4799+
}
4800+
}
4801+
4802+
exports.RequestError = RequestError;
4803+
//# sourceMappingURL=index.js.map
4804+
4805+
47334806
/***/ }),
47344807

47354808
/***/ 3682:
@@ -12329,6 +12402,7 @@ const core = __importStar(__nccwpck_require__(2186));
1232912402
const utils_1 = __nccwpck_require__(3030);
1233012403
const plugin_paginate_rest_1 = __nccwpck_require__(4193);
1233112404
const plugin_throttling_1 = __nccwpck_require__(9968);
12405+
const request_error_1 = __nccwpck_require__(537);
1233212406
const EmptyObject_1 = __nccwpck_require__(8227);
1233312407
const arrayDifference_1 = __importDefault(__nccwpck_require__(7034));
1233412408
const CONST_1 = __importDefault(__nccwpck_require__(9873));
@@ -12751,6 +12825,34 @@ class GithubUtils {
1275112825
})
1275212826
.then((response) => response.url);
1275312827
}
12828+
/**
12829+
* Get commits between two tags via the GitHub API
12830+
*/
12831+
static async getCommitHistoryBetweenTags(fromTag, toTag) {
12832+
console.log('Getting pull requests merged between the following tags:', fromTag, toTag);
12833+
try {
12834+
const { data: comparison } = await this.octokit.repos.compareCommits({
12835+
owner: CONST_1.default.GITHUB_OWNER,
12836+
repo: CONST_1.default.APP_REPO,
12837+
base: fromTag,
12838+
head: toTag,
12839+
});
12840+
// Map API response to our CommitType format
12841+
return comparison.commits.map((commit) => ({
12842+
commit: commit.sha,
12843+
subject: commit.commit.message,
12844+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
12845+
authorName: commit.commit.author?.name || 'Unknown',
12846+
}));
12847+
}
12848+
catch (error) {
12849+
if (error instanceof request_error_1.RequestError && error.status === 404) {
12850+
console.error(`❓❓ Failed to compare commits with the GitHub API. The base tag ('${fromTag}') or head tag ('${toTag}') likely doesn't exist on the remote repository. If this is the case, create or push them. 💡💡`);
12851+
}
12852+
// Re-throw the error after logging
12853+
throw error;
12854+
}
12855+
}
1275412856
}
1275512857
exports["default"] = GithubUtils;
1275612858

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

+102
Original file line numberDiff line numberDiff line change
@@ -4730,6 +4730,79 @@ exports.throttling = throttling;
47304730
//# sourceMappingURL=index.js.map
47314731

47324732

4733+
/***/ }),
4734+
4735+
/***/ 10537:
4736+
/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
4737+
4738+
"use strict";
4739+
4740+
4741+
Object.defineProperty(exports, "__esModule", ({ value: true }));
4742+
4743+
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4744+
4745+
var deprecation = __nccwpck_require__(58932);
4746+
var once = _interopDefault(__nccwpck_require__(1223));
4747+
4748+
const logOnceCode = once(deprecation => console.warn(deprecation));
4749+
const logOnceHeaders = once(deprecation => console.warn(deprecation));
4750+
/**
4751+
* Error with extra properties to help with debugging
4752+
*/
4753+
class RequestError extends Error {
4754+
constructor(message, statusCode, options) {
4755+
super(message);
4756+
// Maintains proper stack trace (only available on V8)
4757+
/* istanbul ignore next */
4758+
if (Error.captureStackTrace) {
4759+
Error.captureStackTrace(this, this.constructor);
4760+
}
4761+
this.name = "HttpError";
4762+
this.status = statusCode;
4763+
let headers;
4764+
if ("headers" in options && typeof options.headers !== "undefined") {
4765+
headers = options.headers;
4766+
}
4767+
if ("response" in options) {
4768+
this.response = options.response;
4769+
headers = options.response.headers;
4770+
}
4771+
// redact request credentials without mutating original request options
4772+
const requestCopy = Object.assign({}, options.request);
4773+
if (options.request.headers.authorization) {
4774+
requestCopy.headers = Object.assign({}, options.request.headers, {
4775+
authorization: options.request.headers.authorization.replace(/ .*$/, " [REDACTED]")
4776+
});
4777+
}
4778+
requestCopy.url = requestCopy.url
4779+
// client_id & client_secret can be passed as URL query parameters to increase rate limit
4780+
// see https://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications
4781+
.replace(/\bclient_secret=\w+/g, "client_secret=[REDACTED]")
4782+
// OAuth tokens can be passed as URL query parameters, although it is not recommended
4783+
// see https://developer.github.com/v3/#oauth2-token-sent-in-a-header
4784+
.replace(/\baccess_token=\w+/g, "access_token=[REDACTED]");
4785+
this.request = requestCopy;
4786+
// deprecations
4787+
Object.defineProperty(this, "code", {
4788+
get() {
4789+
logOnceCode(new deprecation.Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`."));
4790+
return statusCode;
4791+
}
4792+
});
4793+
Object.defineProperty(this, "headers", {
4794+
get() {
4795+
logOnceHeaders(new deprecation.Deprecation("[@octokit/request-error] `error.headers` is deprecated, use `error.response.headers`."));
4796+
return headers || {};
4797+
}
4798+
});
4799+
}
4800+
}
4801+
4802+
exports.RequestError = RequestError;
4803+
//# sourceMappingURL=index.js.map
4804+
4805+
47334806
/***/ }),
47344807

47354808
/***/ 26463:
@@ -737024,6 +737097,7 @@ const core = __importStar(__nccwpck_require__(42186));
737024737097
const utils_1 = __nccwpck_require__(73030);
737025737098
const plugin_paginate_rest_1 = __nccwpck_require__(64193);
737026737099
const plugin_throttling_1 = __nccwpck_require__(9968);
737100+
const request_error_1 = __nccwpck_require__(10537);
737027737101
const EmptyObject_1 = __nccwpck_require__(58227);
737028737102
const arrayDifference_1 = __importDefault(__nccwpck_require__(97034));
737029737103
const CONST_1 = __importDefault(__nccwpck_require__(29873));
@@ -737446,6 +737520,34 @@ class GithubUtils {
737446737520
})
737447737521
.then((response) => response.url);
737448737522
}
737523+
/**
737524+
* Get commits between two tags via the GitHub API
737525+
*/
737526+
static async getCommitHistoryBetweenTags(fromTag, toTag) {
737527+
console.log('Getting pull requests merged between the following tags:', fromTag, toTag);
737528+
try {
737529+
const { data: comparison } = await this.octokit.repos.compareCommits({
737530+
owner: CONST_1.default.GITHUB_OWNER,
737531+
repo: CONST_1.default.APP_REPO,
737532+
base: fromTag,
737533+
head: toTag,
737534+
});
737535+
// Map API response to our CommitType format
737536+
return comparison.commits.map((commit) => ({
737537+
commit: commit.sha,
737538+
subject: commit.commit.message,
737539+
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
737540+
authorName: commit.commit.author?.name || 'Unknown',
737541+
}));
737542+
}
737543+
catch (error) {
737544+
if (error instanceof request_error_1.RequestError && error.status === 404) {
737545+
console.error(`❓❓ Failed to compare commits with the GitHub API. The base tag ('${fromTag}') or head tag ('${toTag}') likely doesn't exist on the remote repository. If this is the case, create or push them. 💡💡`);
737546+
}
737547+
// Re-throw the error after logging
737548+
throw error;
737549+
}
737550+
}
737449737551
}
737450737552
exports["default"] = GithubUtils;
737451737553

0 commit comments

Comments
 (0)