Skip to content

Commit f260cf6

Browse files
committed
;doc: contrib: draft of new commit conventions
1 parent b669adb commit f260cf6

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

CONTRIBUTING.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,61 @@ Relevant tools include:
507507
[log](http://ircbrowse.net/day/hledger/2015/10/11) -->
508508

509509

510+
## Commit messages
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:
515+
516+
- reduce the cost of maintaining change docs (changelogs, release notes, announcements)
517+
- reduce the cost of releases
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
557+
purpose as clearly as possible to its target audience: end users,
558+
builders/packagers/library users, developers/debuggers. The text
559+
should be ready for use in changelogs/release notes when applicable.
560+
561+
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.
564+
510565
## Pull requests
511566

512567
Most contributed hledger code (and some of the project maintainer's code)

0 commit comments

Comments
 (0)