Skip to content

ci: add daily ktfmt formatting cron that opens a PR on changes#373

Merged
tinder-maxwellelliott merged 1 commit into
masterfrom
claude/crazy-pascal-697fee
Jun 17, 2026
Merged

ci: add daily ktfmt formatting cron that opens a PR on changes#373
tinder-maxwellelliott merged 1 commit into
masterfrom
claude/crazy-pascal-697fee

Conversation

@tinder-maxwellelliott

Copy link
Copy Markdown
Collaborator

What

Adds .github/workflows/format.yaml: a daily cron that runs ktfmt over the codebase and opens a PR only when the formatter produced changes.

How

  • Schedule: daily at 12:00 UTC (one hour before the coverage-badge cron), plus a workflow_dispatch button for manual runs.
  • Formats via bazel run //cli/format (the in-place format_multirun target, same as make format) on Bazel 9.x.
  • PR only on modifications: a git status --porcelain gate exits cleanly with "nothing to do" when the tree is already formatted.
  • Single rolling PR: force-pushes a dedicated bot-owned branch ci/ktfmt-format and reuses the open PR if one exists, so re-runs don't accumulate stale branches. Never touches master directly.
  • Uses the same contents: write / pull-requests: write permissions and GITHUB_TOKEN as the existing coverage-badge cron.

Note: GitHub only activates schedule triggers once this file lands on the default branch (master).

🤖 Generated with Claude Code

Runs `bazel run //cli/format` daily at 12:00 UTC and opens a PR only when
the formatter produced changes. Mirrors the coverage-badge cron: force-pushes
a dedicated bot-owned branch (ci/ktfmt-format) so re-runs reuse one PR instead
of accumulating stale branches, and never touches master directly. Also exposes
a workflow_dispatch trigger for manual runs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@tinder-maxwellelliott tinder-maxwellelliott merged commit c32c4cb into master Jun 17, 2026
28 of 29 checks passed
@tinder-maxwellelliott tinder-maxwellelliott deleted the claude/crazy-pascal-697fee branch June 17, 2026 20:09
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.

1 participant