Repository navigation
ci: do not leave the token in .git/config after checkout - #71
Conversation
Commit Check runs commit-check-action and the shared pre-commit workflow runs third-party hooks, and neither needs authenticated git. Every other repository's workflows already check out this way.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Commit Check✅ All 3 checks passed Show all 3 checkscommit-check 2.19.0 · Rules reference |
Before: two workflows here left the job token in
.git/configafter checkout:commit-check.yml, which then runs commit-check-action withpull-requests: write;pre-commit.yml, which then runs the pre-commit hooks, code from other repositories.Neither needs authenticated git. Every workflow in the other repositories already checks out with
persist-credentials: false; these two were the gaps.After:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: fetch-depth: 0 # Required for merge-base checks + # Nothing after checkout needs authenticated git. + persist-credentials: falseand the same for the checkout in
pre-commit.yml. The action's own self-test already runs this way, and pre-commit clones its hook repositories itself, without that token. The only caller ofpre-commit.ymlis commit-check-action, which passes nocommands.Summary by CodeRabbit