Skip to content

Commit 58a3c8b

Browse files
committed
[actions] fix publish script
1 parent 35f6403 commit 58a3c8b

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/npm-publish.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,26 @@ jobs:
5555
const { owner, repo } = context.repo;
5656
const { default_branch: branch } = context.payload.repository;
5757
58-
const branch = github.rest.repos.getBranch({ owner, repo, branch });
58+
const branchData = github.rest.repos.getBranch({ owner, repo, branch });
5959
6060
const checkSuites = await github.rest.checks.listSuitesForRef({ owner, repo, ref });
6161
62+
console.log(checkSuites);
63+
6264
if (checkSuites.some(({ status }) => 'completed')) {
6365
core.setFailed(`Some workflows for ${context.payload.inputs.tag} are still in-progress`);
6466
}
6567
6668
const { data: { check_runs: checkRuns } } = await Promise.all(
67-
(await branch).data.protection.required_status_checks.checks.map(({ context }) => (
69+
(await branchData).data.protection.required_status_checks.checks.map(({ context }) => (
6870
github.rest.checks.listForRef({
6971
owner,
7072
repo,
7173
ref,
72-
check_name: context
74+
check_name: context,
7375
})
74-
)
75-
)
76+
))
77+
);
7678
7779
checkRuns.forEach(({ name, status, conclusion }) => {
7880
if (status !== 'completed' || conclusion !== 'success') {

0 commit comments

Comments
 (0)