StossenHDYT

Untitled

Nov 26th, 2025
81
0
31 sec
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.64 KB | None | 0 0
  1. # Commit Nachrichten (Neues Schema)
  2.  
  3. Wir verwenden ein einheitliches Format für Commit-Nachrichten, angelehnt
  4. an [Conventional Commits](https://www.conventionalcommits.org/).
  5. Dadurch sind Commit Messages automatisch für **Changelog-Generierung, Release Notes und semantische Versionierung**
  6. verwendbar.
  7.  
  8. ## Summary line (erste Zeile)
  9.  
  10. Eine Commit-Message besteht aus drei Teilen:
  11.  
  12. ```
  13. <type>(<scope>): <kurze beschreibung>
  14. ```
  15.  
  16. * **`<type>`** → Schlüsselwort (Art der Änderung)
  17. * **`<scope>`** *(optional)* → Bereich/Modul, das geändert wurde
  18. * **`<beschreibung>`** → kurze, imperative Beschreibung (max. 72 Zeichen)
  19.  
  20. 👉 Schreibe immer so, als ob du den Satz mit *"If applied, this commit will ..."* vervollständigst.
  21.  
  22. ---
  23.  
  24. ## Types (Keywords)
  25.  
  26. | Keyword    | Wann benutzen                                                  |
  27. |------------|----------------------------------------------------------------|
  28. | `fix`      | Bugfix – behebt ein fehlerhaftes Verhalten                     |
  29. | `feat`     | Neue Funktion oder Fähigkeit (Feature)                         |
  30. | `chore`    | Wartung, Tooling, Buildsystem, Dependency-Updates              |
  31. | `docs`     | Dokumentationsänderungen                                       |
  32. | `refactor` | Umstrukturierung des Codes ohne Änderung des Verhaltens        |
  33. | `perf`     | Performance-Optimierungen                                      |
  34. | `test`     | Hinzufügen/Ändern von Tests                                    |
  35. | `style`    | Code-Formatierungen, Whitespaces, Linting, ohne Logik-Änderung |
  36. | `ci`       | Änderungen an der CI/CD-Pipeline                               |
  37. | `revert`   | Zurücksetzen eines früheren Commits                            |
  38.  
  39. ---
  40.  
  41. ## Zusatz-Flags
  42.  
  43. Die Flags können zusätzlich in der **Beschreibung** oder **Body** stehen:
  44.  
  45. * **`BREAKING CHANGE:`** → muss am Anfang des Body stehen, wenn sich API/Verhalten ändert
  46. * **`SECURITY:`** → markiert sicherheitsrelevante Fixes
  47. * **`WIP`** → für unfertige Commits, die noch nicht gemergt werden sollen
  48.  
  49. ---
  50.  
  51. ## Regeln
  52.  
  53. * `<scope>` ist **optional** → nutze es, wenn sich die Änderung klar auf ein Modul, Package, oder Service bezieht.
  54.   Beispiele: `auth`, `api`, `user-service`, `db`, `ui`
  55. * Wenn kein Scope sinnvoll ist, einfach weglassen:
  56.   `fix: correct typo in error message`
  57. * Beschreibung **im Imperativ** formulieren:
  58.   ❌ „Fixed login bug“
  59.   ✅ „fix login bug“
  60.  
  61. ---
  62.  
  63. ## Beispiele
  64.  
  65. ### `fix`
  66.  
  67. ```
  68. fix(auth): prevent login with expired token
  69. ```
  70.  
  71. → Bugfix im Authentifizierungsmodul.
  72.  
  73. ```
  74. fix: correct typo in CLI help output
  75. ```
  76.  
  77. → Allgemeiner Fix ohne Modulbezug.
  78.  
  79. ---
  80.  
  81. ### `feat`
  82.  
  83. ```
  84. feat(api): add pagination support for /users endpoint
  85. ```
  86.  
  87. → Neue Funktion für die User-API.
  88.  
  89. ```
  90. feat: allow dark mode toggle in settings
  91. ```
  92.  
  93. → Neue UI-Funktion, ohne Scope.
  94.  
  95. ---
  96.  
  97. ### `chore`
  98.  
  99. ```
  100. chore: update dependencies to latest versions
  101. ```
  102.  
  103. → Allgemeine Wartung.
  104.  
  105. ```
  106. chore(ci): switch to GitHub Actions for test pipeline
  107. ```
  108.  
  109. → Änderung an der CI.
  110.  
  111. ---
  112.  
  113. ### `docs`
  114.  
  115. ```
  116. docs(readme): add usage examples for CLI tool
  117. ```
  118.  
  119. → Nur Dokumentation.
  120.  
  121. ---
  122.  
  123. ### `refactor`
  124.  
  125. ```
  126. refactor(db): extract query builder into separate class
  127. ```
  128.  
  129. → Code-Umbau, gleiches Verhalten.
  130.  
  131. ---
  132.  
  133. ### `perf`
  134.  
  135. ```
  136. perf(cache): reduce lookup time by using hashmap
  137. ```
  138.  
  139. → Performance-Verbesserung.
  140.  
  141. ---
  142.  
  143. ### `test`
  144.  
  145. ```
  146. test(user-service): add unit tests for registration flow
  147. ```
  148.  
  149. → Tests hinzugefügt.
  150.  
  151. ---
  152.  
  153. ### `style`
  154.  
  155. ```
  156. style: reformat code with prettier
  157. ```
  158.  
  159. → Nur Formatierung.
  160.  
  161. ---
  162.  
  163. ### `ci`
  164.  
  165. ```
  166. ci: add linter step to pipeline
  167. ```
  168.  
  169. → Änderung an der Pipeline.
  170.  
  171. ---
  172.  
  173. ### `revert`
  174.  
  175. ```
  176. revert: revert "feat(api): add pagination support"
  177. ```
  178.  
  179. → Rollback eines Features.
  180. ---
  181.  
  182. ### Mit **BREAKING CHANGE**
  183.  
  184. ```
  185. feat(api): switch /users response format to JSON:API
  186.  
  187. BREAKING CHANGE: clients must update parsing logic to support new format
  188. ```
  189.  
  190. ## Specification
  191. The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119.
  192.  
  193. Commits MUST be prefixed with a type, which consists of a noun, feat, fix, etc., followed by the OPTIONAL scope, OPTIONAL !, and REQUIRED terminal colon and space.
  194. The type feat MUST be used when a commit adds a new feature to your application or library.
  195. The type fix MUST be used when a commit represents a bug fix for your application.
  196. A scope MAY be provided after a type. A scope MUST consist of a noun describing a section of the codebase surrounded by parenthesis, e.g., fix(parser):
  197. A description MUST immediately follow the colon and space after the type/scope prefix. The description is a short summary of the code changes, e.g., fix: array parsing issue when multiple spaces were contained in string.
  198. A longer commit body MAY be provided after the short description, providing additional contextual information about the code changes. The body MUST begin one blank line after the description.
  199. A commit body is free-form and MAY consist of any number of newline separated paragraphs.
  200. One or more footers MAY be provided one blank line after the body. Each footer MUST consist of a word token, followed by either a :<space> or <space># separator, followed by a string value (this is inspired by the git trailer convention).
  201. A footer’s token MUST use - in place of whitespace characters, e.g., Acked-by (this helps differentiate the footer section from a multi-paragraph body). An exception is made for BREAKING CHANGE, which MAY also be used as a token.
  202. A footer’s value MAY contain spaces and newlines, and parsing MUST terminate when the next valid footer token/separator pair is observed.
  203. Breaking changes MUST be indicated in the type/scope prefix of a commit, or as an entry in the footer.
  204. If included as a footer, a breaking change MUST consist of the uppercase text BREAKING CHANGE, followed by a colon, space, and description, e.g., BREAKING CHANGE: environment variables now take precedence over config files.
  205. If included in the type/scope prefix, breaking changes MUST be indicated by a ! immediately before the :. If ! is used, BREAKING CHANGE: MAY be omitted from the footer section, and the commit description SHALL be used to describe the breaking change.
  206. Types other than feat and fix MAY be used in your commit messages, e.g., docs: update ref docs.
  207. The units of information that make up Conventional Commits MUST NOT be treated as case sensitive by implementors, with the exception of BREAKING CHANGE which MUST be uppercase.
  208. BREAKING-CHANGE MUST be synonymous with BREAKING CHANGE, when used as a token in a footer.
  209.  
  210. # Issues automatisch über Commit schließen
  211.  
  212. Es ist möglich, Issues (Tickets) direkt über die Kommentarfunktion während des Commits zu schließen.
  213.  
  214. Folgende Schlüsselwörter (keywords) können benutzt werden:
  215. Close, Closes, Closed, Closing, close, closes, closed, closing
  216. Fix, Fixes, Fixed, Fixing, fix, fixes, fixed, fixing
  217. Resolve, Resolves, Resolved, Resolving, resolve, resolves, resolved, resolving
  218. Implement, Implements, Implemented, Implementing, implement, implements, implemented, implementing
  219.  
  220. ## Wichtig - Folgende Regeln überschreiben alles, was zuvor geschrieben wurde:
  221.  
  222. Erwähne, falls tests bearbeitet wurden, dass diese auch aktualisiert wurden.
  223. Versuche zu erkennen, ob eher hauptsächlich der Test oder du Funktion bearbeitet werden sole.
  224.  
  225. Füge am Ende der Commit-Nachricht ein passendes Emoji hinzu. Es muss immer genau ein passendes Emoji angegeben werden.
Advertisement
Add Comment
Please, Sign In to add comment