Skip to content

Clarify workflow validation guidance#791

Merged
mfoltz merged 1 commit intomainfrom
codex/clean-up-validation-for-github-actions-workflows-2026-03-22t11-03-54z
Mar 22, 2026
Merged

Clarify workflow validation guidance#791
mfoltz merged 1 commit intomainfrom
codex/clean-up-validation-for-github-actions-workflows-2026-03-22t11-03-54z

Conversation

@mfoltz
Copy link
Copy Markdown
Owner

@mfoltz mfoltz commented Mar 22, 2026

Motivation

  • Prevent recommending bash -n against GitHub Actions workflow files because workflows are YAML, not shell scripts.
  • Ensure reviewers focus on appropriate YAML parsing and real shell script linting instead of applying Bash syntax checks to .yml files.

Description

  • Updated .github/CONTRIBUTING.md to remove the suggestion to run bash -n on workflow YAML and add a note that Bash syntax checks are not applicable to .github/workflows/*.yml files.
  • Updated .github/instructions/workflows.instructions.md to advise reviewers not to recommend bash -n for workflow YAML and to limit bash -n or shellcheck to actual .sh files or extracted shell snippets.
  • Preserved existing guarded YAML parsing guidance (PyYAML note and guarded python3 -c 'import yaml' check).

Testing

  • Ran git diff -- .github/CONTRIBUTING.md .github/instructions/workflows.instructions.md to verify the intended edits were present, and the diff showed the expected changes (success).
  • Searched repository guidance with rg -n --hidden --no-ignore "bash -n .*release\.yml|Do not recommend \bash -n`|Bash syntax checks such as `bash -n` are not applicable|shellcheck.sh|Python YAML parse example" .github -S` to confirm the old recommendation was removed and new notes added (success).
  • Checked working tree status with git status --short to ensure only the intended files were modified (success).

Codex Task

Copilot AI review requested due to automatic review settings March 22, 2026 11:03
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates repository review guidance to avoid suggesting Bash syntax checks (bash -n) on GitHub Actions workflow YAML files, and to instead reserve Bash/shell linting for actual shell scripts or extracted shell snippets.

Changes:

  • Remove/avoid guidance that implies bash -n should be used on .github/workflows/*.yml workflow files.
  • Add explicit notes clarifying that workflows are YAML (use YAML parsing checks instead), while bash -n/shellcheck should target .sh content.
  • Preserve existing “guarded PyYAML parse” guidance for local workflow validation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/instructions/workflows.instructions.md Adds reviewer guidance to avoid recommending bash -n for workflow YAML and to scope shell validation appropriately.
.github/CONTRIBUTING.md Updates contributor guidance to clarify correct local validation approaches for workflow YAML vs shell scripts.

@mfoltz mfoltz merged commit 724b2df into main Mar 22, 2026
10 checks passed
@mfoltz mfoltz deleted the codex/clean-up-validation-for-github-actions-workflows-2026-03-22t11-03-54z branch March 22, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants