Skip to content

Commit fc48762

Browse files
committed
Handle when workflow was parsed with errors
1 parent f5af276 commit fc48762

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ async function run_repo(owner, repo, octokit) {
8181
continue;
8282
}
8383
const workflow = await convertWorkflowTemplate(result.context, result.value);
84+
if (workflow === undefined || workflow.events === undefined) {
85+
found = true;
86+
console.log(`Failed to parse https://github.com/${owner}/${repo}/blob/${branchName}/${file.path}`);
87+
continue;
88+
}
8489
if (workflow.events['pull_request_target'] === undefined) {
8590
debug(`No usage of 'pull_request_target' in https://github.com/${owner}/${repo}/blob/${branchName}/${file.path}`);
8691
continue;

0 commit comments

Comments
 (0)