-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
464 changed files
with
16,909 additions
and
33,345 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -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 |
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`; | ||
|
@@ -16770,7 +16746,7 @@ exports.detectReactComponent = void 0; | |
const github_1 = __importDefault(__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 = [ | ||
|
@@ -16862,6 +16838,34 @@ const newComponentCategory = { | |
exports["default"] = newComponentCategory; | ||
|
||
|
||
/***/ }), | ||
|
||
/***/ 9873: | ||
/***/ ((__unused_webpack_module, exports) => { | ||
|
||
"use strict"; | ||
|
||
Object.defineProperty(exports, "__esModule", ({ value: true })); | ||
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', | ||
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: | ||
|
@@ -16904,7 +16908,7 @@ 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 CONST_1 = __importDefault(__nccwpck_require__(9873)); | ||
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]+).*`); | ||
|
@@ -16918,6 +16922,7 @@ const POLL_RATE = 10000; | |
exports.POLL_RATE = POLL_RATE; | ||
class GithubUtils { | ||
static internalOctokit; | ||
static POLL_RATE; | ||
/** | ||
* Initialize internal octokit | ||
* | ||
|
@@ -17249,7 +17254,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}`; | ||
} | ||
/** | ||
|
59 changes: 0 additions & 59 deletions
59
.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.js
This file was deleted.
Oops, something went wrong.
75 changes: 75 additions & 0 deletions
75
.github/actions/javascript/awaitStagingDeploys/awaitStagingDeploys.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
import lodashThrottle from 'lodash/throttle'; | ||
import {getStringInput} from '@github/libs/ActionUtils'; | ||
import CONST from '@github/libs/CONST'; | ||
import GitHubUtils, {POLL_RATE} from '@github/libs/GithubUtils'; | ||
import {promiseDoWhile} from '@github/libs/promiseWhile'; | ||
|
||
type CurrentStagingDeploys = Awaited<ReturnType<typeof GitHubUtils.octokit.actions.listWorkflowRuns>>['data']['workflow_runs']; | ||
|
||
function run() { | ||
console.info('[awaitStagingDeploys] run()'); | ||
console.info('[awaitStagingDeploys] getStringInput', getStringInput); | ||
console.info('[awaitStagingDeploys] GitHubUtils', GitHubUtils); | ||
console.info('[awaitStagingDeploys] promiseDoWhile', promiseDoWhile); | ||
|
||
const tag = getStringInput('TAG', {required: false}); | ||
console.info('[awaitStagingDeploys] run() tag', tag); | ||
|
||
let currentStagingDeploys: CurrentStagingDeploys = []; | ||
|
||
console.info('[awaitStagingDeploys] run() _.throttle', lodashThrottle); | ||
|
||
const throttleFunc = () => | ||
Promise.all([ | ||
// These are active deploys | ||
GitHubUtils.octokit.actions.listWorkflowRuns({ | ||
owner: CONST.GITHUB_OWNER, | ||
repo: CONST.APP_REPO, | ||
workflow_id: 'platformDeploy.yml', | ||
event: 'push', | ||
branch: tag, | ||
}), | ||
|
||
// These have the potential to become active deploys, so we need to wait for them to finish as well (unless we're looking for a specific tag) | ||
// In this context, we'll refer to unresolved preDeploy workflow runs as staging deploys as well | ||
!tag && | ||
GitHubUtils.octokit.actions.listWorkflowRuns({ | ||
owner: CONST.GITHUB_OWNER, | ||
repo: CONST.APP_REPO, | ||
workflow_id: 'preDeploy.yml', | ||
}), | ||
]) | ||
.then((responses) => { | ||
const workflowRuns = responses[0].data.workflow_runs; | ||
if (!tag && typeof responses[1] === 'object') { | ||
workflowRuns.push(...responses[1].data.workflow_runs); | ||
} | ||
return workflowRuns; | ||
}) | ||
.then((workflowRuns) => (currentStagingDeploys = workflowRuns.filter((workflowRun) => workflowRun.status !== 'completed'))) | ||
.then(() => | ||
console.log( | ||
!currentStagingDeploys.length | ||
? 'No current staging deploys found' | ||
: `Found ${currentStagingDeploys.length} staging deploy${currentStagingDeploys.length > 1 ? 's' : ''} still running...`, | ||
), | ||
); | ||
console.info('[awaitStagingDeploys] run() throttleFunc', throttleFunc); | ||
|
||
return promiseDoWhile( | ||
() => !!currentStagingDeploys.length, | ||
lodashThrottle( | ||
throttleFunc, | ||
|
||
// Poll every 60 seconds instead of every 10 seconds | ||
POLL_RATE * 6, | ||
), | ||
); | ||
} | ||
|
||
if (require.main === module) { | ||
run(); | ||
} | ||
|
||
export default run; |
Oops, something went wrong.