Skip to content

meta: exclude .github/ from Prettier formatting - #1026

Closed
ovflowd wants to merge 1 commit into
mainfrom
fix/prettier-ignore-github-workflows
Closed

meta: exclude .github/ from Prettier formatting#1026
ovflowd wants to merge 1 commit into
mainfrom
fix/prettier-ignore-github-workflows

Conversation

@ovflowd

@ovflowd ovflowd commented Sep 9, 2026

Copy link
Copy Markdown
Member

Prettier reformats workflow YAML on every format run — e.g. normalising cron: "0 0 * * *" to single quotes. The update-links workflow runs node --run format before committing, so git-auto-commit-action picks up the diff and tries to push a workflow file change. GitHub rejects that unless the token has workflows write permission.

Adding .github/ to .prettierignore stops the nightly run from producing spurious workflow file diffs.

Refs #1020

Prettier reformats workflow YAML files on every format run (e.g.
normalising double-quoted cron strings to single-quoted). The
update-links workflow then runs `node --run format` before committing
changes, so git-auto-commit-action would try to push a workflow-file
diff — which GitHub rejects unless the token has `workflows` write
permission.

Excluding `.github/` from Prettier stops the nightly run from
producing spurious workflow file modifications.

Refs #1020

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LXvbysVPDnes541gBuD1ia
@ovflowd
ovflowd requested a review from a team as a code owner September 9, 2026 12:42

@MattIPv4 MattIPv4 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't understand why we would exclude these, rather than formatting them correctly and enforcing that in CI?

@ovflowd

ovflowd commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

I don't understand why we would exclude these, rather than formatting them correctly and enforcing that in CI?

I'd argue that these shouldn't be formatted within a GitHub workflow.. But sure, we can simply fix it.

@ovflowd ovflowd closed this Sep 9, 2026
@ovflowd
ovflowd deleted the fix/prettier-ignore-github-workflows branch September 9, 2026 12: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