@@ -509,58 +509,79 @@ Relevant tools include:
509
509
510
510
## Commit messages
511
511
512
- Starting with the 1.23 release cycle,
513
- I'm proposing some new [ conventions ] ( https://conventionalcommits.org ) for commit messages.
514
- These are WIP and will evolve as we need. They are intended to:
512
+ Starting with the 1.23 release cycle, I'm proposing some new
513
+ conventions for commit messages (WIP, will evolve as needed),
514
+ aiming to:
515
515
516
516
- reduce the cost of maintaining change docs (changelogs, release notes, announcements)
517
517
- reduce the cost of releases
518
518
- encourage considered, focussed, well documented changes
519
- - increase our throughput (the rate of shipping useful, reliable, documented, maintainable features)
520
-
521
- 1 . Commit messages in hledger's main repo will follow this pattern:
522
- ```
523
- type: [optionaltopic:] summary
524
-
525
- [Optional description, more details here when needed.]
526
- ```
527
-
528
- 2 . The type prefix is one of the following:
529
-
530
- - Changes visible to end users (including users of hledger-web's HTTP API) -
531
- these will be mentioned in release notes as well as changelogs.
532
-
533
- - ` feat: ` - a new feature
534
- - ` imp: ` - an improvement to existing features
535
- - ` fix: ` - a bugfix
536
-
537
- - Changes affecting packagers, builders (including users installing
538
- from stackage or hackage), and library users (Haskell programmers
539
- using our library APIs) - these will be mentioned in changelogs but
540
- usually not release notes.
541
-
542
- - ` cha: `
543
-
544
- - Changes of interest only to developers/debuggers -
545
- these will not be mentioned in changelogs or release notes.
546
-
547
- - ` ; ` - short spelling for convenience, think "commented out of changelogs".
548
-
549
- 3 . A topic prefix, and maybe even a subtopic prefix, can be added if
550
- useful. These are standard prefixes similar to what I have been
551
- using for some time (cf [ labels] ( #labels ) ,
552
- [ components] ( #components ) ; I'll make an updated list in due
553
- course). They help with readability in the commit history,
554
- changelogs and release notes.
555
-
556
- 4 . The summary, and description if any, communicate this change's
519
+ - increase our throughput (rate of shipping useful, reliable, documented, maintainable features)
520
+
521
+ ** hledger commit conventions:**
522
+
523
+ 1 . Commit messages in hledger's main repo follow this pattern:
524
+ ```
525
+ type: [optionaltopic:] summary
526
+
527
+ [Optional description, more details here when needed.]
528
+ ```
529
+
530
+ 2 . Every top-level commit must have a type prefix. This indicates the
531
+ change's intended audience and the general type of change.
532
+ Here are the current types:
533
+
534
+ - Changes visible to end users (including users of hledger-web's HTTP API).
535
+ These will appear in release notes and changelogs:
536
+
537
+ - ` feat ` - a new feature
538
+ - ` imp ` - an improvement to existing features
539
+ - ` fix ` - a bugfix
540
+
541
+ - Changes affecting packagers, builders (including users installing
542
+ from stackage or hackage), and library users (Haskell programmers
543
+ using our library APIs). These will appear in changelogs, but not in release notes:
544
+
545
+ - ` cha ` (or ` pkg ` , ` lib ` ?)
546
+
547
+ - Changes of interest only to hledger developers/documentors/debuggers;
548
+ these will be visible only in the commit history, not in changelogs or release notes:
549
+
550
+ - ` dev ` (or ` doc ` , ` ref ` , ` cln ` , ... ?)
551
+
552
+ 3 . If this is a "breaking change", introducing a compatibility or
553
+ migration issue, the type is followed by ` ! ` , and the issue
554
+ and advice to users are included in the description.
555
+ This will most often be seen with the end-user types, eg:
556
+ ` feat!: ` , ` imp!: ` , ` fix!: ` .
557
+
558
+ 4 . If the first character of the commit message is ` ; ` , this commit
559
+ (more precisely, the push ending with this commit) will be excluded
560
+ from the usual CI checks. Our CI tends to do a lot of building, so
561
+ you can use this to save energy and carbon emissions when pushing
562
+ harmless changes.
563
+
564
+ 5 . A topic prefix, and maybe even a subtopic prefix, can be added
565
+ before the summary if useful. These are standard prefixes similar
566
+ to what I have been using for some time, see [ components] ( #components ) .
567
+ They help with readability in the commit history, changelogs and release notes.
568
+
569
+ 6 . Any relevant issues should be mentioned, often parenthesised at
570
+ the end of the summary: ` (#NNNN) ` .
571
+
572
+ 7 . The summary, and description if any, communicate this change's
557
573
purpose as clearly as possible to its target audience: end users,
558
574
builders/packagers/library users, developers/debuggers. The text
559
575
should be ready for use in changelogs/release notes when applicable.
560
576
561
577
Crafting good commit messages (and thereby, good commits, and good
562
- change documentation) is an art and a habit; we'll try to check and
563
- apply these conventions as part of CI and code review.
578
+ change documentation) is an art and a habit; we'll check and satisfy
579
+ these conventions as part of CI and code review.
580
+
581
+ Related:
582
+
583
+ - < https://conventionalcommits.org >
584
+ - < http://git.savannah.gnu.org/cgit/emacs.git/plain/CONTRIBUTE > -> Commit messages
564
585
565
586
## Pull requests
566
587
0 commit comments