Skip to content

Commit 14ccfeb

Browse files
authored
Merge pull request #9479 from Expensify/update-staging-from-main
Update version to 1.1.78-0 on staging
2 parents 3c292f5 + 547814c commit 14ccfeb

File tree

52 files changed

+1244
-432
lines changed

Some content is hidden

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

52 files changed

+1244
-432
lines changed

.github/actions/awaitStagingDeploys/index.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ class GithubUtils {
236236
}
237237

238238
/**
239-
* Parse the PRList section of the StagingDeployCash issue body.
239+
* Parse the PRList and Internal QA section of the StagingDeployCash issue body.
240240
*
241241
* @private
242242
*
@@ -260,7 +260,8 @@ class GithubUtils {
260260
isAccessible: match[4] === 'x',
261261
}),
262262
);
263-
return _.sortBy(PRList, 'number');
263+
const internalQAPRList = this.getStagingDeployCashInternalQA(issue);
264+
return _.sortBy(_.union(PRList, internalQAPRList), 'number');
264265
}
265266

266267
/**
@@ -288,6 +289,32 @@ class GithubUtils {
288289
return _.sortBy(deployBlockers, 'number');
289290
}
290291

292+
/**
293+
* Parse InternalQA section of the StagingDeployCash issue body.
294+
*
295+
* @private
296+
*
297+
* @param {Object} issue
298+
* @returns {Array<Object>} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}]
299+
*/
300+
static getStagingDeployCashInternalQA(issue) {
301+
let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:.*\r?\n)+)/) || [];
302+
if (internalQASection.length !== 2) {
303+
return [];
304+
}
305+
internalQASection = internalQASection[1];
306+
const internalQAPRs = _.map(
307+
[...internalQASection.matchAll(new RegExp(`- \\[([ x])]\\s(${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))],
308+
match => ({
309+
url: match[2],
310+
number: Number.parseInt(match[3], 10),
311+
isResolved: match[1] === 'x',
312+
isAccessible: false,
313+
}),
314+
);
315+
return _.sortBy(internalQAPRs, 'number');
316+
}
317+
291318
/**
292319
* Generate the issue body for a StagingDeployCash.
293320
*

.github/actions/checkDeployBlockers/index.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ class GithubUtils {
206206
}
207207

208208
/**
209-
* Parse the PRList section of the StagingDeployCash issue body.
209+
* Parse the PRList and Internal QA section of the StagingDeployCash issue body.
210210
*
211211
* @private
212212
*
@@ -230,7 +230,8 @@ class GithubUtils {
230230
isAccessible: match[4] === 'x',
231231
}),
232232
);
233-
return _.sortBy(PRList, 'number');
233+
const internalQAPRList = this.getStagingDeployCashInternalQA(issue);
234+
return _.sortBy(_.union(PRList, internalQAPRList), 'number');
234235
}
235236

236237
/**
@@ -258,6 +259,32 @@ class GithubUtils {
258259
return _.sortBy(deployBlockers, 'number');
259260
}
260261

262+
/**
263+
* Parse InternalQA section of the StagingDeployCash issue body.
264+
*
265+
* @private
266+
*
267+
* @param {Object} issue
268+
* @returns {Array<Object>} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}]
269+
*/
270+
static getStagingDeployCashInternalQA(issue) {
271+
let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:.*\r?\n)+)/) || [];
272+
if (internalQASection.length !== 2) {
273+
return [];
274+
}
275+
internalQASection = internalQASection[1];
276+
const internalQAPRs = _.map(
277+
[...internalQASection.matchAll(new RegExp(`- \\[([ x])]\\s(${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))],
278+
match => ({
279+
url: match[2],
280+
number: Number.parseInt(match[3], 10),
281+
isResolved: match[1] === 'x',
282+
isAccessible: false,
283+
}),
284+
);
285+
return _.sortBy(internalQAPRs, 'number');
286+
}
287+
261288
/**
262289
* Generate the issue body for a StagingDeployCash.
263290
*

.github/actions/createOrUpdateStagingDeploy/index.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ class GithubUtils {
399399
}
400400

401401
/**
402-
* Parse the PRList section of the StagingDeployCash issue body.
402+
* Parse the PRList and Internal QA section of the StagingDeployCash issue body.
403403
*
404404
* @private
405405
*
@@ -423,7 +423,8 @@ class GithubUtils {
423423
isAccessible: match[4] === 'x',
424424
}),
425425
);
426-
return _.sortBy(PRList, 'number');
426+
const internalQAPRList = this.getStagingDeployCashInternalQA(issue);
427+
return _.sortBy(_.union(PRList, internalQAPRList), 'number');
427428
}
428429

429430
/**
@@ -451,6 +452,32 @@ class GithubUtils {
451452
return _.sortBy(deployBlockers, 'number');
452453
}
453454

455+
/**
456+
* Parse InternalQA section of the StagingDeployCash issue body.
457+
*
458+
* @private
459+
*
460+
* @param {Object} issue
461+
* @returns {Array<Object>} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}]
462+
*/
463+
static getStagingDeployCashInternalQA(issue) {
464+
let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:.*\r?\n)+)/) || [];
465+
if (internalQASection.length !== 2) {
466+
return [];
467+
}
468+
internalQASection = internalQASection[1];
469+
const internalQAPRs = _.map(
470+
[...internalQASection.matchAll(new RegExp(`- \\[([ x])]\\s(${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))],
471+
match => ({
472+
url: match[2],
473+
number: Number.parseInt(match[3], 10),
474+
isResolved: match[1] === 'x',
475+
isAccessible: false,
476+
}),
477+
);
478+
return _.sortBy(internalQAPRs, 'number');
479+
}
480+
454481
/**
455482
* Generate the issue body for a StagingDeployCash.
456483
*

.github/actions/getPullRequestDetails/index.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ class GithubUtils {
277277
}
278278

279279
/**
280-
* Parse the PRList section of the StagingDeployCash issue body.
280+
* Parse the PRList and Internal QA section of the StagingDeployCash issue body.
281281
*
282282
* @private
283283
*
@@ -301,7 +301,8 @@ class GithubUtils {
301301
isAccessible: match[4] === 'x',
302302
}),
303303
);
304-
return _.sortBy(PRList, 'number');
304+
const internalQAPRList = this.getStagingDeployCashInternalQA(issue);
305+
return _.sortBy(_.union(PRList, internalQAPRList), 'number');
305306
}
306307

307308
/**
@@ -329,6 +330,32 @@ class GithubUtils {
329330
return _.sortBy(deployBlockers, 'number');
330331
}
331332

333+
/**
334+
* Parse InternalQA section of the StagingDeployCash issue body.
335+
*
336+
* @private
337+
*
338+
* @param {Object} issue
339+
* @returns {Array<Object>} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}]
340+
*/
341+
static getStagingDeployCashInternalQA(issue) {
342+
let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:.*\r?\n)+)/) || [];
343+
if (internalQASection.length !== 2) {
344+
return [];
345+
}
346+
internalQASection = internalQASection[1];
347+
const internalQAPRs = _.map(
348+
[...internalQASection.matchAll(new RegExp(`- \\[([ x])]\\s(${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))],
349+
match => ({
350+
url: match[2],
351+
number: Number.parseInt(match[3], 10),
352+
isResolved: match[1] === 'x',
353+
isAccessible: false,
354+
}),
355+
);
356+
return _.sortBy(internalQAPRs, 'number');
357+
}
358+
332359
/**
333360
* Generate the issue body for a StagingDeployCash.
334361
*

.github/actions/getReleaseBody/index.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ class GithubUtils {
195195
}
196196

197197
/**
198-
* Parse the PRList section of the StagingDeployCash issue body.
198+
* Parse the PRList and Internal QA section of the StagingDeployCash issue body.
199199
*
200200
* @private
201201
*
@@ -219,7 +219,8 @@ class GithubUtils {
219219
isAccessible: match[4] === 'x',
220220
}),
221221
);
222-
return _.sortBy(PRList, 'number');
222+
const internalQAPRList = this.getStagingDeployCashInternalQA(issue);
223+
return _.sortBy(_.union(PRList, internalQAPRList), 'number');
223224
}
224225

225226
/**
@@ -247,6 +248,32 @@ class GithubUtils {
247248
return _.sortBy(deployBlockers, 'number');
248249
}
249250

251+
/**
252+
* Parse InternalQA section of the StagingDeployCash issue body.
253+
*
254+
* @private
255+
*
256+
* @param {Object} issue
257+
* @returns {Array<Object>} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}]
258+
*/
259+
static getStagingDeployCashInternalQA(issue) {
260+
let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:.*\r?\n)+)/) || [];
261+
if (internalQASection.length !== 2) {
262+
return [];
263+
}
264+
internalQASection = internalQASection[1];
265+
const internalQAPRs = _.map(
266+
[...internalQASection.matchAll(new RegExp(`- \\[([ x])]\\s(${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))],
267+
match => ({
268+
url: match[2],
269+
number: Number.parseInt(match[3], 10),
270+
isResolved: match[1] === 'x',
271+
isAccessible: false,
272+
}),
273+
);
274+
return _.sortBy(internalQAPRs, 'number');
275+
}
276+
250277
/**
251278
* Generate the issue body for a StagingDeployCash.
252279
*

.github/actions/isPullRequestMergeable/index.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ class GithubUtils {
196196
}
197197

198198
/**
199-
* Parse the PRList section of the StagingDeployCash issue body.
199+
* Parse the PRList and Internal QA section of the StagingDeployCash issue body.
200200
*
201201
* @private
202202
*
@@ -220,7 +220,8 @@ class GithubUtils {
220220
isAccessible: match[4] === 'x',
221221
}),
222222
);
223-
return _.sortBy(PRList, 'number');
223+
const internalQAPRList = this.getStagingDeployCashInternalQA(issue);
224+
return _.sortBy(_.union(PRList, internalQAPRList), 'number');
224225
}
225226

226227
/**
@@ -248,6 +249,32 @@ class GithubUtils {
248249
return _.sortBy(deployBlockers, 'number');
249250
}
250251

252+
/**
253+
* Parse InternalQA section of the StagingDeployCash issue body.
254+
*
255+
* @private
256+
*
257+
* @param {Object} issue
258+
* @returns {Array<Object>} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}]
259+
*/
260+
static getStagingDeployCashInternalQA(issue) {
261+
let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:.*\r?\n)+)/) || [];
262+
if (internalQASection.length !== 2) {
263+
return [];
264+
}
265+
internalQASection = internalQASection[1];
266+
const internalQAPRs = _.map(
267+
[...internalQASection.matchAll(new RegExp(`- \\[([ x])]\\s(${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))],
268+
match => ({
269+
url: match[2],
270+
number: Number.parseInt(match[3], 10),
271+
isResolved: match[1] === 'x',
272+
isAccessible: false,
273+
}),
274+
);
275+
return _.sortBy(internalQAPRs, 'number');
276+
}
277+
251278
/**
252279
* Generate the issue body for a StagingDeployCash.
253280
*

.github/actions/isStagingDeployLocked/index.js

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class GithubUtils {
159159
}
160160

161161
/**
162-
* Parse the PRList section of the StagingDeployCash issue body.
162+
* Parse the PRList and Internal QA section of the StagingDeployCash issue body.
163163
*
164164
* @private
165165
*
@@ -183,7 +183,8 @@ class GithubUtils {
183183
isAccessible: match[4] === 'x',
184184
}),
185185
);
186-
return _.sortBy(PRList, 'number');
186+
const internalQAPRList = this.getStagingDeployCashInternalQA(issue);
187+
return _.sortBy(_.union(PRList, internalQAPRList), 'number');
187188
}
188189

189190
/**
@@ -211,6 +212,32 @@ class GithubUtils {
211212
return _.sortBy(deployBlockers, 'number');
212213
}
213214

215+
/**
216+
* Parse InternalQA section of the StagingDeployCash issue body.
217+
*
218+
* @private
219+
*
220+
* @param {Object} issue
221+
* @returns {Array<Object>} - [{URL: String, number: Number, isResolved: Boolean, isAccessible: Boolean}]
222+
*/
223+
static getStagingDeployCashInternalQA(issue) {
224+
let internalQASection = issue.body.match(/Internal QA:\*\*\r?\n((?:.*\r?\n)+)/) || [];
225+
if (internalQASection.length !== 2) {
226+
return [];
227+
}
228+
internalQASection = internalQASection[1];
229+
const internalQAPRs = _.map(
230+
[...internalQASection.matchAll(new RegExp(`- \\[([ x])]\\s(${ISSUE_OR_PULL_REQUEST_REGEX.source})`, 'g'))],
231+
match => ({
232+
url: match[2],
233+
number: Number.parseInt(match[3], 10),
234+
isResolved: match[1] === 'x',
235+
isAccessible: false,
236+
}),
237+
);
238+
return _.sortBy(internalQAPRs, 'number');
239+
}
240+
214241
/**
215242
* Generate the issue body for a StagingDeployCash.
216243
*

0 commit comments

Comments
 (0)