apache / apache/cloudstack

Switch from `pre-commit` to `prek`

未关闭
#14,093 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
component:build type:improvement
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
32

描述

"Although prek is pretty new, it's already powering real‑world projects like [CPython](https://github.com/python/cpython), [Apache Airflow](https://github.com/apache/airflow), [FastAPI](https://github.com/fastapi/fastapi), and more projects are picking it up—see [Who is using prek?](https://prek.j178.dev/#who-is-using-prek). If you're looking for an alternative to pre-commit, please give it a try—we'd love your feedback!"

https://github.com/j178/prek

https://prek.j178.dev

Example workflows:

https://github.com/apache/lucenenet/blob/master/.github/workflows/pre-commit.yml

https://github.com/apache/sedona/blob/master/.github/workflows/pre-commit-manual.yml

https://github.com/apache/sedona/blob/master/.github/workflows/pre-commit.yml

Quick read first:

https://github.com/apache/lucenenet/blob/master/PREK.md

Longer read:

https://github.com/apache/sedona/blob/master/docs/setup/compile.md#code-quality-checks-with-prek-uv-and-make

Example Makefile https://github.com/apache/sedona/blob/master/Makefile

refs https://github.com/apache/cloudstack/pull/8491

refs https://github.com/apache/cloudstack/pull/12836

ASF Approved:

https://github.com/apache/infrastructure-actions/blob/1affe4095bb84ec7d39f229556b6906232d39c92/approved_patterns.yml#L229

贡献指南

打开贡献指南

调研方向

首先定位 CloudStack 当前的 pre-commit 配置、GitHub workflow 入口和 Makefile 目标;该 issue 未指出它们的路径。将这些入口与所链接的 Lucene.NET 和 Sedona 的 PREK.md 及 workflow 示例进行比较,然后验证现有检查能通过 prek 成功运行,并且不再使用旧的 pre-commit 路径。

由索引模型根据 Issue 内容生成。

评估

领域
build-system, ci-cd, tooling
Issue 类型
功能
难度
4/5
预计耗时
3-5 天
活跃度
活跃
描述清晰度
基本清楚
新手友好度
52/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。