apache / apache/cloudstack

Switch from `pre-commit` to `prek`

Offen
#14,093 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
component:build type:improvement
Vorherrschende Sprache
Java
Sterne
3.1k
Forks
1.4k
Ø Merge
6 T. 19 Std.
Gemergte PRs (30 T.)
32

Beschreibung

"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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, CloudStacks aktuelle pre-commit-Konfiguration, die GitHub-Workflow-Einstiegspunkte und die Makefile-Ziele zu lokalisieren; das Issue nennt ihre Pfade nicht. Vergleiche diese Einstiegspunkte mit den verlinkten PREK.md- und Workflow-Beispielen von Lucene.NET und Sedona und überprüfe anschließend, dass die vorhandenen Checks mit prek erfolgreich ausgeführt werden und der alte pre-commit-Pfad nicht mehr verwendet wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Bereich
build-system, ci-cd, tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.