Skip to content

Commit

Permalink
Merge branch 'main' into new-search-tab
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekBoman committed Apr 16, 2024
2 parents 2fcae18 + ed7029b commit 18ed94f
Show file tree
Hide file tree
Showing 804 changed files with 43,358 additions and 46,986 deletions.
2 changes: 1 addition & 1 deletion .github/actionlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
self-hosted-runner:
labels:
- ubuntu-latest-xl
- macos-12-xl
- macos-13-large
- macos-13-xlarge
- ubuntu-latest-reassure-tests
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import github from '@actions/github';
import * as github from '@actions/github';
import {parse} from '@babel/parser';
import traverse from '@babel/traverse';
import CONST from '@github/libs/CONST';
Expand Down
3,097 changes: 1,364 additions & 1,733 deletions .github/actions/javascript/authorChecklist/index.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
/* eslint-disable @typescript-eslint/naming-convention */
import lodashThrottle from 'lodash/throttle';
import ActionUtils from '@github/libs/ActionUtils';
import {getStringInput} from '@github/libs/ActionUtils';
import CONST from '@github/libs/CONST';
import GitHubUtils, {POLL_RATE} from '@github/libs/GithubUtils';
import GitHubUtils 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] ActionUtils', ActionUtils);
console.info('[awaitStagingDeploys] getStringInput', getStringInput);
console.info('[awaitStagingDeploys] GitHubUtils', GitHubUtils);
console.info('[awaitStagingDeploys] promiseDoWhile', promiseDoWhile);

const tag = ActionUtils.getStringInput('TAG', {required: false});
const tag = getStringInput('TAG', {required: false});
console.info('[awaitStagingDeploys] run() tag', tag);

let currentStagingDeploys: CurrentStagingDeploys = [];
Expand Down Expand Up @@ -41,20 +41,23 @@ function run() {
}),
])
.then((responses) => {
console.info('[awaitStagingDeploys] listWorkflowRuns responses', responses);
const workflowRuns = responses[0].data.workflow_runs;
if (!tag && typeof responses[1] === 'object') {
workflowRuns.push(...responses[1].data.workflow_runs);
}
console.info('[awaitStagingDeploys] workflowRuns', workflowRuns);
return workflowRuns;
})
.then((workflowRuns) => (currentStagingDeploys = workflowRuns.filter((workflowRun) => workflowRun.status !== 'completed')))
.then(() =>
.then(() => {
console.info('[awaitStagingDeploys] currentStagingDeploys', currentStagingDeploys);
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(
Expand All @@ -63,7 +66,7 @@ function run() {
throttleFunc,

// Poll every 60 seconds instead of every 10 seconds
POLL_RATE * 6,
CONST.POLL_RATE * 6,
),
);
}
Expand Down
Loading

0 comments on commit 18ed94f

Please sign in to comment.