Skip to content

Commit deb3090

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

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/npm-publish.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,24 @@ 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
60-
const checkSuites = await github.rest.checks.listSuitesForRef({ owner, repo, ref });
60+
const { data: { check_suites: checkSuites } } = await github.rest.checks.listSuitesForRef({ owner, repo, ref });
6161
6262
if (checkSuites.some(({ status }) => 'completed')) {
6363
core.setFailed(`Some workflows for ${context.payload.inputs.tag} are still in-progress`);
6464
}
6565
6666
const { data: { check_runs: checkRuns } } = await Promise.all(
67-
(await branch).data.protection.required_status_checks.checks.map(({ context }) => (
67+
(await branchData).data.protection.required_status_checks.checks.map(({ context }) => (
6868
github.rest.checks.listForRef({
6969
owner,
7070
repo,
7171
ref,
72-
check_name: context
72+
check_name: context,
7373
})
74-
)
75-
)
74+
))
75+
);
7676
7777
checkRuns.forEach(({ name, status, conclusion }) => {
7878
if (status !== 'completed' || conclusion !== 'success') {

0 commit comments

Comments
 (0)