-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Component
Scripts
Bug Description
The table-format.yml workflow does not actually detect when tables need formatting. It runs npm run format:tables and only fails if the command itself errors, but markdown-table-formatter exits successfully even when it modifies files.
Current logic:
npm run format:tables > table-format-output.txt 2>&1 || echo "TABLE_FORMAT_FAILED=true" >> $GITHUB_ENVThis only sets TABLE_FORMAT_FAILED=true if markdown-table-formatter exits with a non-zero code. However, the tool formats files in place and exits 0 regardless of whether changes were made.
Several files in the repository have tables that are not properly formatted and pass through PR validation without triggering a failure:
GOVERNANCE.mddocs/contributing/ROADMAP.mddocs/getting-started/first-workflow.md
Expected Behavior
The workflow should:
- Run
npm run format:tables - Check if any files were modified using
git diff --name-only - Fail the check if modifications were detected
Steps to Reproduce
- Modify a table in any markdown file to be misaligned
- Commit and push to a PR branch
- Observe that
table-formatcheck passes
Additional Context
Proposed fix for .github/workflows/table-format.yml:
- name: Check table formatting
id: table-format
run: |
npm run format:tables > table-format-output.txt 2>&1
cat table-format-output.txt
if [ -n "$(git diff --name-only)" ]; then
echo "TABLE_FORMAT_FAILED=true" >> $GITHUB_ENV
echo "Files with formatting issues:"
git diff --name-only
fi
continue-on-error: trueWorkaround: Run npm run format:tables locally before committing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working