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 摘要。