Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: semantic PR title via conventional commits #3536

Merged
merged 4 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if I understand this bit.
Also, seems to be a typo: unrelevAnt.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, i meant pruning html comments in PR body, as they get included in PR body previews (e.g on notification)

Copy link
Contributor

@olanti-p olanti-p Nov 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before #3519, the template used to ask to remove the comments, but turns out ~40% of PRs don't do that anyway (either laziness or just avoiding removing something that may become relevant later), so we're stuck with them until GitHub introduces issue forms, but for PRs.

-->

## Purpose of change
Expand Down
3 changes: 3 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://github.com/Ezard/semantic-prs?tab=readme-ov-file#configuration-options
# Validate the PR title, and ignore all commit messages
titleOnly: true
6 changes: 3 additions & 3 deletions .github/workflows/pull-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ jobs:
- name: Create Pull Request
uses: peter-evans/[email protected]
with:
commit-message: Routine i18n updates on ${{ steps.get-timestamp.outputs.time }}
commit-message: "feat(i18n): routine i18n updates on ${{ steps.get-timestamp.outputs.time }}"
committer: Coolthulhu (BOT) <[email protected]>
author: Coolthulhu (BOT) <[email protected]>
token: ${{ secrets.TX_PR_CREATOR }}
branch: i18n
delete-branch: true
base: upload
title: Routine i18n updates on ${{ steps.get-timestamp.outputs.time }}
body: "#### Summary\nNone"
title: "feat(i18n): routine i18n updates on ${{ steps.get-timestamp.outputs.time }}"
body: ""
labels: Translation
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
```
Loading