Skip to content

Check whether workflow directory exists #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 8, 2025

Conversation

temenuzhka-thede
Copy link
Collaborator

No description provided.

crazy-max
crazy-max previously approved these changes Apr 8, 2025
Comment on lines 37 to 43
const path = '.github/workflows';
if (!fs.existsSync(path)){
core.warning("No workflow directory found, skipping zizmor scan.");
return;
}

const workflows = fs.readdirSync('.github/workflows').filter(file => file.endsWith('.yml') || file.endsWith('.yaml'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could be

Suggested change
const path = '.github/workflows';
if (!fs.existsSync(path)){
core.warning("No workflow directory found, skipping zizmor scan.");
return;
}
const workflows = fs.readdirSync('.github/workflows').filter(file => file.endsWith('.yml') || file.endsWith('.yaml'));
const workflowsPath = '.github/workflows';
if (!fs.existsSync(workflowsPath)){
core.warning("No workflow directory found, skipping zizmor scan.");
return;
}
const workflows = fs.readdirSync(workflowsPath).filter(file => file.endsWith('.yml') || file.endsWith('.yaml'));

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one, thanks! Incorporated

@temenuzhka-thede temenuzhka-thede merged commit 16082d7 into main Apr 8, 2025
2 checks passed
@crazy-max crazy-max deleted the tthede.readdirSync branch April 8, 2025 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants