Skip to content

Commit

Permalink
docs: conventional commit guideline
Browse files Browse the repository at this point in the history
  • Loading branch information
scarf005 committed Nov 13, 2023
1 parent b63677a commit 833a869
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 51 deletions.
32 changes: 10 additions & 22 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,20 @@ WARNING: If autofix.ci app did the formatting for you, YOU MUST DO EITHER OF THE
If you don't do this, your following work will be based on the old commit, and may cause MERGE CONFLICT.
If you use GitHub's web editor to edit files, you shouldn't need to do this as the web editor works directly on the remote branch.
Please use a descriptive name for the PR title, so it's clear at a glance what the PR is about.
-->
## Summary
SUMMARY: Category "Brief description of the change"
PR TITLE: Please follow conventional commits: https://www.conventionalcommits.org
This makes it clear at a glance what the PR is about.
<!--
This section should consist of exactly one line, formatted like the example above.
'Category' must be one of the following:
- Features
- Content
- Interface
- Mods
- Balance
- Bugfixes
- Performance
- Infrastructure
- Build
- I18N
For more on the meaning of each category, see:
for example:
feat(content, mods): new item for <mod name>
for more on which category is available, see:
https://docs.cataclysmbn.org/en/contribute/changelog_guidelines/
If the PR is a port or adaptation of DDA content, please indicate it to be so.
If the PR is a port or adaptation of DDA content, please indicate it by adding port in PR title, like:
feat(port): <feature name> from DDA
COMMENTS: Please remove all comments and unrelevent sections from this template before submitting your PR.
-->

## Purpose of change
Expand Down
138 changes: 109 additions & 29 deletions doc/src/content/docs/en/contribute/changelog_guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,101 @@
title: Changelog Guidelines
---

- categories used by `Pull Request Summary` in the
[PR Template](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/.github/pull_request_template.md).
- these are only guidelines, not rules. choose the best category for your PR freely.
PR title follows [Convensional Commits](https://www.conventionalcommits.org/en/v1.0.0/) for easier
changelog generation. The format is one of:

## Features
```
<Category>: <PR subject>
<Category>(<Scope>, <Scope>, ...): <PR subject>
```

For Example, a PR title can be:

```
feat: add new mutation
feat(content, port): port mutation description from DDA
```

## Category

The category is the first word in the PR title. They specify the type of change being made. When in
doubt, use `feat` for new features, and `fix` for bugfixes. Here are some frequently used
categories:

### `feat`: Features

New features, additions, or balance changes.

### `fix`: Bugfixes

Anything that fixes a bug or makes the game more stable.

### `refactor`: Infrastructure

Make development easier without changing its behavior. For example:

- `C++` refactorings and overhaul
- `Json` reorganizations
- `docs/`, `.github/` and repository changes
- other development tools

### `build`: Build

Improve build process:

- more robust
- easier to use
- faster compile time

### Others

- `docs`: Documentation changes
- `style`: Code style changes (whitespace, formatting, etc), usu. fixing JSON formatting.
- `perf`: Performance Improvements
- `test`: Adding missing tests or correcting existing tests
- `ci`: Changes to CI process
- `chore`: Other changes that don't fit into any of the above categories
- `revert`: Reverts a previous commit

## Scopes

1. Use them inside parentheses after the category to further narrow the scope of your PR.
2. There are no limits to number of scopes.
3. They are optional, but recommended.
4. these are only guidelines, not rules. choose the best one for your PR freely!

### `<None>`: Player/Worldwide Features

Changes related to player:

- player can do something new (e.g: mutations, skills)
- something new can happen to the player (e.g: new disease)

## Content
Example PR title:

Added new contents like:
```
feat: strength training activity
feat: mutation system overhaul
```

### `content`: Contents

New contents like:

- new monsters
- new map areas
- new items
- new vehicles
- new doohickeys

## Interface
Example PR title:

```
feat(content): semi-plausible smokeless gunpowder recipe
feat(content, port): game store
```

### `UI`: Interfaces

UI/UX changes like:

Expand All @@ -32,40 +105,47 @@ UI/UX changes like:
- streamlining workflows
- quality of life improvements

## Mods
Example PR title:

- changes contained within a mod
- extends what is capable within a mod
```
feat(UI): More info about items dropped with bags
feat(UI): overhaul encumbrance UI
```

## Balance
### `i18n`: Internationalization

Changes to game balance.
Improve translation and other languages support.

## Bugfixes
```
fix(UI, i18n): recipe names not translated unless learned
```

Fixes for anything broken.
### `mods/<MOD_ID>`: Mods

## Performance
- changes contained within a mod
- extends what is capable within a mod

Improvements to game performance.
Example PR title:

## Infrastructure
```
feat(mods/magiclysm, content): add missing owlbear pelts recipe
fix(mods/no_hope): No Hope doesn't make the world freezing
```

Make development easier:
### `balance`: Balance Changes

- `C++` refactorings and overhaul
- `Json` reorganizations
- `docs/`, `.github/` and repository changes
- other development tools
Changes to game balance.

## Build
Example PR title:

Improve build process:
```
feat(balance): Give moose pelts instead of hides
```

- more robust
- easier to use
- faster compile time
### `port`: Ports from DDA or other forks

## I18N
Example PR title:

Improve translation and other languages support.
```
feat(content, port): game shop
```

0 comments on commit 833a869

Please sign in to comment.