File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -55,24 +55,26 @@ jobs:
55
55
const { owner, repo } = context.repo;
56
56
const { default_branch: branch } = context.payload.repository;
57
57
58
- const branch = github.rest.repos.getBranch({ owner, repo, branch });
58
+ const branchData = github.rest.repos.getBranch({ owner, repo, branch });
59
59
60
60
const checkSuites = await github.rest.checks.listSuitesForRef({ owner, repo, ref });
61
61
62
+ console.log(checkSuites);
63
+
62
64
if (checkSuites.some(({ status }) => 'completed')) {
63
65
core.setFailed(`Some workflows for ${context.payload.inputs.tag} are still in-progress`);
64
66
}
65
67
66
68
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 }) => (
68
70
github.rest.checks.listForRef({
69
71
owner,
70
72
repo,
71
73
ref,
72
- check_name: context
74
+ check_name: context,
73
75
})
74
- )
75
- )
76
+ ))
77
+ );
76
78
77
79
checkRuns.forEach(({ name, status, conclusion }) => {
78
80
if (status !== 'completed' || conclusion !== 'success') {
You can’t perform that action at this time.
0 commit comments