feat: support add random suffix for repo#2
Conversation
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
🤖 AI Code Review
SummaryThis PR adds Review Statistics
Critical Issues
Warnings
Suggestions
Positive FeedbackThe resolver is thoughtfully implemented: deep-copying avoids mutating source config, cross-resource reference remapping is comprehensive, and tests cover key scenarios like override behavior and idempotent re-run semantics after clearing ℹ️ About this reviewThis review was automatically generated using the
|
|
|
||
| // GenerateTimestampSuffix returns timestamp in the same format used by gitlab-cli. | ||
| func GenerateTimestampSuffix() string { | ||
| return time.Now().Format("20060102150405") |
There was a problem hiding this comment.
performance/collision WARNING: GenerateTimestampSuffix() has second-level granularity, so two runs within the same second can produce identical suffixes and collide on resource names. Consider adding higher precision (.000) or a short random component to make collisions practically impossible.
| } | ||
| } | ||
|
|
||
| if err := os.WriteFile(path, data, 0o644); err != nil { |
There was a problem hiding this comment.
security/secrets ERROR: resolved-config writes the full resolved YAML, which includes sensitive fields such as user passwords and proxy credentials. Writing with mode 0644 makes it world-readable on multi-user systems. Please write with 0600 (and document that the file contains secrets) to avoid credential exposure.
支持为创建的 repositories 自动添加后缀,与此前 gitlab-cli 那边的行为保持一致