-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Expensify:main' into krishna2323/regression/39083/39178
- Loading branch information
Showing
451 changed files
with
11,452 additions
and
25,403 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
# Every PR gets a review from an internal Expensify engineer | ||
* @Expensify/pullerbear | ||
|
||
# Assign the Design team to review changes to our styles & assets | ||
src/styles/ @Expensify/design @Expensify/pullerbear | ||
assets/ @Expensify/design @Expensify/pullerbear |
2 changes: 1 addition & 1 deletion
2
.github/actions/javascript/authorChecklist/categories/newComponentCategory.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,30 +4,6 @@ | |
/******/ (() => { // webpackBootstrap | ||
/******/ var __webpack_modules__ = ({ | ||
|
||
/***/ 4097: | ||
/***/ ((module) => { | ||
|
||
const CONST = { | ||
GITHUB_OWNER: 'Expensify', | ||
APP_REPO: 'App', | ||
APPLAUSE_BOT: 'applausebot', | ||
OS_BOTIFY: 'OSBotify', | ||
LABELS: { | ||
STAGING_DEPLOY: 'StagingDeployCash', | ||
DEPLOY_BLOCKER: 'DeployBlockerCash', | ||
INTERNAL_QA: 'InternalQA', | ||
}, | ||
DATE_FORMAT_STRING: 'yyyy-MM-dd', | ||
}; | ||
|
||
CONST.APP_REPO_URL = `https://github.com/${CONST.GITHUB_OWNER}/${CONST.APP_REPO}`; | ||
CONST.APP_REPO_GIT_URL = `[email protected]:${CONST.GITHUB_OWNER}/${CONST.APP_REPO}.git`; | ||
|
||
module.exports = CONST; | ||
|
||
|
||
/***/ }), | ||
|
||
/***/ 7351: | ||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { | ||
|
||
|
@@ -16617,7 +16593,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); | |
const core = __importStar(__nccwpck_require__(2186)); | ||
const github = __importStar(__nccwpck_require__(5438)); | ||
const escapeRegExp_1 = __importDefault(__nccwpck_require__(8415)); | ||
const CONST_1 = __importDefault(__nccwpck_require__(4097)); | ||
const CONST_1 = __importDefault(__nccwpck_require__(9873)); | ||
const GithubUtils_1 = __importDefault(__nccwpck_require__(9296)); | ||
const newComponentCategory_1 = __importDefault(__nccwpck_require__(9032)); | ||
const pathToAuthorChecklist = `https://raw.githubusercontent.com/${CONST_1.default.GITHUB_OWNER}/${CONST_1.default.APP_REPO}/main/.github/PULL_REQUEST_TEMPLATE.md`; | ||
|
@@ -16762,15 +16738,38 @@ exports["default"] = generateDynamicChecksAndCheckForCompletion; | |
|
||
"use strict"; | ||
|
||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", ({ value: true })); | ||
exports.detectReactComponent = void 0; | ||
const github_1 = __importDefault(__nccwpck_require__(5438)); | ||
const github = __importStar(__nccwpck_require__(5438)); | ||
const parser_1 = __nccwpck_require__(5026); | ||
const traverse_1 = __importDefault(__nccwpck_require__(1380)); | ||
const CONST_1 = __importDefault(__nccwpck_require__(4097)); | ||
const CONST_1 = __importDefault(__nccwpck_require__(9873)); | ||
const GithubUtils_1 = __importDefault(__nccwpck_require__(9296)); | ||
const promiseSome_1 = __importDefault(__nccwpck_require__(8534)); | ||
const items = [ | ||
|
@@ -16834,7 +16833,7 @@ async function detectReactComponentInFile(filename) { | |
owner: CONST_1.default.GITHUB_OWNER, | ||
repo: CONST_1.default.APP_REPO, | ||
path: filename, | ||
ref: github_1.default.context.payload.pull_request?.head.ref, | ||
ref: github.context.payload.pull_request?.head.ref, | ||
}; | ||
try { | ||
const { data } = await GithubUtils_1.default.octokit.repos.getContent(params); | ||
|
@@ -16862,10 +16861,43 @@ const newComponentCategory = { | |
exports["default"] = newComponentCategory; | ||
|
||
|
||
/***/ }), | ||
|
||
/***/ 9873: | ||
/***/ ((__unused_webpack_module, exports) => { | ||
|
||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true })); | ||
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)'); | ||
const GIT_CONST = { | ||
GITHUB_OWNER: 'Expensify', | ||
APP_REPO: 'App', | ||
}; | ||
const CONST = { | ||
...GIT_CONST, | ||
APPLAUSE_BOT: 'applausebot', | ||
OS_BOTIFY: 'OSBotify', | ||
LABELS: { | ||
STAGING_DEPLOY: 'StagingDeployCash', | ||
DEPLOY_BLOCKER: 'DeployBlockerCash', | ||
INTERNAL_QA: 'InternalQA', | ||
}, | ||
DATE_FORMAT_STRING: 'yyyy-MM-dd', | ||
PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`), | ||
ISSUE_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/issues/([0-9]+).*`), | ||
ISSUE_OR_PULL_REQUEST_REGEX: new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/(?:pull|issues)/([0-9]+).*`), | ||
POLL_RATE: 10000, | ||
APP_REPO_URL: `https://github.com/${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}`, | ||
APP_REPO_GIT_URL: `[email protected]:${GIT_CONST.GITHUB_OWNER}/${GIT_CONST.APP_REPO}.git`, | ||
}; | ||
exports["default"] = CONST; | ||
|
||
|
||
/***/ }), | ||
|
||
/***/ 9296: | ||
/***/ (function(module, exports, __nccwpck_require__) { | ||
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) { | ||
|
||
"use strict"; | ||
|
||
|
@@ -16896,29 +16928,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | |
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", ({ value: true })); | ||
exports.POLL_RATE = exports.ISSUE_OR_PULL_REQUEST_REGEX = void 0; | ||
/* eslint-disable @typescript-eslint/naming-convention, import/no-import-module-exports */ | ||
const core = __importStar(__nccwpck_require__(2186)); | ||
const utils_1 = __nccwpck_require__(3030); | ||
const plugin_paginate_rest_1 = __nccwpck_require__(4193); | ||
const plugin_throttling_1 = __nccwpck_require__(9968); | ||
const EmptyObject_1 = __nccwpck_require__(8227); | ||
const arrayDifference_1 = __importDefault(__nccwpck_require__(7034)); | ||
const CONST_1 = __importDefault(__nccwpck_require__(4097)); | ||
const GITHUB_BASE_URL_REGEX = new RegExp('https?://(?:github\\.com|api\\.github\\.com)'); | ||
const PULL_REQUEST_REGEX = new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/pull/([0-9]+).*`); | ||
const ISSUE_REGEX = new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/issues/([0-9]+).*`); | ||
const ISSUE_OR_PULL_REQUEST_REGEX = new RegExp(`${GITHUB_BASE_URL_REGEX.source}/.*/.*/(?:pull|issues)/([0-9]+).*`); | ||
exports.ISSUE_OR_PULL_REQUEST_REGEX = ISSUE_OR_PULL_REQUEST_REGEX; | ||
/** | ||
* The standard rate in ms at which we'll poll the GitHub API to check for status changes. | ||
* It's 10 seconds :) | ||
*/ | ||
const POLL_RATE = 10000; | ||
exports.POLL_RATE = POLL_RATE; | ||
const CONST_1 = __importDefault(__nccwpck_require__(9873)); | ||
class GithubUtils { | ||
static internalOctokit; | ||
static POLL_RATE; | ||
/** | ||
* Initialize internal octokit | ||
* | ||
|
@@ -17043,7 +17062,7 @@ class GithubUtils { | |
return []; | ||
} | ||
PRListSection = PRListSection[1]; | ||
const PRList = [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${PULL_REQUEST_REGEX.source})`, 'g'))].map((match) => ({ | ||
const PRList = [...PRListSection.matchAll(new RegExp(`- \\[([ x])] (${CONST_1.default.PULL_REQUEST_REGEX.source})`, 'g'))].map((match) => ({ | ||
url: match[2], | ||
number: Number.parseInt(match[3], 10), | ||
isVerified: match[1] === 'x', | ||
|
@@ -17061,7 +17080,7 @@ class GithubUtils { | |
return []; | ||
} | ||
deployBlockerSection = deployBlockerSection[1]; | ||
const deployBlockers = [...deployBlockerSection.matchAll(new RegExp(`- \\[([ x])]\\s(${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))].map((match) => ({ | ||
const deployBlockers = [...deployBlockerSection.matchAll(new RegExp(`- \\[([ x])]\\s(${CONST_1.default.ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))].map((match) => ({ | ||
url: match[2], | ||
number: Number.parseInt(match[3], 10), | ||
isResolved: match[1] === 'x', | ||
|
@@ -17079,7 +17098,7 @@ class GithubUtils { | |
return []; | ||
} | ||
internalQASection = internalQASection[1]; | ||
const internalQAPRs = [...internalQASection.matchAll(new RegExp(`- \\[([ x])]\\s(${PULL_REQUEST_REGEX.source})`, 'g'))].map((match) => ({ | ||
const internalQAPRs = [...internalQASection.matchAll(new RegExp(`- \\[([ x])]\\s(${CONST_1.default.PULL_REQUEST_REGEX.source})`, 'g'))].map((match) => ({ | ||
url: match[2].split('-')[0].trim(), | ||
number: Number.parseInt(match[3], 10), | ||
isResolved: match[1] === 'x', | ||
|
@@ -17250,7 +17269,6 @@ class GithubUtils { | |
* Generate the URL of an New Expensify pull request given the PR number. | ||
*/ | ||
static getPullRequestURLFromNumber(value) { | ||
// @ts-expect-error TODO: Remove this once CONST.js (https://github.com/Expensify/App/issues/25362) is migrated to TypeScript | ||
return `${CONST_1.default.APP_REPO_URL}/pull/${value}`; | ||
} | ||
/** | ||
|
@@ -17259,7 +17277,7 @@ class GithubUtils { | |
* @throws {Error} If the URL is not a valid Github Pull Request. | ||
*/ | ||
static getPullRequestNumberFromURL(URL) { | ||
const matches = URL.match(PULL_REQUEST_REGEX); | ||
const matches = URL.match(CONST_1.default.PULL_REQUEST_REGEX); | ||
if (!Array.isArray(matches) || matches.length !== 2) { | ||
throw new Error(`Provided URL ${URL} is not a Github Pull Request!`); | ||
} | ||
|
@@ -17271,7 +17289,7 @@ class GithubUtils { | |
* @throws {Error} If the URL is not a valid Github Issue. | ||
*/ | ||
static getIssueNumberFromURL(URL) { | ||
const matches = URL.match(ISSUE_REGEX); | ||
const matches = URL.match(CONST_1.default.ISSUE_REGEX); | ||
if (!Array.isArray(matches) || matches.length !== 2) { | ||
throw new Error(`Provided URL ${URL} is not a Github Issue!`); | ||
} | ||
|
@@ -17283,7 +17301,7 @@ class GithubUtils { | |
* @throws {Error} If the URL is not a valid Github Issue or Pull Request. | ||
*/ | ||
static getIssueOrPullRequestNumberFromURL(URL) { | ||
const matches = URL.match(ISSUE_OR_PULL_REQUEST_REGEX); | ||
const matches = URL.match(CONST_1.default.ISSUE_OR_PULL_REQUEST_REGEX); | ||
if (!Array.isArray(matches) || matches.length !== 2) { | ||
throw new Error(`Provided URL ${URL} is not a valid Github Issue or Pull Request!`); | ||
} | ||
|
@@ -17311,9 +17329,6 @@ class GithubUtils { | |
} | ||
} | ||
exports["default"] = GithubUtils; | ||
// This is a temporary solution to allow the use of the GithubUtils class in both TypeScript and JavaScript. | ||
// Once all the files that import GithubUtils are migrated to TypeScript, this can be removed. | ||
module.exports = GithubUtils; | ||
|
||
|
||
/***/ }), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.