fix(ci): push format changes as bot - #597
Merged
Merged
Conversation
- check Prettier formatting before changes reach main - remove the protected-branch auto-push workflow Co-authored-by: Claude <81847+claude@users.noreply.github.com>
- preserve formatting on pushes to main - submit formatting changes through a bot pull request Co-authored-by: Claude <81847+claude@users.noreply.github.com>
- merge bot formatting pull requests into main - delete merged formatting branches automatically Co-authored-by: Claude <81847+claude@users.noreply.github.com>
- authenticate checkout with the bot token - retain direct automated formatting commits on main Co-authored-by: Claude <81847+claude@users.noreply.github.com>
Suyunmeng
added a commit
that referenced
this pull request
Jul 21, 2026
- authenticate checkout with the bot token - retain direct automated formatting commits on main Co-authored-by: Claude <81847+claude@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary / 摘要
Configure the format workflow checkout to authenticate Git pushes with
BOT_TOKEN.Preserve the existing automatic Prettier formatting and direct signed commit behavior on
main.Prevent the format workflow from using the default Actions token, which the
mainruleset rejects for direct pushes.This PR has breaking changes.
This PR changes public API, config, storage format, or migration behavior.
This PR requires corresponding changes in related repositories.
Related repository PRs / 关联仓库 PR:
Testing / 测试
pnpm dlx prettier@3.8.4 --config .prettierrc --check .github/workflows/format.ymlgit diff origin/main...HEAD --checkmainruleset withgh.Checklist / 检查清单
gofmt,go fmt, orprettierwhere applicable.AI Disclosure / AI 使用声明
Tools used / 使用工具:
Usage scope / 使用范围:
Code generation
Tests
Review assistance
I have reviewed and validated all AI-assisted content included in this PR.
I have ensured that all AI-assisted commits include
Co-Authored-Byattribution.I can reproduce all AI-assisted content included in this PR without any AI tools.